Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Skip spin lock failure test on s390x

Instead of adding the whole test to DENYLIST.s390x, which also has
success test cases that should be run, just skip over failure test
cases in case the JIT does not support kfuncs.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20221118185938.2139616-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Kumar Kartikeya Dwivedi and committed by
Alexei Starovoitov
97c11d6e db6bf999

+6
+6
tools/testing/selftests/bpf/prog_tests/spin_lock.c
··· 68 68 if (!ASSERT_ERR(ret, "test_spin_lock_fail__load must fail")) 69 69 goto end; 70 70 71 + /* Skip check if JIT does not support kfuncs */ 72 + if (strstr(log_buf, "JIT does not support calling kernel function")) { 73 + test__skip(); 74 + goto end; 75 + } 76 + 71 77 if (!ASSERT_OK_PTR(strstr(log_buf, err_msg), "expected error message")) { 72 78 fprintf(stderr, "Expected: %s\n", err_msg); 73 79 fprintf(stderr, "Verifier: %s\n", log_buf);