Skip to content

Commit 21721a3

Browse files
wangli5665metan-ucw
authored andcommitted
clock_settime03: change to use CLOCK_REALTIME
CLOCK_REALTIME_ALARM requires an RTC with alarm support, which may not be present on a system. In that case, the kernel will return EOPNOTSUPP, which is defined as ENOTSUP in userspace. Here use CLOCK_REALTIME instead of the CLOCK_REALTIME_ALARM because we do NOT need suspend the SUT during test. For issue #712: #712 Signed-off-by: Li Wang <[email protected]> Cc: Viresh Kumar<[email protected]> Cc: Cyril Hrubis <[email protected]> Cc: Jan Stancek <[email protected]> Tested-by: Li Wang <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]>
1 parent fbcf244 commit 21721a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcases/kernel/syscalls/clock_settime/clock_settime03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void run(void)
6565
SAFE_SIGADDSET(&set, SIGABRT);
6666
SAFE_SIGPROCMASK(SIG_BLOCK, &set, NULL);
6767

68-
TEST(tst_syscall(__NR_timer_create, CLOCK_REALTIME_ALARM, &ev, &timer));
68+
TEST(tst_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
6969
if (TST_RET != 0)
7070
tst_brk(TBROK | TERRNO, "timer_create() failed");
7171

0 commit comments

Comments
 (0)