Allow tests to fail on the first encountered error.

Pre increment errct in test to be able to fail on the first error.
This commit is contained in:
Kees Jongenburger 2012-12-07 10:49:34 +01:00
parent 53f1f3e4a8
commit d8e600db17

View file

@ -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);