Commit ef4e04e
selftests/bpf: Skip ENOTSUPP in ASSERT_GE
There are still some "ENOTSUPP" (-524) errors left when running BPF
selftests on a Loongarch platform since ASSERT_GE() are used there to
check the return values, not ASSERT_OK():
'''
test_bpf_cookie:PASS:skel_open 0 nsec
torvalds#17/1 bpf_cookie/kprobe:OK
torvalds#17/2 bpf_cookie/multi_kprobe_link_api:OK
torvalds#17/3 bpf_cookie/multi_kprobe_attach_api:OK
torvalds#17/4 bpf_cookie/uprobe:OK
torvalds#17/5 bpf_cookie/multi_uprobe_attach_api:OK
torvalds#17/6 bpf_cookie/tracepoint:OK
torvalds#17/7 bpf_cookie/perf_event:OK
tracing_subtest:FAIL:fentry.link_create unexpected fentry.link_create: \
actual -524 < expected 0
torvalds#17/8 bpf_cookie/trampoline:FAIL
lsm_subtest:FAIL:lsm.link_create unexpected lsm.link_create: \
actual -524 < expected 0
torvalds#17/9 bpf_cookie/lsm:FAIL
torvalds#17/10 bpf_cookie/tp_btf:OK
torvalds#17/11 bpf_cookie/raw_tp:OK
torvalds#17 bpf_cookie:FAIL
... ...
test_module_fentry_shadow:PASS:load_vmlinux_btf 0 nsec
test_module_fentry_shadow:PASS:get_bpf_testmod_btf_fd 0 nsec
test_module_fentry_shadow:PASS:btf_get_from_fd 0 nsec
test_module_fentry_shadow:PASS:btf_find_by_name 0 nsec
test_module_fentry_shadow:PASS:btf_find_by_name 0 nsec
test_module_fentry_shadow:PASS:bpf_prog_load 0 nsec
test_module_fentry_shadow:FAIL:bpf_link_create unexpected \
bpf_link_create: actual -524 < expected 0
torvalds#168 module_fentry_shadow:FAIL
'''
Just like in ASSERT_OK(), this patch skips ENOTSUPP (524) and ENOTSUP (95)
in ASSERT_GT() too. With this change, the new output of these selftests
look like:
'''
torvalds#17/1 bpf_cookie/kprobe:OK
torvalds#17/2 bpf_cookie/multi_kprobe_link_api:OK
torvalds#17/3 bpf_cookie/multi_kprobe_attach_api:OK
torvalds#17/4 bpf_cookie/uprobe:OK
torvalds#17/5 bpf_cookie/multi_uprobe_attach_api:OK
torvalds#17/6 bpf_cookie/tracepoint:OK
torvalds#17/7 bpf_cookie/perf_event:OK
torvalds#17/8 bpf_cookie/trampoline:SKIP
torvalds#17/9 bpf_cookie/lsm:SKIP
torvalds#17/10 bpf_cookie/tp_btf:SKIP
torvalds#17/11 bpf_cookie/raw_tp:SKIP
torvalds#17 bpf_cookie:OK (SKIP: 4/11)
... ...
torvalds#168 module_fentry_shadow:SKIP
'''
Signed-off-by: Geliang Tang <[email protected]>1 parent a0325a2 commit ef4e04e
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
0 commit comments