From a5086db79487ae63faa81e5e358559a6dbf3ab50 Mon Sep 17 00:00:00 2001 From: limeng151 Date: Fri, 14 Jan 2022 11:31:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limeng151 Change-Id: I6724e18ba6234caa2b4863c2f075110cef62b276 --- .../process_posix/src/PthreadBasicApiTest.cpp | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/kernel_lite/process_posix/src/PthreadBasicApiTest.cpp b/kernel_lite/process_posix/src/PthreadBasicApiTest.cpp index ab9d4eb97..93e35d9ee 100755 --- a/kernel_lite/process_posix/src/PthreadBasicApiTest.cpp +++ b/kernel_lite/process_posix/src/PthreadBasicApiTest.cpp @@ -293,27 +293,6 @@ void *ThreadPthreadSpecificAll(void *arg) return arg; } -/** - * @tc.number SUB_KERNEL_PTHREAD_SPECIFIC_ALL_0100 - * @tc.name Basic usage of test thread specific data - * @tc.desc [C- SOFTWARE -0200] - */ -HWTEST_F(PthreadTest, testPthreadSpecificAll, Function | MediumTest | Level3) -{ - g_intPthreadSpecificAll = 0; - pthread_t tid1; - pthread_t tid2; - ASSERT_EQ(pthread_create(&tid1, nullptr, ThreadPthreadSpecificAll, nullptr), 0) << "> return errno"; - Msleep(20); - ASSERT_EQ(pthread_create(&tid2, nullptr, ThreadPthreadSpecificAll, nullptr), 0) << "> return errno"; - Msleep(100); - pthread_cancel(tid1); - pthread_join(tid1, nullptr); - pthread_cancel(tid2); - pthread_join(tid2, nullptr); - EXPECT_EQ(g_intPthreadSpecificAll, 5); -} - void DestructorPthreadSpecificAllDelete(void *param) { int *p = (int*)param; @@ -421,7 +400,7 @@ void TestPopHandler2(void *arg) LOG("step = %lx", CheckStep(10)); } -void *ThreadTestop(void *arg) +static void *ThreadTestop(void *arg) { pthread_cleanup_push(TestPopHandler1, nullptr); pthread_cleanup_push(TestPopHandler2, nullptr); -- GitLab