summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-01-04 18:14:42 +0300
committerThomas Weißschuh <linux@weissschuh.net>2026-04-07 10:29:26 +0300
commit598b670af347bc8d998866b1e795e40a3bb168de (patch)
tree339709e8214be7094ea483e272018e123ae85942
parent9a5206f2564128ada61ba1d29aeafa0a439dca00 (diff)
downloadlinux-598b670af347bc8d998866b1e795e40a3bb168de.tar.xz
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
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> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260406-nolibc-no-skip-enosys-v1-2-c046b1ac7d73@weissschuh.net/
-rw-r--r--tools/testing/selftests/nolibc/nolibc-test.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 81cd9f917799..d3c4facb54c0 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -320,10 +320,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);
@@ -363,10 +360,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);
@@ -391,9 +385,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));