linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] proc: return exit code 4 for skipped tests
@ 2019-01-08 19:31 Alexey Dobriyan
  2019-01-08 21:33 ` Thiago Jung Bauermann
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2019-01-08 19:31 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, linux-fsdevel

Test harness uses 4 for SKIP, not 2.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 tools/testing/selftests/proc/proc-loadavg-001.c        |    2 +-
 tools/testing/selftests/proc/proc-self-map-files-002.c |    2 +-
 tools/testing/selftests/proc/proc-self-syscall.c       |    2 +-
 tools/testing/selftests/proc/proc-self-wchan.c         |    2 +-
 tools/testing/selftests/proc/read.c                    |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

--- a/tools/testing/selftests/proc/proc-loadavg-001.c
+++ b/tools/testing/selftests/proc/proc-loadavg-001.c
@@ -30,7 +30,7 @@ int main(void)
 
 	if (unshare(CLONE_NEWPID) == -1) {
 		if (errno == ENOSYS || errno == EPERM)
-			return 2;
+			return 4;
 		return 1;
 	}
 
--- a/tools/testing/selftests/proc/proc-self-map-files-002.c
+++ b/tools/testing/selftests/proc/proc-self-map-files-002.c
@@ -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;
 	}
 
--- a/tools/testing/selftests/proc/proc-self-syscall.c
+++ b/tools/testing/selftests/proc/proc-self-syscall.c
@@ -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;
 	}
 
--- a/tools/testing/selftests/proc/proc-self-wchan.c
+++ b/tools/testing/selftests/proc/proc-self-wchan.c
@@ -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;
 	}
 
--- a/tools/testing/selftests/proc/read.c
+++ b/tools/testing/selftests/proc/read.c
@@ -126,7 +126,7 @@ int main(void)
 
 	d = opendir("/proc");
 	if (!d)
-		return 2;
+		return 4;
 	f(d, 0);
 	return 0;
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] proc: return exit code 4 for skipped tests
  2019-01-08 19:31 [PATCH] proc: return exit code 4 for skipped tests Alexey Dobriyan
@ 2019-01-08 21:33 ` Thiago Jung Bauermann
  2019-01-14 20:11   ` Alexey Dobriyan
  0 siblings, 1 reply; 3+ messages in thread
From: Thiago Jung Bauermann @ 2019-01-08 21:33 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: akpm, linux-kernel, linux-fsdevel


Alexey Dobriyan <adobriyan@gmail.com> writes:

> Test harness uses 4 for SKIP, not 2.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
>  tools/testing/selftests/proc/proc-loadavg-001.c        |    2 +-
>  tools/testing/selftests/proc/proc-self-map-files-002.c |    2 +-
>  tools/testing/selftests/proc/proc-self-syscall.c       |    2 +-
>  tools/testing/selftests/proc/proc-self-wchan.c         |    2 +-
>  tools/testing/selftests/proc/read.c                    |    2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
>
> --- a/tools/testing/selftests/proc/proc-loadavg-001.c
> +++ b/tools/testing/selftests/proc/proc-loadavg-001.c
> @@ -30,7 +30,7 @@ int main(void)
>
>  	if (unshare(CLONE_NEWPID) == -1) {
>  		if (errno == ENOSYS || errno == EPERM)
> -			return 2;
> +			return 4;
>  		return 1;
>  	}

Can't these tests use the KSFT_SKIP macro defined in kselftest.h?

--
Thiago Jung Bauermann
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] proc: return exit code 4 for skipped tests
  2019-01-08 21:33 ` Thiago Jung Bauermann
@ 2019-01-14 20:11   ` Alexey Dobriyan
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2019-01-14 20:11 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: akpm, linux-kernel, linux-fsdevel

On Tue, Jan 08, 2019 at 07:33:19PM -0200, Thiago Jung Bauermann wrote:
> Alexey Dobriyan <adobriyan@gmail.com> writes:
> > --- a/tools/testing/selftests/proc/proc-loadavg-001.c
> > +++ b/tools/testing/selftests/proc/proc-loadavg-001.c
> > @@ -30,7 +30,7 @@ int main(void)
> >
> >  	if (unshare(CLONE_NEWPID) == -1) {
> >  		if (errno == ENOSYS || errno == EPERM)
> > -			return 2;
> > +			return 4;
> >  		return 1;
> >  	}
> 
> Can't these tests use the KSFT_SKIP macro defined in kselftest.h?

They can! I tried to find a single use of XPASS and XFAIL and failed and
now I just don't want to have anything to do with that header.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-14 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08 19:31 [PATCH] proc: return exit code 4 for skipped tests Alexey Dobriyan
2019-01-08 21:33 ` Thiago Jung Bauermann
2019-01-14 20:11   ` Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).