aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Arcangeli <[email protected]>2017-09-06 16:23:49 -0700
committerLinus Torvalds <[email protected]>2017-09-06 17:27:29 -0700
commitd312cb1e4884c606bafe6499fade2f91ccc2e944 (patch)
tree9e7215020c556e38038148345b458d4afb3a5d76
parent67e803281d1ce26daee4f1c0a489cad27b2a583c (diff)
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/[email protected] Signed-off-by: Andrea Arcangeli <[email protected]> Cc: "Dr. David Alan Gilbert" <[email protected]> Cc: Alexey Perevalov <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--tools/testing/selftests/vm/userfaultfd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
index 4549ae425f3e..a2c53a3d223d 100644
--- a/tools/testing/selftests/vm/userfaultfd.c
+++ b/tools/testing/selftests/vm/userfaultfd.c
@@ -987,7 +987,9 @@ static int userfaultfd_sig_test(void)
return 1;
printf("done.\n");
- printf(" Signal test userfaults: %ld\n", userfaults);
+ if (userfaults)
+ fprintf(stderr, "Signal test failed, userfaults: %ld\n",
+ userfaults);
close(uffd);
return userfaults != 0;
}