From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697AbcAGUwq (ORCPT ); Thu, 7 Jan 2016 15:52:46 -0500 Received: from mga03.intel.com ([134.134.136.65]:22069 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbcAGUtP (ORCPT ); Thu, 7 Jan 2016 15:49:15 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,534,1444719600"; d="scan'208";a="885968025" From: kan.liang@intel.com To: peterz@infradead.org, acme@kernel.org Cc: eranian@google.com, ak@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, Kan Liang Subject: [PATCH V2 8/8] perf test: add test case for PERF_SAMPLE_PHYS_ADDR Date: Thu, 7 Jan 2016 08:30:40 -0500 Message-Id: <1452173440-10697-8-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1452173440-10697-1-git-send-email-kan.liang@intel.com> References: <1452173440-10697-1-git-send-email-kan.liang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kan Liang Extend sample-parsing test cases to support new sample type PERF_SAMPLE_PHYS_ADDR. Signed-off-by: Kan Liang --- tools/perf/tests/sample-parsing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 5f23710..8813fa1 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c @@ -45,6 +45,9 @@ static bool samples_same(const struct perf_sample *s1, if (type & PERF_SAMPLE_ADDR) COMP(addr); + if (type & PERF_SAMPLE_PHYS_ADDR) + COMP(phys_addr); + if (type & PERF_SAMPLE_ID) COMP(id); @@ -303,7 +306,7 @@ int test__sample_parsing(int subtest __maybe_unused) * were added. Please actually update the test rather than just change * the condition below. */ - if (PERF_SAMPLE_MAX > PERF_SAMPLE_REGS_INTR << 1) { + if (PERF_SAMPLE_MAX > PERF_SAMPLE_PHYS_ADDR << 1) { pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n"); return -1; } -- 1.8.3.1