From: Avinesh Kumar <akumar@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] openposix: update invalid clock id to accomodate new auxiliary clock ids
Date: Tue, 07 Oct 2025 18:03:18 +0200 [thread overview]
Message-ID: <5030324.GXAFRqVoOG@thinkpad> (raw)
In-Reply-To: <aOOHE98H2dEipRuJ@yuki.lan>
Hi Cyril,
On Monday, October 6, 2025 11:08:35 AM CEST you wrote:
>
> Hi!
> > Technically you can have any number of clocks defined by a system that
> > implements POSIX. So the comment here should be:
> >
> > "hopefully big enough not to be a valid clock value"
> >
> > And we may possibly bump it to a larger value as well, e.g. 50
>
> Or we may be a bit smarter, for clock_gettime() or clock_getres() we can
> loop starting at 0 until we get EINVAL or cross sufficiently large value.
>
>
I thought of implementing something like this. But we get EINVAL for
smaller values also for which clocks are not defined.
./clock_getres_6-2.run-test
clock_getres(-2147483648, &res);
clock_getres(2147483647, &res);
clock_getres(2147483647, &res);
clock_getres(-2147483647, &res);
clock_getres(-1073743192, &res);
clock_getres(1073743192, &res);
clock_getres(-1, &res);
clock_getres(10, &res);
clock_getres(11, &res);
clock_getres() != -1
clock_getres(12, &res);
clock_getres(13, &res);
clock_getres(14, &res);
clock_getres(15, &res);
clock_getres(16, &res);
clock_getres() != -1
clock_getres(17, &res);
clock_getres() != -1
clock_getres(18, &res);
clock_getres() != -1
clock_getres(19, &res);
clock_getres() != -1
clock_getres(20, &res);
clock_getres() != -1
clock_getres(21, &res);
clock_getres() != -1
clock_getres(22, &res);
clock_getres() != -1
clock_getres(23, &res);
clock_getres() != -1
clock_getres(24, &res);
clock_getres(25, &res);
clock_getres(26, &res);
At least one test FAILED -- see above
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-10-07 16:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 10:13 [LTP] [PATCH] openposix: update invalid clock id to accomodate new auxiliary clock ids Avinesh Kumar
2025-10-03 10:25 ` Petr Vorel
2025-10-03 11:30 ` Avinesh Kumar
2025-10-03 12:26 ` Petr Vorel
2025-10-06 8:53 ` Cyril Hrubis
2025-10-06 9:08 ` Cyril Hrubis
2025-10-07 16:03 ` Avinesh Kumar [this message]
2025-10-06 9:43 ` Petr Vorel
2025-10-06 9:56 ` Cyril Hrubis
2025-10-07 14:32 ` [LTP] [PATCH v2] " Avinesh Kumar
2025-10-07 14:36 ` Avinesh Kumar
2025-10-07 21:37 ` Petr Vorel
2025-10-13 9:56 ` Andrea Cervesato via ltp
2025-10-13 11:29 ` Petr Vorel
2025-10-13 14:26 ` Petr Vorel
2025-10-13 14:11 ` Cyril Hrubis
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=5030324.GXAFRqVoOG@thinkpad \
--to=akumar@suse.de \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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