diff options
author | Yang Jihong <yangjihong1@huawei.com> | 2023-09-16 09:16:41 +0000 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2023-09-16 22:36:36 -0700 |
commit | a132b784db68b543fd2745973cd8b5edf8e9bde4 (patch) | |
tree | 6dfd7f6ef0700616cd2625d16232694659d85435 /tools/perf/tests | |
parent | 79df8365e37d38a84d9a15cc2f6386f5587e211a (diff) |
perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
For kernel that supports PERF_FORMAT_LOST, attr->read_format has
PERF_FORMAT_LOST bit. Update expected value of
attr->read_format of test-record-dummy-C0 for this scenario.
Before:
# ./perf test 17 -vv
17: Setup struct perf_event_attr :
--- start ---
test child forked, pid 1609441
<SNIP>
running './tests/attr/test-record-dummy-C0'
'PERF_TEST_ATTR=/tmp/tmpm3s60aji ./perf record -o /tmp/tmpm3s60aji/perf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expected '1'
expected read_format=4, got 20
FAILED './tests/attr/test-record-dummy-C0' - match failure
test child finished with -1
---- end ----
Setup struct perf_event_attr: FAILED!
After:
# ./perf test 17 -vv
17: Setup struct perf_event_attr :
--- start ---
test child forked, pid 1609441
<SNIP>
running './tests/attr/test-record-dummy-C0'
'PERF_TEST_ATTR=/tmp/tmppa9vxcb7 ./perf record -o /tmp/tmppa9vxcb7/perf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expected '1'
<SNIP>
test child finished with 0
---- end ----
Setup struct perf_event_attr: Ok
Reported-and-Tested-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Link: https://lore.kernel.org/r/20230916091641.776031-1-yangjihong1@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r-- | tools/perf/tests/attr/test-record-dummy-C0 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/attr/test-record-dummy-C0 b/tools/perf/tests/attr/test-record-dummy-C0 index 83ca4e373acd..576ec48b3aaf 100644 --- a/tools/perf/tests/attr/test-record-dummy-C0 +++ b/tools/perf/tests/attr/test-record-dummy-C0 @@ -17,7 +17,7 @@ sample_period=4000 # PERF_SAMPLE_PERIOD # + PERF_SAMPLE_CPU added by -C 0 sample_type=391 -read_format=4 +read_format=4|20 disabled=0 inherit=1 pinned=0 |