Linux Test Project
 help / color / mirror / Atom feed
From: Li Wang <li.wang@linux.dev>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] openposix: timers/twoevtimers: Wait for both timer signals
Date: Wed, 14 Oct 2026 09:59:26 +0800	[thread overview]
Message-ID: <as7h1cXdeV_wehHk@linux.dev> (raw)
In-Reply-To: <b6d98d03422ec30d0bf5284cd094d2ecf688efe3.1791792065.git.jstancek@redhat.com>

> The test arms two timers with the same absolute expiration time and
> then does a single sleep() before checking that both signals arrived.
> sleep() returns as soon as the first signal interrupts it, and the
> kernel delivers the two signals one at a time. This sporadically
> leads to failure:
> 
>   Caught abort signal
>   Test FAILED
> 
> even though the second timer fires microseconds later.
> 
> Make the counters volatile sig_atomic_t and move the printf() calls
> out of the signal handlers, so that they only touch the counters and
> cannot clobber errno behind nanosleep()'s back.
> 
> Arm the timers to expire 50ms from now instead of 3 seconds, so the test
> passes in about 50ms, and lower LONGTIME, the upper bound for when a
> signal does not arrive, from 5 to 3 seconds. Also correct the header
> comment: the timers live in the same process, not in different
> processes, and the test only checks that both of them expire, not that
> they expire at the same time.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>

Reviewed-by: Li Wang <li.wang@linux.dev>


-- 
Regards,
Li Wang

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

      parent reply	other threads:[~2026-10-14  1:59 UTC|newest]

Thread overview: 13+ 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 ` [LTP] " linuxtestproject.agent
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
2026-10-14  1:59       ` Li Wang [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=as7h1cXdeV_wehHk@linux.dev \
    --to=li.wang@linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox