On Mon, Mar 17, 2025 at 05:48:10PM -0300, Arnaldo Carvalho de Melo wrote: > On Fri, Mar 14, 2025 at 02:10:54PM -0300, Arnaldo Carvalho de Melo wrote: > > On Thu, Mar 13, 2025 at 10:45:49PM -0700, Namhyung Kim wrote: > > > On Thu, Mar 13, 2025 at 05:47:27PM -0300, Arnaldo Carvalho de Melo wrote: > > > > On Thu, Mar 13, 2025 at 05:20:09PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > Still building, but noticed this on x86_64: > > > > > > > > > > 105: perf trace enum augmentation tests : FAILED! > > > > > 106: perf trace BTF general tests : FAILED! > > > > > 107: perf trace exit race : Ok > > > > > 108: perf trace record and replay : FAILED! > > > > > > > > > > > > > > > The first doesn´t help that much with verbose mode, haven't checked if > > > > > before this series it was failing :-\ > > > > > > > > > > root@x1:~# perf test -vvv 105 > > > > > 105: perf trace enum augmentation tests: > > > > > --- start --- > > > > > test child forked, pid 19411 > > > > > Checking if vmlinux exists > > > > > Tracing syscall landlock_add_rule > > > > > ---- end(-1) ---- > > > > > 105: perf trace enum augmentation tests : FAILED! > > > > > root@x1:~# > This one is now ok: > 0.004 ( 0.000 ms): perf/200342 landlock_add_rule(ruleset_fd: 11, rule_type: LANDLOCK_RULE_NET_PORT, rule_attr: 0x7ffd649bd0d0, flags: 45) = -1 EINVAL (Invalid argument) > root@number:~# perf test enum > 105: perf trace enum augmentation tests : Ok > root@number:~# > now looking at: > root@number:~# perf test -vvvvvvvvv 106 > 106: perf trace BTF general tests: > --- start --- > test child forked, pid 200467 > Checking if vmlinux BTF exists > Testing perf trace's string augmentation > String augmentation test failed > ---- end(-1) ---- > 106: perf trace BTF general tests : FAILED! > root@number:~# > No clue from the test, reading its source code now to see where it is > failing to try and reproduce the problem. root@number:~# rm -f /tmp/1234567 ; touch /tmp/1234567 ; perf trace -e renameat* --max-events=1 -- mv /tmp/1234567 /tmp/abcdefg ? ( ): mv/200698 ... [continued]: renameat2()) = -1 EEXIST (File exists) root@number:~# At this point it works: ⬢ [acme@toolbox perf-tools-next]$ git log -1 commit 58f4f294b358861adaee68dfd19da1060058ec27 (HEAD) Author: James Clark <james.clark@xxxxxxxxxx> Date: Mon Jan 6 16:42:58 2025 +0000 perf test trace_btf_general: Fix shellcheck warning root@number:~# rm -f /tmp/1234567 ; touch /tmp/1234567 ; perf trace -e renameat* --max-events=1 -- mv /tmp/1234567 /tmp/abcdefg 0.000 ( 0.006 ms): mv/218282 renameat2(olddfd: CWD, oldname: "/tmp/1234567", newdfd: CWD, newname: "/tmp/abcdefg", flags: NOREPLACE) = -1 EEXIST (File exists) root@number:~# Seems like some transient problem on this test machine, didn't manage to bisect and now everything seems to work: Well, not always :-\ root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : Ok 106: perf trace BTF general tests : Ok 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : Ok 106: perf trace BTF general tests : Ok 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test 105 106 107 108 105: perf trace enum augmentation tests : Ok 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# for test in 105 106 107 108 ; do perf test $test ; done 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# for test in 105 106 107 108 ; do perf test $test ; done 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : FAILED! 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# So, overall, I think this should land and we should continue trying to figure out how to find out about the above failure cases, probably the perf trace cases, since they do set up BPF programs, etc should be done serially? Doesn't seem to be the case: root@number:~# for test in 105 106 107 108 ; do perf test --sequential $test ; done 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : Ok 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# for test in 105 106 107 108 ; do perf test --sequential $test ; done 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : Ok 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# perf test --sequential 105 106 107 108 105: perf trace enum augmentation tests : FAILED! 106: perf trace BTF general tests : Ok 107: perf trace exit race : Ok 108: perf trace record and replay : Ok root@number:~# But then if that is the case it needs some love and care to deal with other BPF users in the system, being more graceful in the face of errors. - Arnaldo