OSDN Git Service

proc: return exit code 4 for skipped tests
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 5 Mar 2019 23:50:18 +0000 (15:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:21 +0000 (21:07 -0800)
Test harness uses 4 for SKIP, not 2.

Link: http://lkml.kernel.org/r/20190108193108.GA12259@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/proc/proc-loadavg-001.c
tools/testing/selftests/proc/proc-self-map-files-002.c
tools/testing/selftests/proc/proc-self-syscall.c
tools/testing/selftests/proc/proc-self-wchan.c
tools/testing/selftests/proc/read.c

index fcff704..471e2aa 100644 (file)
@@ -30,7 +30,7 @@ int main(void)
 
        if (unshare(CLONE_NEWPID) == -1) {
                if (errno == ENOSYS || errno == EPERM)
-                       return 2;
+                       return 4;
                return 1;
        }
 
index 8574442..762cb01 100644 (file)
@@ -63,7 +63,7 @@ int main(void)
        p = mmap((void *)va, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0);
        if (p == MAP_FAILED) {
                if (errno == EPERM)
-                       return 2;
+                       return 4;
                return 1;
        }
 
index 5ab5f48..b2993a6 100644 (file)
@@ -39,7 +39,7 @@ int main(void)
        fd = open("/proc/self/syscall", O_RDONLY);
        if (fd == -1) {
                if (errno == ENOENT)
-                       return 2;
+                       return 4;
                return 1;
        }
 
index a38b2fb..b467b98 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
        fd = open("/proc/self/wchan", O_RDONLY);
        if (fd == -1) {
                if (errno == ENOENT)
-                       return 2;
+                       return 4;
                return 1;
        }
 
index 563e752..b2bd8da 100644 (file)
@@ -126,7 +126,7 @@ int main(void)
 
        d = opendir("/proc");
        if (!d)
-               return 2;
+               return 4;
        f(d, 0);
        return 0;
 }