diff options
author | Richard Levitte <levitte@openssl.org> | 2017-02-01 00:47:30 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-02-01 02:03:29 +0100 |
commit | 24dc7fe0c008f1261cd34522f7fa2c23a2dedbe9 (patch) | |
tree | 8fe4e1fc4ff66a86347092ee834f0aca40981785 /test | |
parent | ceac1975357f9a716e4c7f0fee61511bd1bf7034 (diff) |
bntest: do not stop on first fautl encountered
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2335)
Diffstat (limited to 'test')
-rw-r--r-- | test/bntest.c | 11 |
1 files changed, 4 insertions, 7 deletions
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[]) |