]> git.dujemihanovic.xyz Git - linux.git/commitdiff
bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test
authorJiri Olsa <jolsa@kernel.org>
Fri, 26 Jul 2024 18:08:47 +0000 (20:08 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 30 Jul 2024 20:42:24 +0000 (13:42 -0700)
Fixing ASSERT_OK condition check in uprobe_syscall test,
otherwise we return from test on pipe success.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/bpf/20240726180847.684584-1-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c

index bd8c75b620c29d20c358ecf5c57cd9f54d9aa9a4..797de47f8197562c17bfd63d053d74d63f8fc131 100644 (file)
@@ -253,7 +253,7 @@ static void test_uretprobe_syscall_call(void)
        struct uprobe_syscall_executed *skel;
        int pid, status, err, go[2], c;
 
-       if (ASSERT_OK(pipe(go), "pipe"))
+       if (!ASSERT_OK(pipe(go), "pipe"))
                return;
 
        skel = uprobe_syscall_executed__open_and_load();