From 52c2a8909baaa49f3d4e1b5467a75970d04278ca Mon Sep 17 00:00:00 2001 From: anpeiyun Date: Sun, 26 Oct 2025 11:29:33 +0800 Subject: [PATCH] ostest/spinlock: Check the return value. This commit added checking for the return value. Signed-off-by: anpeiyun --- testing/ostest/spinlock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/ostest/spinlock.c b/testing/ostest/spinlock.c index df691d7ca..7d66b64b6 100644 --- a/testing/ostest/spinlock.c +++ b/testing/ostest/spinlock.c @@ -149,7 +149,11 @@ static inline void run_test_thread( { param[i].pub = &pub; param[i].delta = 0; - pthread_create(&tid[i], NULL, thread_func, ¶m[i]); + ret = pthread_create(&tid[i], NULL, thread_func, ¶m[i]); + if (ret != 0) + { + ASSERT(false); + } } ret = pthread_barrier_wait(&pub.barrier);