mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-21 16:31:14 +02:00

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>
818 B
818 B
[config] command = record args = --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1 ret = 1
[event] fd=1 group_fd=-1 cpu=0 pid=-1 flags=8 type=1 size=136 config=9 sample_period=4000
PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME |
PERF_SAMPLE_PERIOD
+ PERF_SAMPLE_CPU added by -C 0
sample_type=391 read_format=4|20 disabled=0 inherit=1 pinned=0 exclusive=0 exclude_user=0 exclude_kernel=0 exclude_hv=0 exclude_idle=0 mmap=1 comm=1 freq=1 inherit_stat=0 enable_on_exec=0 task=1 watermark=0 precise_ip=0 mmap_data=0 sample_id_all=1 exclude_host=0 exclude_guest=1 exclude_callchain_kernel=0 exclude_callchain_user=0 mmap2=1 comm_exec=1 context_switch=0 write_backward=0 namespaces=0 use_clockid=0 wakeup_events=0 bp_type=0 config1=0 config2=0 branch_sample_type=0 sample_regs_user=0 sample_stack_user=0