提交 a211e029 编写于 作者: O openharmony_ci 提交者: Gitee

!324 【kernel_lite】【release】fix time_posix module failed cases

Merge pull request !324 from 南先森/kernel_lite
......@@ -44,9 +44,18 @@ HWTEST_P(AllClockIDTest, testClockNanosleepInvalidID, Reliability | SmallTest |
struct timespec req = {0, 100};
struct timespec rem = {0};
int rt = clock_nanosleep(cid, 0, &req, &rem);
if (cid == CLOCK_SGI_CYCLE) {
if (cid == CLOCK_REALTIME)
{
ASSERT_EQ(rt, 0);
}
else if (cid == CLOCK_THREAD_CPUTIME_ID)
{
ASSERT_EQ(rt, EINVAL) << cname << " should not support.\n";
}
}
else
{
ASSERT_EQ(rt, ENOTSUP) << cname << " should not support.\n";
}
}
INSTANTIATE_TEST_CASE_P(SleepTest, AllClockIDTest, ALL_CLOCK_IDS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册