summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/threadstest.c14
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);