* [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore
@ 2026-04-06 20:02 Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 1/2] selftests/nolibc: explicitly handle ENOSYS from ptrace() Thomas Weißschuh
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2026-04-06 20:02 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, Thomas Weißschuh
The automatic skipping of tests on ENOSYS returns was introduced in
commit 349afc8a52f8 ("selftests/nolibc: skip tests for unimplemented
syscalls"). It handled the fact that nolibc would return ENOSYS for many
syscall wrappers on riscv32.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (2):
selftests/nolibc: explicitly handle ENOSYS from ptrace()
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
tools/testing/selftests/nolibc/nolibc-test.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
---
base-commit: baed22472e84754e1e230fe89862aa516f6550eb
change-id: 20260104-nolibc-no-skip-enosys-7aa71004115b
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] selftests/nolibc: explicitly handle ENOSYS from ptrace()
2026-04-06 20:02 [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
@ 2026-04-06 20:02 ` Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 2/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
2026-04-07 7:21 ` [PATCH 0/2] " Willy Tarreau
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2026-04-06 20:02 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, Thomas Weißschuh
The automatic ENOSYS handling in EXPECT_SYSER() is about to be removed.
ptrace() will return legitimately return ENOSYS on qemu-user, so handle
it explicitly.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/nolibc/nolibc-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index dd10402267ee..9f24b98fb578 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -1504,7 +1504,7 @@ int run_syscall(int min, int max)
CASE_TEST(readv_zero); EXPECT_SYSZR(1, readv(0, NULL, 0)); break;
CASE_TEST(writev_badf); EXPECT_SYSER(1, writev(-1, &iov_one, 1), -1, EBADF); break;
CASE_TEST(writev_zero); EXPECT_SYSZR(1, writev(1, NULL, 0)); break;
- CASE_TEST(ptrace); EXPECT_SYSER(1, ptrace(PTRACE_CONT, getpid(), NULL, NULL), -1, ESRCH); break;
+ CASE_TEST(ptrace); tmp = ptrace(PTRACE_CONT, getpid(), NULL, NULL); EXPECT_SYSER(tmp != -1 && errno != ENOSYS, tmp, -1, EFAULT); break;
CASE_TEST(syscall_noargs); EXPECT_SYSEQ(1, syscall(__NR_getpid), getpid()); break;
CASE_TEST(syscall_args); EXPECT_SYSER(1, syscall(__NR_statx, 0, NULL, 0, 0, NULL), -1, EFAULT); break;
CASE_TEST(namespace); EXPECT_SYSZR(euid0 && proc, test_namespace()); break;
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore
2026-04-06 20:02 [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 1/2] selftests/nolibc: explicitly handle ENOSYS from ptrace() Thomas Weißschuh
@ 2026-04-06 20:02 ` Thomas Weißschuh
2026-04-07 7:21 ` [PATCH 0/2] " Willy Tarreau
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2026-04-06 20:02 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, Thomas Weißschuh
The automatic skipping of tests on ENOSYS returns was introduced in
commit 349afc8a52f8 ("selftests/nolibc: skip tests for unimplemented
syscalls"). It handled the fact that nolibc would return ENOSYS for many
syscall wrappers on riscv32.
Nowadays nolibc handles all these correctly, so this logic is not used
anymore. To make missing nolibc functionality more obvious fail the
tests again if something is not implemented.
Revert the mentioned commit again.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/nolibc/nolibc-test.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 9f24b98fb578..15a100c07504 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -314,10 +314,7 @@ int expect_syszr(int expr, int llen)
{
int ret = 0;
- if (errno == ENOSYS) {
- llen += printf(" = ENOSYS");
- result(llen, SKIPPED);
- } else if (expr) {
+ if (expr) {
ret = 1;
llen += printf(" = %d %s ", expr, errorname(errno));
result(llen, FAIL);
@@ -357,10 +354,7 @@ int expect_sysne(int expr, int llen, int val)
{
int ret = 0;
- if (errno == ENOSYS) {
- llen += printf(" = ENOSYS");
- result(llen, SKIPPED);
- } else if (expr == val) {
+ if (expr == val) {
ret = 1;
llen += printf(" = %d %s ", expr, errorname(errno));
result(llen, FAIL);
@@ -385,9 +379,7 @@ int expect_syserr2(int expr, int expret, int experr1, int experr2, int llen)
int _errno = errno;
llen += printf(" = %d %s ", expr, errorname(_errno));
- if (errno == ENOSYS) {
- result(llen, SKIPPED);
- } else if (expr != expret || (_errno != experr1 && _errno != experr2)) {
+ if (expr != expret || (_errno != experr1 && _errno != experr2)) {
ret = 1;
if (experr2 == 0)
llen += printf(" != (%d %s) ", expret, errorname(experr1));
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore
2026-04-06 20:02 [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 1/2] selftests/nolibc: explicitly handle ENOSYS from ptrace() Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 2/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
@ 2026-04-07 7:21 ` Willy Tarreau
2 siblings, 0 replies; 4+ messages in thread
From: Willy Tarreau @ 2026-04-07 7:21 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-kernel
On Mon, Apr 06, 2026 at 10:02:36PM +0200, Thomas Weißschuh wrote:
> The automatic skipping of tests on ENOSYS returns was introduced in
> commit 349afc8a52f8 ("selftests/nolibc: skip tests for unimplemented
> syscalls"). It handled the fact that nolibc would return ENOSYS for many
> syscall wrappers on riscv32.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
thanks!
Willy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-07 7:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 20:02 [PATCH 0/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 1/2] selftests/nolibc: explicitly handle ENOSYS from ptrace() Thomas Weißschuh
2026-04-06 20:02 ` [PATCH 2/2] selftests/nolibc: don't skip tests for unimplemented syscalls anymore Thomas Weißschuh
2026-04-07 7:21 ` [PATCH 0/2] " Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox