OSDN Git Service

selftests/seccomp: Abort without user notification support
authorKees Cook <keescook@chromium.org>
Thu, 17 Jan 2019 00:35:25 +0000 (16:35 -0800)
committerShuah Khan <shuah@kernel.org>
Thu, 17 Jan 2019 18:00:23 +0000 (11:00 -0700)
commit3d244c192afeee7dd4f5fb1b916ea4e47420d401
treeeac7f01bb07996a0c0a8ff42283e8106a138a5d4
parent508cacd7da6659ae7b7bdd0a335f675422277758
selftests/seccomp: Abort without user notification support

In the face of missing user notification support, the self test needs
to stop executing a test (ASSERT_*) instead of just reporting and
continuing (EXPECT_*). This adjusts the user notification tests to do
that where needed.

Reported-by: Shuah Khan <shuah@kernel.org>
Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace")
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Tycho Andersen <tycho@tycho.ws>
Tested-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
tools/testing/selftests/seccomp/seccomp_bpf.c