* Re: [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID [not found] <1372304589-16585-1-git-send-email-gaowanlong@cn.fujitsu.com> @ 2013-06-27 9:39 ` Jan Stancek 2013-06-28 0:56 ` Wanlong Gao 2013-06-27 12:20 ` chrubis 1 sibling, 1 reply; 3+ messages in thread From: Jan Stancek @ 2013-06-27 9:39 UTC (permalink / raw) To: Wanlong Gao; +Cc: LTP ----- Original Message ----- > From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com> > To: "LTP" <ltp-list@lists.sourceforge.net> > Cc: "Cyril Hrubis" <chrubis@suse.cz>, "Caspar Zhang" <caspar@casparzhang.com>, "Garrett Cooper" <yanegomi@gmail.com>, > "Mike Frysinger" <vapier@gentoo.org>, jstancek@redhat.com, "Wanlong Gao" <gaowanlong@cn.fujitsu.com> > Sent: Thursday, 27 June, 2013 5:43:09 AM > Subject: [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID > > PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID are not supported before > kernel 2.6.12, and changed back since 2.6.38. And they are > thought improper supported on Linux, so we just remove them > from the test of clock_settime and remain them be untested. Hi, Isn't this test testing that these are not supported? EINVAL The clk_id specified is not supported on this system. Are these going to be removed completely? What is the risk if we keep them? Regards, Jan > > Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> > --- > testcases/kernel/timers/clock_settime/clock_settime03.c | 15 --------------- > 1 file changed, 15 deletions(-) > > diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c > b/testcases/kernel/timers/clock_settime/clock_settime03.c > index a949303..3693395 100644 > --- a/testcases/kernel/timers/clock_settime/clock_settime03.c > +++ b/testcases/kernel/timers/clock_settime/clock_settime03.c > @@ -37,8 +37,6 @@ clockid_t clocks[] = { > CLOCK_REALTIME, > CLOCK_REALTIME, > CLOCK_REALTIME, > - CLOCK_PROCESS_CPUTIME_ID, > - CLOCK_THREAD_CPUTIME_ID > }; > > int testcases[] = { > @@ -49,8 +47,6 @@ int testcases[] = { > EINVAL, /* Invalid timespec */ > EINVAL, /* NSEC_PER_SEC + 1 */ > EPERM, /* non-root user */ > - 0, > - 0, > }; > > char *TCID = "clock_settime03"; > @@ -70,17 +66,6 @@ int main(int ac, char **av) > if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) > tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); > > - /* PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on > - * kernel versions lower than 2.6.12 and changed back in 2.6.38 > - */ > - if ((tst_kvercmp(2, 6, 12)) < 0 || (tst_kvercmp(2, 6, 38)) >= 0) { > - testcases[7] = EINVAL; > - testcases[8] = EINVAL; > - } else { > - testcases[7] = EFAULT; > - testcases[8] = EFAULT; > - } > - > setup(); > > for (lc = 0; TEST_LOOPING(lc); lc++) { > -- > 1.8.3.1.448.gfb7dfaa > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID 2013-06-27 9:39 ` [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID Jan Stancek @ 2013-06-28 0:56 ` Wanlong Gao 0 siblings, 0 replies; 3+ messages in thread From: Wanlong Gao @ 2013-06-28 0:56 UTC (permalink / raw) To: Jan Stancek; +Cc: LTP On 06/27/2013 05:39 PM, Jan Stancek wrote: > > > > > ----- Original Message ----- >> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com> >> To: "LTP" <ltp-list@lists.sourceforge.net> >> Cc: "Cyril Hrubis" <chrubis@suse.cz>, "Caspar Zhang" <caspar@casparzhang.com>, "Garrett Cooper" <yanegomi@gmail.com>, >> "Mike Frysinger" <vapier@gentoo.org>, jstancek@redhat.com, "Wanlong Gao" <gaowanlong@cn.fujitsu.com> >> Sent: Thursday, 27 June, 2013 5:43:09 AM >> Subject: [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID >> >> PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID are not supported before >> kernel 2.6.12, and changed back since 2.6.38. And they are >> thought improper supported on Linux, so we just remove them >> from the test of clock_settime and remain them be untested. > > Hi, > > Isn't this test testing that these are not supported? > EINVAL The clk_id specified is not supported on this system. > > Are these going to be removed completely? > What is the risk if we keep them? The problem is what Cyril said in this thread. Thanks, Wanlong Gao > > Regards, > Jan > >> >> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> >> --- >> testcases/kernel/timers/clock_settime/clock_settime03.c | 15 --------------- >> 1 file changed, 15 deletions(-) >> >> diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c >> b/testcases/kernel/timers/clock_settime/clock_settime03.c >> index a949303..3693395 100644 >> --- a/testcases/kernel/timers/clock_settime/clock_settime03.c >> +++ b/testcases/kernel/timers/clock_settime/clock_settime03.c >> @@ -37,8 +37,6 @@ clockid_t clocks[] = { >> CLOCK_REALTIME, >> CLOCK_REALTIME, >> CLOCK_REALTIME, >> - CLOCK_PROCESS_CPUTIME_ID, >> - CLOCK_THREAD_CPUTIME_ID >> }; >> >> int testcases[] = { >> @@ -49,8 +47,6 @@ int testcases[] = { >> EINVAL, /* Invalid timespec */ >> EINVAL, /* NSEC_PER_SEC + 1 */ >> EPERM, /* non-root user */ >> - 0, >> - 0, >> }; >> >> char *TCID = "clock_settime03"; >> @@ -70,17 +66,6 @@ int main(int ac, char **av) >> if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) >> tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); >> >> - /* PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on >> - * kernel versions lower than 2.6.12 and changed back in 2.6.38 >> - */ >> - if ((tst_kvercmp(2, 6, 12)) < 0 || (tst_kvercmp(2, 6, 38)) >= 0) { >> - testcases[7] = EINVAL; >> - testcases[8] = EINVAL; >> - } else { >> - testcases[7] = EFAULT; >> - testcases[8] = EFAULT; >> - } >> - >> setup(); >> >> for (lc = 0; TEST_LOOPING(lc); lc++) { >> -- >> 1.8.3.1.448.gfb7dfaa >> >> > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID [not found] <1372304589-16585-1-git-send-email-gaowanlong@cn.fujitsu.com> 2013-06-27 9:39 ` [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID Jan Stancek @ 2013-06-27 12:20 ` chrubis 1 sibling, 0 replies; 3+ messages in thread From: chrubis @ 2013-06-27 12:20 UTC (permalink / raw) To: Wanlong Gao; +Cc: Garrett Cooper, LTP, Mike Frysinger Hi! > PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID are not supported before > kernel 2.6.12, and changed back since 2.6.38. And they are > thought improper supported on Linux, so we just remove them > from the test of clock_settime and remain them be untested. > > Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> > --- > testcases/kernel/timers/clock_settime/clock_settime03.c | 15 --------------- > 1 file changed, 15 deletions(-) > > diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c b/testcases/kernel/timers/clock_settime/clock_settime03.c > index a949303..3693395 100644 > --- a/testcases/kernel/timers/clock_settime/clock_settime03.c > +++ b/testcases/kernel/timers/clock_settime/clock_settime03.c > @@ -37,8 +37,6 @@ clockid_t clocks[] = { > CLOCK_REALTIME, > CLOCK_REALTIME, > CLOCK_REALTIME, > - CLOCK_PROCESS_CPUTIME_ID, > - CLOCK_THREAD_CPUTIME_ID > }; > > int testcases[] = { > @@ -49,8 +47,6 @@ int testcases[] = { > EINVAL, /* Invalid timespec */ > EINVAL, /* NSEC_PER_SEC + 1 */ > EPERM, /* non-root user */ > - 0, > - 0, > }; What is the exact issue here? I suspect that the problem is that the errno values are not stable between kernel versions but AFAIK the PROCESS_CPUTIME clocks were never setable but that shouldn't stop us from trying to set them and expect failure. So what about we change the code to expect failure with unspecified errno or add a list of expected errnos broad enough to cover all kernel versions? And btw, the Linux implementation is POSIXly correct as the ability to set these clocks is left open to implementation. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-28 0:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1372304589-16585-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-06-27 9:39 ` [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID Jan Stancek
2013-06-28 0:56 ` Wanlong Gao
2013-06-27 12:20 ` chrubis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox