Skip to content

Commit e280396

Browse files
James-A-Clarkacmel
authored andcommitted
perf test: Fix attr tests for PERF_FORMAT_LOST
Since PERF_FORMAT_LOST was added, the default read format has that bit set, so add it to the tests. Keep the old value as well so that the test still passes on older kernels. This fixes the following failure: expected read_format=0|4, got 20 FAILED './tests/attr/test-record-C0' - match failure Fixes: 85b425f ("perf record: Set PERF_FORMAT_LOST by default") Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20221012094633.21669-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent f77811a commit e280396

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

tools/perf/tests/attr/base-record

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ size=128
99
config=0
1010
sample_period=*
1111
sample_type=263
12-
read_format=0|4
12+
read_format=0|4|20
1313
disabled=1
1414
inherit=1
1515
pinned=0

tools/perf/tests/attr/system-wide-dummy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ size=128
1111
config=9
1212
sample_period=4000
1313
sample_type=455
14-
read_format=4
14+
read_format=4|20
1515
# Event will be enabled right away.
1616
disabled=0
1717
inherit=1

tools/perf/tests/attr/test-record-group

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ret = 1
77
fd=1
88
group_fd=-1
99
sample_type=327
10-
read_format=4
10+
read_format=4|20
1111

1212
[event-2:base-record]
1313
fd=2
1414
group_fd=1
1515
config=1
1616
sample_type=327
17-
read_format=4
17+
read_format=4|20
1818
mmap=0
1919
comm=0
2020
task=0

tools/perf/tests/attr/test-record-group-sampling

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ret = 1
77
fd=1
88
group_fd=-1
99
sample_type=343
10-
read_format=12
10+
read_format=12|28
1111
inherit=0
1212

1313
[event-2:base-record]
@@ -21,8 +21,8 @@ config=3
2121
# default | PERF_SAMPLE_READ
2222
sample_type=343
2323

24-
# PERF_FORMAT_ID | PERF_FORMAT_GROUP
25-
read_format=12
24+
# PERF_FORMAT_ID | PERF_FORMAT_GROUP | PERF_FORMAT_LOST
25+
read_format=12|28
2626
task=0
2727
mmap=0
2828
comm=0

tools/perf/tests/attr/test-record-group1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ ret = 1
77
fd=1
88
group_fd=-1
99
sample_type=327
10-
read_format=4
10+
read_format=4|20
1111

1212
[event-2:base-record]
1313
fd=2
1414
group_fd=1
1515
type=0
1616
config=1
1717
sample_type=327
18-
read_format=4
18+
read_format=4|20
1919
mmap=0
2020
comm=0
2121
task=0

tools/perf/tests/attr/test-record-group2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ group_fd=-1
99
config=0|1
1010
sample_period=1234000
1111
sample_type=87
12-
read_format=12
12+
read_format=12|28
1313
inherit=0
1414
freq=0
1515

@@ -19,7 +19,7 @@ group_fd=1
1919
config=0|1
2020
sample_period=6789000
2121
sample_type=87
22-
read_format=12
22+
read_format=12|28
2323
disabled=0
2424
inherit=0
2525
mmap=0

0 commit comments

Comments
 (0)