From: Petr Vorel <pvorel@suse.cz>
To: linuxtestproject.agent@gmail.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC
Date: Thu, 16 Apr 2026 13:58:01 +0200 [thread overview]
Message-ID: <20260416115801.GA299728@pevik> (raw)
In-Reply-To: <20260416080306.4018-1-linuxtestproject.agent@gmail.com>
> Hi Andrea,
> On Thu, 16 Apr 2026 08:59:59 +0200, Andrea Cervesato wrote:
> > nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC
> > -#include <unistd.h>
> > #include <sys/wait.h>
> > #include "posixtest.h"
> > -
> > -#ifdef _POSIX_MONOTONIC_CLOCK
> > -#define TEST_CLOCK CLOCK_MONOTONIC
> > -#else
> > -#define TEST_CLOCK CLOCK_REALTIME
> > -#endif
> > +#include "helpers.h"
> This applies to 1-2.c, 1-3.c, 3-2.c, and 7-2.c. These files call
> fork() and sleep() — both declared in <unistd.h> — but the explicit
> #include <unistd.h> is removed and now only arrives transitively via
> helpers.h. Each file should include the headers it directly uses;
> please keep #include <unistd.h> in these four files.
Hm, we happily use indirect includes in non-openPOSIX tests
(in testcases/kernel/syscalls/). It certainly does not harm to include
<unistd.h> on each place which uses _POSIX_MONOTONIC_CLOCK.
I'd hope agent would find other '#ifdef _POSIX_MONOTONIC_CLOCK' use without
<unistd.h> which is in
testcases/open_posix_testsuite/conformance/interfaces/clock_settime/helpers.h
Kind regards,
Petr
> ---
> Note:
> Our agent completed the review of the patch. The agent can sometimes
> produce false positives although often its findings are genuine. If
> you find issues with the review, please comment this email or ignore
> the suggestions.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-16 11:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 6:59 [LTP] [PATCH] nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC Andrea Cervesato
2026-04-16 8:03 ` [LTP] " linuxtestproject.agent
2026-04-16 11:58 ` Petr Vorel [this message]
2026-04-16 12:04 ` Andrea Cervesato via ltp
2026-04-16 12:08 ` [LTP] [PATCH] " Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2026-04-16 12:33 [LTP] [PATCH v2] " Andrea Cervesato
2026-04-16 13:45 ` [LTP] " linuxtestproject.agent
2026-05-04 13:20 [LTP] [PATCH] " Andrea Cervesato
2026-05-04 14:05 ` [LTP] " linuxtestproject.agent
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=20260416115801.GA299728@pevik \
--to=pvorel@suse.cz \
--cc=linuxtestproject.agent@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.