* [LTP] Purpose of clock_nanosleep2 tests ?
@ 2020-04-21 7:37 Viresh Kumar
2020-04-21 9:20 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2020-04-21 7:37 UTC (permalink / raw)
To: ltp
Hi Cyril,
While working on the time64 variants I stumbled upon
testcases/kernel/syscalls/clock_nanosleep2/.
The commit log says that we were trying to test clock_nanosleep2()
syscall, which I am unable to find, but still this ends up calling the kernel
variant directly for clock_nanosleep() only.
What am I missing ? Why is this stuff required ?
--
Viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] Purpose of clock_nanosleep2 tests ?
2020-04-21 7:37 [LTP] Purpose of clock_nanosleep2 tests ? Viresh Kumar
@ 2020-04-21 9:20 ` Cyril Hrubis
2020-04-21 9:26 ` Viresh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2020-04-21 9:20 UTC (permalink / raw)
To: ltp
Hi!
> While working on the time64 variants I stumbled upon
> testcases/kernel/syscalls/clock_nanosleep2/.
>
> The commit log says that we were trying to test clock_nanosleep2()
> syscall, which I am unable to find, but still this ends up calling the kernel
> variant directly for clock_nanosleep() only.
>
> What am I missing ? Why is this stuff required ?
Hmm, I guess that there is no clock_nanosleep2() and the test is a
result of a confusion of some kind. Maybe the author just confused
clock_nanosleep(2) with clock_nanosleep2().
Looking at clock_nanosleep() tests, there does not seem to be a test
for ABSTIME so the best solution would be to move the test to
clock_nanosleep directory. What do you think?
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] Purpose of clock_nanosleep2 tests ?
2020-04-21 9:20 ` Cyril Hrubis
@ 2020-04-21 9:26 ` Viresh Kumar
2020-04-21 9:44 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2020-04-21 9:26 UTC (permalink / raw)
To: ltp
On 21-04-20, 11:20, Cyril Hrubis wrote:
> Hi!
> > While working on the time64 variants I stumbled upon
> > testcases/kernel/syscalls/clock_nanosleep2/.
> >
> > The commit log says that we were trying to test clock_nanosleep2()
> > syscall, which I am unable to find, but still this ends up calling the kernel
> > variant directly for clock_nanosleep() only.
> >
> > What am I missing ? Why is this stuff required ?
>
> Hmm, I guess that there is no clock_nanosleep2() and the test is a
> result of a confusion of some kind. Maybe the author just confused
> clock_nanosleep(2) with clock_nanosleep2().
>
> Looking at clock_nanosleep() tests, there does not seem to be a test
> for ABSTIME so the best solution would be to move the test to
> clock_nanosleep directory. What do you think?
clock_nanosleep03.c already tests ABSTIME. I think we can just drop
clock_nanosleep2 directory completely. I will send a patch if that looks okay.
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] Purpose of clock_nanosleep2 tests ?
2020-04-21 9:26 ` Viresh Kumar
@ 2020-04-21 9:44 ` Cyril Hrubis
2020-04-21 9:46 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2020-04-21 9:44 UTC (permalink / raw)
To: ltp
Hi!
> > > While working on the time64 variants I stumbled upon
> > > testcases/kernel/syscalls/clock_nanosleep2/.
> > >
> > > The commit log says that we were trying to test clock_nanosleep2()
> > > syscall, which I am unable to find, but still this ends up calling the kernel
> > > variant directly for clock_nanosleep() only.
> > >
> > > What am I missing ? Why is this stuff required ?
> >
> > Hmm, I guess that there is no clock_nanosleep2() and the test is a
> > result of a confusion of some kind. Maybe the author just confused
> > clock_nanosleep(2) with clock_nanosleep2().
> >
> > Looking at clock_nanosleep() tests, there does not seem to be a test
> > for ABSTIME so the best solution would be to move the test to
> > clock_nanosleep directory. What do you think?
>
> clock_nanosleep03.c already tests ABSTIME. I think we can just drop
> clock_nanosleep2 directory completely. I will send a patch if that looks okay.
clock_nanosleep03 is testing that inside of a time namespace, I think
that there is still value of having the simpler test as well.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] Purpose of clock_nanosleep2 tests ?
2020-04-21 9:44 ` Cyril Hrubis
@ 2020-04-21 9:46 ` Cyril Hrubis
0 siblings, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2020-04-21 9:46 UTC (permalink / raw)
To: ltp
Hi!
> > clock_nanosleep03.c already tests ABSTIME. I think we can just drop
> > clock_nanosleep2 directory completely. I will send a patch if that looks okay.
>
> clock_nanosleep03 is testing that inside of a time namespace, I think
> that there is still value of having the simpler test as well.
Moreover the time namespaces does not support CLOCK_REALTIME so we
should implement clock_nanosleep() test with CLOCK_REALTIME and
TIMER_ABSTIME which is not covered at the moment anyways.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-21 9:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21 7:37 [LTP] Purpose of clock_nanosleep2 tests ? Viresh Kumar
2020-04-21 9:20 ` Cyril Hrubis
2020-04-21 9:26 ` Viresh Kumar
2020-04-21 9:44 ` Cyril Hrubis
2020-04-21 9:46 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox