]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
threadstest: add write check to lock checking
authorPauli <pauli@openssl.org>
Wed, 12 Jan 2022 03:24:49 +0000 (14:24 +1100)
committerPauli <pauli@openssl.org>
Thu, 13 Jan 2022 10:46:34 +0000 (21:46 +1100)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/17479)

test/threadstest.c

index 73cc072af1dfcc09b15e08f9f44ba3bb435c7c0d..8e6aaf5404f5fffee470949336114a052a3fc2f4 100644 (file)
@@ -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);