All of lore.kernel.org
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] openposix: timers/twoevtimers: Wait for both timer signals
Date: Fri,  9 Oct 2026 10:09:22 +0000	[thread overview]
Message-ID: <20261009100922.4010-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <4e46078e97ec7c6678cabd9f2b32cba8be3ee3cf.1791528355.git.jstancek@redhat.com>

Hi Jan,

On 9 Oct 2026, Jan Stancek wrote:
> openposix: timers/twoevtimers: Wait for both timer signals

> +	while (left > 0 && !(caughtalarm && caughtabort))
> +		left = sleep(left);

On glibc and musl, sleep() discards the fractional remaining time.
If the first signal interrupts sleep(3) after 2.1 seconds, it returns
zero with about 0.9 seconds still in the budget, so this can fail before
the second signal arrives.
Use nanosleep() and retain the full remaining timespec, or wait against
a monotonic deadline.

Verdict - Needs revision

---
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

  reply	other threads:[~2026-10-09 10:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  6:49 [LTP] [PATCH] openposix: timers/twoevtimers: Wait for both timer signals Jan Stancek via ltp
2026-10-09 10:09 ` linuxtestproject.agent [this message]
2026-10-09 10:52 ` [LTP] [PATCH v2] " Jan Stancek via ltp
2026-10-09 17:26   ` [LTP] " linuxtestproject.agent
2026-10-10  9:06     ` Li Wang
2026-10-10  9:42       ` Jan Stancek via ltp
2026-10-11  1:07         ` Li Wang
2026-10-12  4:56   ` [LTP] [PATCH v3] " Jan Stancek via ltp
2026-10-12  7:19     ` [LTP] " linuxtestproject.agent
2026-10-12  8:03     ` [LTP] [PATCH v4] " Jan Stancek via ltp
2026-10-12  9:33       ` Petr Vorel
2026-10-12 15:47       ` [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=20261009100922.4010-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=jstancek@redhat.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.