From: Kees Jongenburger Date: Fri, 7 Dec 2012 09:49:34 +0000 (+0100) Subject: Allow tests to fail on the first encountered error. X-Git-Tag: v3.2.1~158 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch04.html?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F146%2F1;p=minix.git Allow tests to fail on the first encountered error. Pre increment errct in test to be able to fail on the first error. --- diff --git a/test/common.c b/test/common.c index 2da265d97..7807d79da 100644 --- a/test/common.c +++ b/test/common.c @@ -106,7 +106,7 @@ int n; if (errct == 0) printf("\n"); /* finish header */ printf("Subtest %d, error %d, errno %d: %s\n", subtest, n, errno, strerror(errno)); - if (errct++ > MAX_ERROR) { + if (++errct > MAX_ERROR) { printf("Too many errors; test aborted\n"); cleanup(); exit(1);