Message ID | 9f722006ec00357ecbc1ecfa02e7fcefbf297f90.1720075006.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | skip ENOTSUPP for BPF selftests | expand |
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h index 25f6976c08b5..464aa12feada 100644 --- a/tools/testing/selftests/bpf/test_progs.h +++ b/tools/testing/selftests/bpf/test_progs.h @@ -369,7 +369,10 @@ int test__join_cgroup(const char *path); const void *___res = (ptr); \ int ___err = libbpf_get_error(___res); \ bool ___ok = ___err == 0; \ - CHECK(!___ok, (name), "unexpected error: %d\n", ___err); \ + if (___err == -ENOTSUPP || ___err == -ENOTSUP) \ + test__skip(); \ + else \ + CHECK(!___ok, (name), "unexpected error: %d\n", ___err);\ ___ok; \ })