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:51:42 +1100
commit3517a3e055d3ed27b70441e2ee087fbb709b58da (patch)
tree5a6b922909052d43c8baadbb219566e35c169e05 /test
parentcca25d5eb83b56ae27d81bd72bebf69c2f393e43 (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 b7e781fb6b..bfda43d891 100644
--- a/test/threadstest.c
+++ b/test/threadstest.c
@@ -33,6 +33,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);