All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME
@ 2020-08-19  8:38 Li Wang
  2020-08-19 12:17 ` Cyril Hrubis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Li Wang @ 2020-08-19  8:38 UTC (permalink / raw)
  To: ltp

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:
  https://github.com/linux-test-project/ltp/issues/712

Signed-off-by: Li Wang <liwang@redhat.com>
Cc: Viresh Kumar<viresh.kumar@linaro.org>
Cc: Cyril Hrubis <chrubis@suse.cz>
Cc: Jan Stancek <jstancek@redhat.com>
Tested-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/clock_settime/clock_settime03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/clock_settime/clock_settime03.c b/testcases/kernel/syscalls/clock_settime/clock_settime03.c
index 5b75afbe7..ad6183e4c 100644
--- a/testcases/kernel/syscalls/clock_settime/clock_settime03.c
+++ b/testcases/kernel/syscalls/clock_settime/clock_settime03.c
@@ -65,7 +65,7 @@ static void run(void)
 	SAFE_SIGADDSET(&set, SIGABRT);
 	SAFE_SIGPROCMASK(SIG_BLOCK, &set, NULL);
 
-	TEST(tst_syscall(__NR_timer_create, CLOCK_REALTIME_ALARM, &ev, &timer));
+	TEST(tst_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
 	if (TST_RET != 0)
 		tst_brk(TBROK | TERRNO, "timer_create() failed");
 
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME
  2020-08-19  8:38 [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME Li Wang
@ 2020-08-19 12:17 ` Cyril Hrubis
  2020-08-19 12:33 ` Viresh Kumar
  2020-08-19 12:37 ` Jan Stancek
  2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2020-08-19 12:17 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME
  2020-08-19  8:38 [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME Li Wang
  2020-08-19 12:17 ` Cyril Hrubis
@ 2020-08-19 12:33 ` Viresh Kumar
  2020-08-19 12:37 ` Jan Stancek
  2 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2020-08-19 12:33 UTC (permalink / raw)
  To: ltp

On 19-08-20, 08:38, Li Wang wrote:
> 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:
>   https://github.com/linux-test-project/ltp/issues/712
> 
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Viresh Kumar<viresh.kumar@linaro.org>
> Cc: Cyril Hrubis <chrubis@suse.cz>
> Cc: Jan Stancek <jstancek@redhat.com>
> Tested-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/kernel/syscalls/clock_settime/clock_settime03.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME
  2020-08-19  8:38 [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME Li Wang
  2020-08-19 12:17 ` Cyril Hrubis
  2020-08-19 12:33 ` Viresh Kumar
@ 2020-08-19 12:37 ` Jan Stancek
  2 siblings, 0 replies; 4+ messages in thread
From: Jan Stancek @ 2020-08-19 12:37 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> 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:
>   https://github.com/linux-test-project/ltp/issues/712
> 
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Viresh Kumar<viresh.kumar@linaro.org>
> Cc: Cyril Hrubis <chrubis@suse.cz>
> Cc: Jan Stancek <jstancek@redhat.com>
> Tested-by: Li Wang <liwang@redhat.com>

Acked-by: Jan Stancek <jstancek@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-19 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19  8:38 [LTP] [PATCH v2] clock_settime03: change to use CLOCK_REALTIME Li Wang
2020-08-19 12:17 ` Cyril Hrubis
2020-08-19 12:33 ` Viresh Kumar
2020-08-19 12:37 ` Jan Stancek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.