From: Richard Levitte Date: Tue, 31 Jan 2017 23:47:30 +0000 (+0100) Subject: bntest: do not stop on first fautl encountered X-Git-Tag: OpenSSL_1_1_1-pre1~2506 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=24dc7fe0c008f1261cd34522f7fa2c23a2dedbe9;p=oweals%2Fopenssl.git bntest: do not stop on first fautl encountered Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2335) --- diff --git a/test/bntest.c b/test/bntest.c index 76e91e67c0..0c15a129ce 100644 --- a/test/bntest.c +++ b/test/bntest.c @@ -2195,7 +2195,7 @@ static int file_test_run(STANZA *s) static int file_tests() { STANZA s; - int linesread = 0, result = 0; + int linesread = 0, errcnt = 0; /* Read test file. */ memset(&s, 0, sizeof(s)); @@ -2203,17 +2203,14 @@ static int file_tests() if (s.numpairs == 0) continue; if (!file_test_run(&s)) { - if (result == 0) - fprintf(stderr, "Test at %d failed\n", s.start); - goto err; + fprintf(stderr, "Test at %d failed\n", s.start); + errcnt++; } clearstanza(&s); s.start = linesread; } - result = 1; -err: - return result; + return errcnt == 0; } int test_main(int argc, char *argv[])