summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-01-12 14:24:49 +1100
committerPauli <pauli@openssl.org>2022-01-13 21:46:34 +1100
commit1fc97807d3a3b5e3065a7df80d1ad3601ccc5e2f (patch)
treed628f6f86d94df505d5f31f1b454a9fd947dc42d /test
parent9c5d1451292566e546d5dd01c7f19950fa34391d (diff)
threadstest: add write check to lock checking
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/17479)
Diffstat (limited to 'test')
-rw-r--r--test/threadstest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/threadstest.c b/test/threadstest.c
index 73cc072af1..8e6aaf5404 100644
--- a/test/threadstest.c
+++ b/test/threadstest.c
@@ -62,6 +62,8 @@ static int test_lock(void)
int res;
res = TEST_true(CRYPTO_THREAD_read_lock(lock))
+ && TEST_true(CRYPTO_THREAD_unlock(lock))
+ && TEST_true(CRYPTO_THREAD_write_lock(lock))
&& TEST_true(CRYPTO_THREAD_unlock(lock));
CRYPTO_THREAD_lock_free(lock);