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:
parent
53f1f3e4a8
commit
d8e600db17
@ -106,7 +106,7 @@ int n;
|
|||||||
if (errct == 0) printf("\n"); /* finish header */
|
if (errct == 0) printf("\n"); /* finish header */
|
||||||
printf("Subtest %d, error %d, errno %d: %s\n",
|
printf("Subtest %d, error %d, errno %d: %s\n",
|
||||||
subtest, n, errno, strerror(errno));
|
subtest, n, errno, strerror(errno));
|
||||||
if (errct++ > MAX_ERROR) {
|
if (++errct > MAX_ERROR) {
|
||||||
printf("Too many errors; test aborted\n");
|
printf("Too many errors; test aborted\n");
|
||||||
cleanup();
|
cleanup();
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user