Skip to content

Commit

Permalink
selftests/bpf: Skip spin lock failure test on s390x
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
  • Loading branch information
kkdwivedi authored and Alexei Starovoitov committed Nov 18, 2022
1 parent db6bf99 commit 97c11d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/testing/selftests/bpf/prog_tests/spin_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ static void test_spin_lock_fail_prog(const char *prog_name, const char *err_msg)
if (!ASSERT_ERR(ret, "test_spin_lock_fail__load must fail"))
goto end;

/* Skip check if JIT does not support kfuncs */
if (strstr(log_buf, "JIT does not support calling kernel function")) {
test__skip();
goto end;
}

if (!ASSERT_OK_PTR(strstr(log_buf, err_msg), "expected error message")) {
fprintf(stderr, "Expected: %s\n", err_msg);
fprintf(stderr, "Verifier: %s\n", log_buf);
Expand Down

0 comments on commit 97c11d6

Please sign in to comment.