Skip to content

Commit 19aa37f

Browse files
committed
selftests/bpf: Skip stream_deadlock test if unsupported
Test stream_deadlock currently fails on 32-bit armhf: run_subtest:PASS:obj_open_mem 0 nsec run_subtest:PASS:unexpected_load_failure 0 nsec do_prog_test_run:PASS:bpf_prog_test_run 0 nsec get_stream:FAIL:stream read unexpected stream read: actual 0 <= expected 0 run_subtest:FAIL:1201 Unexpected retval from get_stream(): 0, errno = 95 torvalds#399/3 stream_success/stream_deadlock:FAIL This fails because the test depends on arch_bpf_stack_walk() i.e. support for BPF Exceptions, which is only availble on x86_64, arm64 and s390x. Update the BPF source with tags for these 3 archs so the test is skipped when unsupported, as with test stream_cond_break and "may_goto" support: root@qemu-armhf:/usr/libexec/kselftests-bpf# ./test_progs -t stream torvalds#398/1 stream_failure/stream_vprintk_null_arg:OK torvalds#398/2 stream_failure/stream_vprintk_scalar_arg:OK torvalds#398/3 stream_failure/stream_vprintk_string_arg:OK torvalds#398 stream_failure:OK torvalds#399/1 stream_success/stream_exhaust:OK torvalds#399/2 stream_success/stream_cond_break:SKIP torvalds#399/3 stream_success/stream_deadlock:SKIP torvalds#399/4 stream_success/stream_syscall:OK torvalds#399 stream_success:OK (SKIP: 2/4) torvalds#400 stream_syscall:OK Summary: 3/5 PASSED, 2 SKIPPED, 0 FAILED Signed-off-by: Tony Ambardar <[email protected]>
1 parent 1d0f093 commit 19aa37f

File tree

1 file changed

+3
-0
lines changed
  • tools/testing/selftests/bpf/progs

1 file changed

+3
-0
lines changed

tools/testing/selftests/bpf/progs/stream.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ int stream_cond_break(void *ctx)
5454
}
5555

5656
SEC("syscall")
57+
__arch_x86_64
58+
__arch_arm64
59+
__arch_s390x
5760
__success __retval(0)
5861
__stderr("ERROR: AA or ABBA deadlock detected for bpf_res_spin_lock")
5962
__stderr("{{Attempted lock = (0x[0-9a-fA-F]+)\n"

0 commit comments

Comments
 (0)