[LTP] [PATCH] openposix: update invalid clock id to accomodate new auxiliary clock ids
Petr Vorel
pvorel@suse.cz
Mon Oct 6 11:43:44 CEST 2025
Hi Cyril, Avinesh,
> Hi!
> > There can be 8 more clock ids reserved on systems with
> > CONFIG_POSIX_AUX_CLOCK=y [1]
> > consequently clock 17 no longer remains an invalid id.
> > [1] https://lkml.org/lkml/2025/5/19/341
> > Signed-off-by: Avinesh Kumar <akumar@suse.de>
> > ---
> > .../conformance/interfaces/clock_getres/6-2.c | 4 ++--
> > .../conformance/interfaces/clock_gettime/8-2.c | 4 ++--
> > .../conformance/interfaces/clock_settime/17-2.c | 4 ++--
> > 3 files changed, 6 insertions(+), 6 deletions(-)
> > diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
> > index c44809012..62de33c4f 100644
> > --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
> > +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
> > @@ -17,7 +17,7 @@
> > * unassigned value = -1073743192 (ex. of what gcc will set to)
> > * unassigned value = 1073743192 (ex. of what gcc will set to)
> > * -1
> > - * 17 (currently not = to any clock)
> > + * 25 (not associated to any clock, considering posix auxiliary clocks also)
> 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
Thanks for info. Out of curiosity: I suppose the different approach from the
exact value for LTP Linux tests fixed in 5c0e414511 (which use lib/tst_clocks.c)
is because POSIX tests can be tested for other Unix like tests? Is the POSIX
testsuite intended for BSD or any unix like kernels/OS? If yes, I wonder if
anybody does (and if it even compiles).
Kind regards,
Petr
More information about the ltp
mailing list