From: chrubis@suse.cz
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Garrett Cooper <yanegomi@gmail.com>,
LTP <ltp-list@lists.sourceforge.net>,
Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] [PATCH] clock_settime03: don't test PROCESS_CPUTIME_ID and THREAD_CPUTIME_ID
Date: Thu, 27 Jun 2013 14:20:07 +0200 [thread overview]
Message-ID: <20130627122007.GB5384@rei> (raw)
In-Reply-To: <1372304589-16585-1-git-send-email-gaowanlong@cn.fujitsu.com>
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
prev parent reply other threads:[~2013-06-27 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130627122007.GB5384@rei \
--to=chrubis@suse.cz \
--cc=gaowanlong@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vapier@gentoo.org \
--cc=yanegomi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox