summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Tritton <terry.tritton@linaro.org>2025-05-09 12:56:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 15:31:39 +0200
commit295f1b128c9fb466d6196e8e8f12987b44cee313 (patch)
tree490b29463c571f6e480e0a8aa81fbba12a1ee7c3
parentb038ffbd49e41f99228dbb0c66d6dd7b20292884 (diff)
selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
[ Upstream commit 73989c998814d82c71d523c104c398925470d59e ] TRACE_syscall.ptrace.negative_ENOSYS and TRACE_syscall.seccomp.negative_ENOSYS on arm32 are being reported as failures instead of skipping. The teardown_trace_fixture function sets the test to KSFT_FAIL in case of a non 0 return value from the tracer process. Due to _metadata now being shared between the forked processes the tracer is returning the KSFT_SKIP value set by the tracee which is non 0. Remove the setting of the _metadata.exit_code in teardown_trace_fixture. Fixes: 24cf65a62266 ("selftests/harness: Share _metadata between forked processes") Signed-off-by: Terry Tritton <terry.tritton@linaro.org> Link: https://lore.kernel.org/r/20250509115622.64775-1-terry.tritton@linaro.org Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--tools/testing/selftests/seccomp/seccomp_bpf.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index abc32e4352df..60c84d935a2b 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -1618,14 +1618,8 @@ void teardown_trace_fixture(struct __test_metadata *_metadata,
{
if (tracer) {
int status;
- /*
- * Extract the exit code from the other process and
- * adopt it for ourselves in case its asserts failed.
- */
ASSERT_EQ(0, kill(tracer, SIGUSR1));
ASSERT_EQ(tracer, waitpid(tracer, &status, 0));
- if (WEXITSTATUS(status))
- _metadata->exit_code = KSFT_FAIL;
}
}