diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-10-24 12:28:58 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-10-27 18:39:29 +0200 |
commit | d8eb0e1988aba5d86aa6570357853cad0ab3f532 (patch) | |
tree | cc081e112df831faddc2558d27d823d84d665339 /test/testutil | |
parent | c8c678e7d91ca2cea41c6c574cf7656a9404646f (diff) | |
download | openssl-new-d8eb0e1988aba5d86aa6570357853cad0ab3f532.tar.gz |
tests: clear error queue before executing a testcase
There can be errors in the queue from previous tests and
we look at it to verify we do not add spurious errors in
some testcases.
Fixes #19477
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19483)
(cherry picked from commit 4bae06d47ae26b37a948d31f11884e1813f6d669)
Diffstat (limited to 'test/testutil')
-rw-r--r-- | test/testutil/driver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/testutil/driver.c b/test/testutil/driver.c index efb5785d7d..6427d235af 100644 --- a/test/testutil/driver.c +++ b/test/testutil/driver.c @@ -331,6 +331,7 @@ int run_tests(const char *test_prog_name) test_flush_tapout(); } else if (all_tests[i].num == -1) { set_test_title(all_tests[i].test_case_name); + ERR_clear_error(); verdict = all_tests[i].test_fn(); finalize(verdict != 0); test_verdict(verdict, "%d - %s", test_case_count + 1, test_title); @@ -365,6 +366,7 @@ int run_tests(const char *test_prog_name) j = (j + jstep) % all_tests[i].num; if (single_iter != -1 && ((jj + 1) != single_iter)) continue; + ERR_clear_error(); v = all_tests[i].param_test_fn(j); if (v == 0) { |