Skip to content

Commit 73989c9

Browse files
Obsnoldkees
authored andcommitted
selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
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: 24cf65a ("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>
1 parent 797002d commit 73989c9

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

tools/testing/selftests/seccomp/seccomp_bpf.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,14 +1629,8 @@ void teardown_trace_fixture(struct __test_metadata *_metadata,
16291629
{
16301630
if (tracer) {
16311631
int status;
1632-
/*
1633-
* Extract the exit code from the other process and
1634-
* adopt it for ourselves in case its asserts failed.
1635-
*/
16361632
ASSERT_EQ(0, kill(tracer, SIGUSR1));
16371633
ASSERT_EQ(tracer, waitpid(tracer, &status, 0));
1638-
if (WEXITSTATUS(status))
1639-
_metadata->exit_code = KSFT_FAIL;
16401634
}
16411635
}
16421636

0 commit comments

Comments
 (0)