Skip to content

Commit 48d5fd0

Browse files
committed
selftests/seccomp: Stop USER_NOTIF test if kcmp() fails
If kcmp() fails during the USER_NOTIF test, the test is likely to hang, so switch from EXPECT to ASSERT. Cc: Andy Lutomirski <[email protected]> Cc: Will Drewry <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d9bbdbf commit 48d5fd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/seccomp/seccomp_bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4087,7 +4087,7 @@ TEST(user_notification_addfd)
40874087
* lowest available fd to be assigned here.
40884088
*/
40894089
EXPECT_EQ(fd, nextfd++);
4090-
EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
4090+
ASSERT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
40914091

40924092
/*
40934093
* This sets the ID of the ADD FD to the last request plus 1. The

0 commit comments

Comments
 (0)