Message ID | 786005b19c3700f531bf998cdd75dd8a3a3f2aa7.1720146231.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | skip ENOTSUPP BPF selftests | expand |
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h index d1d77785b165..8ca6cd970676 100644 --- a/tools/testing/selftests/bpf/test_progs.h +++ b/tools/testing/selftests/bpf/test_progs.h @@ -383,7 +383,8 @@ static inline int test_progs_get_error(int error) const void *___res = (ptr); \ int ___err = libbpf_get_error(___res); \ bool ___ok = ___err == 0; \ - CHECK(!___ok, (name), "unexpected error: %d\n", ___err); \ + if (test_progs_get_error(___err)) \ + CHECK(!___ok, (name), "unexpected error: %d\n", ___err);\ ___ok; \ })