Skip to contentSkip to conversation

bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test

PATCH Applied Jiri Olsa 3 participants 3 messages Jul 26, 2024 – Jul 30, 2024

Subsystems (3)
lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test

Fixing ASSERT_OK condition check in uprobe_syscall test, otherwise we return from test on pipe success.

---
 tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c +1 -1
index bd8c75b620c2..797de47f8197 100644
@@ -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();
Signature · 1 line
2.45.2
#2 lore raw
In reply to Jiri Olsa
This patch was applied to bpf/bpf.git (master) by Andrii Nakryiko <[email protected]>:

Hello:

This patch was applied to bpf/bpf.git (master)
by Andrii Nakryiko <[email protected]>:

Quoted 7 lines · On Fri, 26 Jul 2024 20:08:47 +0200 you wrote:

Fixing ASSERT_OK condition check in uprobe_syscall test, otherwise we return from test on pipe success.

---
 tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [bpf] bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test

    https://git.kernel.org/bpf/bpf/c/7764b9622db4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html