diff options
author | Rich Salz <rsalz@akamai.com> | 2021-06-10 16:06:10 -0400 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-06-16 15:43:48 +0100 |
commit | c3932c34cde5a152baeecd24d2395b4ad205a6d8 (patch) | |
tree | e3c5cd415ac609117ed703e897989badd6559184 /test | |
parent | 218e9969fd90ded078a1a558c110cd14e2272a35 (diff) |
Always wait for both threads to finish
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15708)
Diffstat (limited to 'test')
-rw-r--r-- | test/threadstest.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/threadstest.c b/test/threadstest.c index cb9817aa28..ce31738189 100644 --- a/test/threadstest.c +++ b/test/threadstest.c @@ -441,12 +441,16 @@ static int test_multi(int idx) worker(); - if (!TEST_true(wait_for_thread(thread1)) - || !TEST_true(wait_for_thread(thread2)) - || !TEST_true(multi_success)) - goto err; - testresult = 1; + /* + * Don't combine these into one if statement; must wait for both threads. + */ + if (!TEST_true(wait_for_thread(thread1))) + testresult = 0; + if (!TEST_true(wait_for_thread(thread2))) + testresult = 0; + if (!TEST_true(multi_success)) + testresult = 0; err: EVP_MD_free(sha256); |