summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/seccomp
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-11-03 09:30:38 -0700
committerKees Cook <keescook@chromium.org>2021-11-03 12:02:07 -0700
commit48d5fd06453de57f9d9385c7ebcdf3b50658a962 (patch)
tree03253f03076c5294df461afdcc5cfc476a4f998e /tools/testing/selftests/seccomp
parentd9bbdbf324cda23aa44873f505be77ed4b61d79c (diff)
downloadlinux-48d5fd06453de57f9d9385c7ebcdf3b50658a962.tar.bz2
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
Diffstat (limited to 'tools/testing/selftests/seccomp')
-rw-r--r--tools/testing/selftests/seccomp/seccomp_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 1d64891e6492..d999643d577c 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -4087,7 +4087,7 @@ TEST(user_notification_addfd)
* lowest available fd to be assigned here.
*/
EXPECT_EQ(fd, nextfd++);
- EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
+ ASSERT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
/*
* This sets the ID of the ADD FD to the last request plus 1. The