Commit d312cb1e authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds

userfaultfd: selftest: explicit failure if the SIGBUS test failed

Showing zero in the output isn't very self explanatory as a successful
result.  Show a more explicit error output if the test fails.

Link: http://lkml.kernel.org/r/20170802165145.22628-4-aarcange@redhat.comSigned-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Alexey Perevalov <a.perevalov@samsung.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 67e80328
...@@ -987,7 +987,9 @@ static int userfaultfd_sig_test(void) ...@@ -987,7 +987,9 @@ static int userfaultfd_sig_test(void)
return 1; return 1;
printf("done.\n"); printf("done.\n");
printf(" Signal test userfaults: %ld\n", userfaults); if (userfaults)
fprintf(stderr, "Signal test failed, userfaults: %ld\n",
userfaults);
close(uffd); close(uffd);
return userfaults != 0; return userfaults != 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment