Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it, LTP AI Reviewer <ltp-ai@noreply.github.com>
Subject: Re: [LTP] nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC
Date: Mon,  4 May 2026 14:05:05 +0000	[thread overview]
Message-ID: <20260504140505.3946-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260504-fix_nanosleep_pts_get_clock-v1-1-754e299f929d@suse.com>

Hi Andrea,

On Mon, 4 May 2026 15:20:18 +0200, Andrea Cervesato wrote:
> nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC

> +static inline clockid_t pts_get_clock(void)
> +{
> +	if (pts_mono_available())
> +		return CLOCK_MONOTONIC;
> +
> +	printf("CLOCK_MONOTONIC unavailable, test may fail due to clock adjustment\n");
> +	return CLOCK_REALTIME;
> +}

Clean fix. Centralising the runtime detection into pts_get_clock() is the
right approach and correctly handles the Linux/glibc case where
_POSIX_MONOTONIC_CLOCK == 0 requires a sysconf() check.

Reviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>

---
Note:

Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25323299867

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.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-05-04 14:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 13:20 [LTP] [PATCH] nanosleep: use POSIX runtime detection for CLOCK_MONOTONIC Andrea Cervesato
2026-05-04 14:05 ` linuxtestproject.agent [this message]
2026-05-05 14:29 ` Cyril Hrubis
2026-05-05 14:32 ` Andrea Cervesato via ltp
  -- 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-04-16  6:59 [LTP] [PATCH] " Andrea Cervesato
2026-04-16  8:03 ` [LTP] " linuxtestproject.agent
2026-04-16 11:58   ` Petr Vorel
2026-04-16 12:04     ` Andrea Cervesato via ltp

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=20260504140505.3946-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=andrea.cervesato@suse.de \
    --cc=ltp-ai@noreply.github.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox