From f455b420848fd2b7ccae523da84d0f48a4dc9e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Franch?= Date: Sat, 10 Oct 2026 08:57:08 +0200 Subject: [PATCH] test(libkernel): check the Linux host thread handle in pthread start coverage Co-Authored-By: Claude --- core/libs/tests/PthreadStart.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/libs/tests/PthreadStart.cpp b/core/libs/tests/PthreadStart.cpp index 6aa3877a1..8750d5eb5 100644 --- a/core/libs/tests/PthreadStart.cpp +++ b/core/libs/tests/PthreadStart.cpp @@ -41,8 +41,7 @@ static void* APS5_VABI CheckThread(void* arg) { if (context.thread->threadId != std::this_thread::get_id() || !context.thread->nativeHandle) throw std::runtime_error("Native thread was not initialized"); #else - if (context.thread->_thr.get_id() != std::this_thread::get_id()) throw std::runtime_error("Thread object was not initialized"); - if (!context.thread->_thr.joinable()) throw std::runtime_error("Thread object is not joinable"); + if (!pthread_equal(context.thread->hostThread, pthread_self())) throw std::runtime_error("Thread object was not initialized"); #endif PthreadAttr attr = nullptr; if (scePthreadAttrInit(&attr) != 0) throw std::runtime_error("Attribute initialization failed");