summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorČestmír Kalina <ckalina@redhat.com>2022-10-21 19:49:21 +0200
committerČestmír Kalina <ckalina@redhat.com>2022-10-21 19:57:16 +0200
commit4f32754f79d697e3af78d821296fd02fbba6e186 (patch)
tree5dbd9b14b43425fbb1b3894f4c3ff3b37b228e39 /test
parent3a09dfb4f9aace93d2c20d6d1b4968cc583884d6 (diff)
crypto: thread: remove ossl_crypto_thread_native_terminate
Signed-off-by: Čestmír Kalina <ckalina@redhat.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19473)
Diffstat (limited to 'test')
-rw-r--r--test/threadstest.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/test/threadstest.c b/test/threadstest.c
index cd1277082c..e7b293f0a3 100644
--- a/test/threadstest.c
+++ b/test/threadstest.c
@@ -784,19 +784,6 @@ static uint32_t test_thread_native_fn(void *data)
*ldata = *ldata + 1;
return *ldata - 1;
}
-
-static uint32_t test_thread_noreturn(void *data)
-{
- while (1) {
- OSSL_sleep(1000);
- }
-
- /* unreachable */
- OPENSSL_die("test_thread_noreturn", __FILE__, __LINE__);
-
- return 0;
-}
-
/* Tests of native threads */
static int test_thread_native(void)
@@ -805,7 +792,7 @@ static int test_thread_native(void)
uint32_t local;
CRYPTO_THREAD *t;
- /* thread spawn, join and termination */
+ /* thread spawn, join */
local = 1;
t = ossl_crypto_thread_native_start(test_thread_native_fn, &local, 1);
@@ -826,14 +813,6 @@ static int test_thread_native(void)
if (!TEST_int_eq(retval, 1) || !TEST_int_eq(local, 2))
return 0;
- if (!TEST_int_eq(ossl_crypto_thread_native_terminate(t), 1))
- return 0;
- if (!TEST_int_eq(ossl_crypto_thread_native_terminate(t), 1))
- return 0;
-
- if (!TEST_int_eq(ossl_crypto_thread_native_join(t, &retval), 0))
- return 0;
-
if (!TEST_int_eq(ossl_crypto_thread_native_clean(t), 1))
return 0;
t = NULL;
@@ -841,16 +820,6 @@ static int test_thread_native(void)
if (!TEST_int_eq(ossl_crypto_thread_native_clean(t), 0))
return 0;
- /* termination of a long running thread */
-
- t = ossl_crypto_thread_native_start(test_thread_noreturn, NULL, 1);
- if (!TEST_ptr(t))
- return 0;
- if (!TEST_int_eq(ossl_crypto_thread_native_terminate(t), 1))
- return 0;
- if (!TEST_int_eq(ossl_crypto_thread_native_clean(t), 1))
- return 0;
-
return 1;
}