fix: 修复A核测试用例失败的问题
【背景】 【OpenHarmony】【master】L1 liteos测试执行liteos_a_libc_unittest.bin 测试模块,测试套TimeTimerTest 3条用例Fail 【修改方案】 将一个测试用例中创建的无限循环的线程 在测试用例末尾关闭 【影响】 对现有的产品编译不会有影响。 re #I4SQDR Signed-off-by: yinjiaming <yinjiaming@huawei.com> Change-Id: I390f411502fe1a6a04071e0d7e02d936e3388cd7
This commit is contained in:
parent
74f8d3aa07
commit
59329ce7c6
|
@ -34,6 +34,7 @@ static void *ThreadFuncTest(void *arg)
|
|||
{
|
||||
printf("Subthread starting infinite loop\n");
|
||||
while (1) {
|
||||
pthread_testcancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +81,9 @@ static int ClockTest(void)
|
|||
ret = ThreadClock("Subthread CPU time: ", clockid);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = pthread_cancel(thread);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue