Test that PASSes but should not
This is not a good thing:
test/unittest/ip/tst.ipv4localicmp.sh: Running timeout --signal=TERM 41 test/unittest/ip/tst.ipv4localicmp.sh /home/kvanhees/dtrace-bpf-user/build/dtrace PASS.
-- @@stderr --
BPF: func#0 @0
BPF: func#1 @154
BPF: func#2 @1121
BPF: func#3 @1136
BPF: func#4 @1350
BPF: func#5 @1355
BPF: func#6 @1438
BPF: func#7 @1453
BPF: func#8 @1667
BPF: func#9 @1706
BPF: func#10 @1746
BPF: func#11 @1926
BPF: func#12 @1995
BPF: func#13 @2064
BPF: func#14 @2074
BPF: Tracing programs must provide btf_id
BPF: verification time 33 usec
BPF: stack depth 0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
BPF: processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
dtrace: could not enable tracing: BPF program load for 'fbt:ipv6:ip6_finish_output:entry' failed: Invalid argument
That failure definitely should cause the test to fail.
And yet it has a .r file?
Quoted 28 lines · Kris Van Hees
This is not a good thing:
test/unittest/ip/tst.ipv4localicmp.sh: Running timeout --signal=TERM 41test/unittest/ip/tst.ipv4localicmp.sh/home/kvanhees/dtrace-bpf-user/build/dtracePASS.
-- @@stderr --
BPF: func#0 @0
BPF: func#1 @154
BPF: func#2 @1121
BPF: func#3 @1136
BPF: func#4 @1350
BPF: func#5 @1355
BPF: func#6 @1438
BPF: func#7 @1453
BPF: func#8 @1667
BPF: func#9 @1706
BPF: func#10 @1746
BPF: func#11 @1926
BPF: func#12 @1995
BPF: func#13 @2064
BPF: func#14 @2074
BPF: Tracing programs must providebtf_id
BPF: verification time 33 usec
BPF: stack depth 0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
BPF: processed 0 insns (limit 1000000)max_states_per_insn0total_states0peak_states0mark_read0
dtrace: could not enable tracing: BPF program load for 'fbt:ipv6:ip6_finish_output:entry' failed: Invalid argumentThat failure definitely should cause the test to fail.
Quoted 1 line · Eugene Loh
And yet it has a .r file?
Yes, the problem is less with the test and more with something going wrong with BTF handling causing the probe to not have a BTF ID and yet it is trying to load a program for it. Attachment should not even be tried in that case.
Working out what is wrong and fixing.
Quoted 29 lines · Kris Van Hees
Quoted 28 lines
This is not a good thing:
test/unittest/ip/tst.ipv4localicmp.sh: Running timeout --signal=TERM 41test/unittest/ip/tst.ipv4localicmp.sh/home/kvanhees/dtrace-bpf-user/build/dtracePASS.
-- @@stderr --
BPF: func#0 @0
BPF: func#1 @154
BPF: func#2 @1121
BPF: func#3 @1136
BPF: func#4 @1350
BPF: func#5 @1355
BPF: func#6 @1438
BPF: func#7 @1453
BPF: func#8 @1667
BPF: func#9 @1706
BPF: func#10 @1746
BPF: func#11 @1926
BPF: func#12 @1995
BPF: func#13 @2064
BPF: func#14 @2074
BPF: Tracing programs must providebtf_id
BPF: verification time 33 usec
BPF: stack depth 0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
BPF: processed 0 insns (limit 1000000)max_states_per_insn0total_states0peak_states0mark_read0
dtrace: could not enable tracing: BPF program load for 'fbt:ipv6:ip6_finish_output:entry' failed: Invalid argumentThat failure definitely should cause the test to fail.
Quoted 8 lines · Kris Van Hees
Quoted 1 line · Eugene Loh
And yet it has a .r file?
Yes, the problem is less with the test and more with something going wrong with BTF handling causing the probe to not have a BTF ID and yet it is trying to load a program for it. Attachment should not even be tried in that case.
Working out what is wrong and fixing.
Patch posted. Was an issue with the BTF ID lookup code handling modules whose BTF data didn't get initialized yet.
Quoted 10 lines · Kris Van Hees
Quoted 7 lines · Kris Van Hees
Quoted 1 line · Eugene Loh
And yet it has a .r file?
Yes, the problem is less with the test and more with something going wrong with BTF handling causing the probe to not have a BTF ID and yet it is trying to load a program for it. Attachment should not even be tried in that case.
Working out what is wrong and fixing.
Patch posted. Was an issue with the BTF ID lookup code handling modules whose BTF data didn't get initialized yet.
But how could it dump all that stuff and pass matching against a .r file?
Quoted 9 lines · Eugene Loh
Quoted 7 lines · Kris Van Hees
Quoted 6 lines · Kris Van Hees
Quoted 1 line · Eugene Loh
And yet it has a .r file?
Yes, the problem is less with the test and more with something going wrong with BTF handling causing the probe to not have a BTF ID and yet it is trying to load a program for it. Attachment should not even be tried in that case.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Working out what is wrong and fixing.
Patch posted. Was an issue with the BTF ID lookup code handling modules whose BTF data didn't get initialized yet.
But how could it dump all that stuff and pass matching against a .r file?
No idea - my priority right now was fixing the issue that caused the BPF verifier error report. We can look at why it was deemed to PASS even with that BPF verifer complaint - that is secondary.