提交 d079199a 编写于 作者: N nan-xiansen

【kernel_lite】【release】fix time_posix module unstable cases

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I446b47d97f33cf67c6e1cc5eacb8e3741a9b99ba
上级 824bd75f
......@@ -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.
先完成此消息的编辑!
想要评论请 注册