From 24dc7fe0c008f1261cd34522f7fa2c23a2dedbe9 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 1 Feb 2017 00:47:30 +0100 Subject: [PATCH] bntest: do not stop on first fautl encountered Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2335) --- test/bntest.c | 11 ++++------- 1 file 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[]) -- 2.25.1