Message ID | da8ce034fbb6b60095076a1829af1a98e7f028cc.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/prog_tests/d_path.c b/tools/testing/selftests/bpf/prog_tests/d_path.c index ccc768592e66..78110075b485 100644 --- a/tools/testing/selftests/bpf/prog_tests/d_path.c +++ b/tools/testing/selftests/bpf/prog_tests/d_path.c @@ -129,7 +129,7 @@ static void test_d_path_basic(void) goto cleanup; err = test_d_path__attach(skel); - if (CHECK(err, "setup", "attach failed: %d\n", err)) + if (!ASSERT_OK(err, "setup")) goto cleanup; bss = skel->bss; diff --git a/tools/testing/selftests/bpf/prog_tests/module_attach.c b/tools/testing/selftests/bpf/prog_tests/module_attach.c index 6d391d95f96e..4aab747ad202 100644 --- a/tools/testing/selftests/bpf/prog_tests/module_attach.c +++ b/tools/testing/selftests/bpf/prog_tests/module_attach.c @@ -62,7 +62,7 @@ void test_module_attach(void) bss = skel->bss; err = test_module_attach__attach(skel); - if (CHECK(err, "skel_attach", "skeleton attach failed: %d\n", err)) + if (!ASSERT_OK(err, "skel_attach")) goto cleanup; /* trigger tracepoint */ diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf.c b/tools/testing/selftests/bpf/prog_tests/ringbuf.c index 4c6f42dae409..ee7deb76b60a 100644 --- a/tools/testing/selftests/bpf/prog_tests/ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/ringbuf.c @@ -161,7 +161,7 @@ static void ringbuf_subtest(void) goto cleanup; err = test_ringbuf_lskel__attach(skel); - if (CHECK(err, "skel_attach", "skeleton attachment failed: %d\n", err)) + if (!ASSERT_OK(err, "skel_attach")) goto cleanup; trigger_samples(); diff --git a/tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c b/tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c index a0054019e677..40a86a303c1a 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c @@ -88,7 +88,7 @@ void test_test_bprm_opts(void) goto close_prog; err = bprm_opts__attach(skel); - if (CHECK(err, "attach", "attach failed: %d\n", err)) + if (!ASSERT_OK(err, "attach")) goto close_prog; /* Run the test with the secureexec bit unset */ diff --git a/tools/testing/selftests/bpf/prog_tests/test_ima.c b/tools/testing/selftests/bpf/prog_tests/test_ima.c index 810b14981c2e..2a6c388fe29d 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_ima.c +++ b/tools/testing/selftests/bpf/prog_tests/test_ima.c @@ -83,7 +83,7 @@ void test_test_ima(void) goto close_prog; err = ima__attach(skel); - if (CHECK(err, "attach", "attach failed: %d\n", err)) + if (!ASSERT_OK(err, "attach")) goto close_prog; measured_dir = mkdtemp(measured_dir_template); diff --git a/tools/testing/selftests/bpf/prog_tests/trace_ext.c b/tools/testing/selftests/bpf/prog_tests/trace_ext.c index aabdff7bea3e..d006c0b91178 100644 --- a/tools/testing/selftests/bpf/prog_tests/trace_ext.c +++ b/tools/testing/selftests/bpf/prog_tests/trace_ext.c @@ -60,7 +60,7 @@ void test_trace_ext(void) } err = test_trace_ext__attach(skel_ext); - if (CHECK(err, "setup", "freplace/test_pkt_md_access attach failed: %d\n", err)) + if (!ASSERT_OK(err, "setup replace/test_pkt_md_access attach")) goto cleanup; prog = skel_ext->progs.test_pkt_md_access_new;