* [PATCH] selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
@ 2025-05-09 11:56 Terry Tritton
2025-05-09 19:16 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Terry Tritton @ 2025-05-09 11:56 UTC (permalink / raw)
To: Kees Cook, Andy Lutomirski, Will Drewry, Shuah Khan
Cc: linux-kselftest, linux-kernel, Terry Tritton
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>
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index b2f76a52215a..c43a6f8f8cd5 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -1629,14 +1629,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;
}
}
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
2025-05-09 11:56 [PATCH] selftests/seccomp: fix negative_ENOSYS tracer tests on arm32 Terry Tritton
@ 2025-05-09 19:16 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2025-05-09 19:16 UTC (permalink / raw)
To: Andy Lutomirski, Will Drewry, Shuah Khan, Terry Tritton
Cc: Kees Cook, linux-kselftest, linux-kernel
On Fri, 09 May 2025 12:56:22 +0100, Terry Tritton wrote:
> 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.
>
> [...]
Ooh yes, nice catch!
Applied to for-next/seccomp, thanks!
[1/1] selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
https://git.kernel.org/kees/c/73989c998814
Take care,
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-09 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-09 11:56 [PATCH] selftests/seccomp: fix negative_ENOSYS tracer tests on arm32 Terry Tritton
2025-05-09 19:16 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®