!807 修复A核测试用例失败的问题

Merge pull request !807 from yinjiaming/sys_test
This commit is contained in:
openharmony_ci 2022-02-17 12:10:12 +00:00 committed by Gitee
commit 8c44c82723
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ static void *ThreadFuncTest(void *arg)
{ {
printf("Subthread starting infinite loop\n"); printf("Subthread starting infinite loop\n");
while (1) { while (1) {
pthread_testcancel();
} }
} }
@ -80,6 +81,9 @@ static int ClockTest(void)
ret = ThreadClock("Subthread CPU time: ", clockid); ret = ThreadClock("Subthread CPU time: ", clockid);
ICUNIT_ASSERT_EQUAL(ret, 0, ret); ICUNIT_ASSERT_EQUAL(ret, 0, ret);
ret = pthread_cancel(thread);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
return 0; return 0;
} }