]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 4 Jan 2026 15:14:42 +0000 (16:14 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Tue, 7 Apr 2026 07:29:26 +0000 (09:29 +0200)
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/
tools/testing/selftests/nolibc/nolibc-test.c

index 81cd9f917799cd6418e38b7a9c0b89e56c4266fc..d3c4facb54c079749282dc64bc0b4f7589019fca 100644 (file)
@@ -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));