selftests/bpf: test_progs: remove global fail/success counts
[muen/linux.git] / tools / testing / selftests / bpf / prog_tests / stacktrace_map_raw_tp.c
index fbfa8e7..404a549 100644 (file)
@@ -26,15 +26,15 @@ void test_stacktrace_map_raw_tp(void)
 
        /* find map fds */
        control_map_fd = bpf_find_map(__func__, obj, "control_map");
-       if (control_map_fd < 0)
+       if (CHECK_FAIL(control_map_fd < 0))
                goto close_prog;
 
        stackid_hmap_fd = bpf_find_map(__func__, obj, "stackid_hmap");
-       if (stackid_hmap_fd < 0)
+       if (CHECK_FAIL(stackid_hmap_fd < 0))
                goto close_prog;
 
        stackmap_fd = bpf_find_map(__func__, obj, "stackmap");
-       if (stackmap_fd < 0)
+       if (CHECK_FAIL(stackmap_fd < 0))
                goto close_prog;
 
        /* give some time for bpf program run */
@@ -58,10 +58,7 @@ void test_stacktrace_map_raw_tp(void)
                  "err %d errno %d\n", err, errno))
                goto close_prog;
 
-       goto close_prog_noerr;
 close_prog:
-       error_cnt++;
-close_prog_noerr:
        if (!IS_ERR_OR_NULL(link))
                bpf_link__destroy(link);
        bpf_object__close(obj);