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 <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Cc: linux-kselftest@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Link: https://lore.kernel.org/r/20211103163039.2104830-2-keescook@chromium.org
1 parent d9bbdbf commit 48d5fd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)