summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-05-29 10:03:39 -0700
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-05-29 10:03:39 -0700
commit7a8de1fe25dda6187d68ec6570a831394cb127d1 (patch)
tree32546bffb69b6069af7ed3547fa6c058bb8d9ade /test.c
parent1c29aafd4701b92cd743a1635af640f1f3330689 (diff)
Exit with a non-zero status when tests failed
Diffstat (limited to 'test.c')
-rw-r--r--test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test.c b/test.c
index dae9c7e..ee028cc 100644
--- a/test.c
+++ b/test.c
@@ -704,10 +704,11 @@ int main(int argc, char **argv) {
test_blocking_io_errors(cfg);
test_throughput(cfg);
- if (fails == 0) {
- printf("ALL TESTS PASSED\n");
- } else {
+ if (fails) {
printf("*** %d TESTS FAILED ***\n", fails);
+ return 1;
}
+
+ printf("ALL TESTS PASSED\n");
return 0;
}