All of lore.kernel.org
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] clock_settime/4-1: CLOCK_MONOTONIC for timer validation
Date: Tue, 16 Jun 2026 10:09:44 +0000	[thread overview]
Message-ID: <20260616100944.4001-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260616-fix_clock_gettime_openposix-v1-1-ae4ade48039d@suse.com>

Hi Andrea,

On Tue, 16 Jun 2026 10:57:22 +0200, Andrea Cervesato wrote:
> clock_settime/4-1: CLOCK_MONOTONIC for timer validation

> During test execution, any service which is operating on clock might
> interfere with the final result. For this reason, we use CLOCK_MONOTONIC
> (when available) in order to the compute the right delta between

Typo: "in order to the compute" should be "in order to compute".

> +		if (use_mono)
> +			clock_gettime(CLOCK_MONOTONIC, &mono_before);

> +		if (use_mono)
> +			clock_gettime(CLOCK_MONOTONIC, &mono_after);

Both clock_gettime(CLOCK_MONOTONIC) calls are missing return-value
checks. Every other POSIX call in this test checks for errors and
returns PTS_UNRESOLVED on failure.

If clock_gettime() were to fail, mono_before / mono_after would
remain uninitialized and the delta computation would use garbage
values silently.

Verdict - Needs revision

Pre-existing: timer_create() allocates tid but timer_delete(tid)
is never called on any exit path.

---
Note:

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

      parent reply	other threads:[~2026-06-16 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  8:57 [LTP] [PATCH] clock_settime/4-1: CLOCK_MONOTONIC for timer validation Andrea Cervesato
2026-06-16  9:06 ` Andrea Cervesato via ltp
2026-06-16 10:09 ` linuxtestproject.agent [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=20260616100944.4001-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=andrea.cervesato@suse.de \
    --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.