[PATCH 1/3] perf: fix incorrect sample_type value for perf stat tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Test case 14 runs 'perf stat' command to execute all
tests/attr/test-stat* test cases. They all fail with
a mismatch in sample_type attribute, for example:

running './tests/attr//test-stat-basic'
...
compare
  matchng [event:base-stat]
      to [event-0-0-4]
      ...
      [sample_type] 0 65536
  ->FAIL

The reason for the failure is in create_perf_stat_counter()
in file builtin-stat.c. When command 'perf stat record -o -'
is used the value of perf_event_stat.sample_type is not changed.
All other invocations of 'perf stat' change this
member to PERF_SAMPLE_IDENTIFIER (2^16).

None of the test-stat-* tests are invoked with
'perf stat record -o -' and the sample_type comparion fails.

Fix this by changing the expected value for attribute sample_type
in the base_stat file.

Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxxxxxxx>
---
 tools/perf/tests/attr/base-stat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/attr/base-stat b/tools/perf/tests/attr/base-stat
index f4cf148..4a48d16 100644
--- a/tools/perf/tests/attr/base-stat
+++ b/tools/perf/tests/attr/base-stat
@@ -8,7 +8,7 @@ type=0
 size=112
 config=0
 sample_period=0
-sample_type=0
+sample_type=65536
 read_format=3
 disabled=1
 inherit=1
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux