From: Jonathan Wakely <jwakely@redhat.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: testsuite: tolerate non-cancelling sleep
Date: Wed, 22 Jun 2022 10:13:33 +0100 [thread overview]
Message-ID: <CACb0b4mHEBh1bjyF-SegHfKdPFpBZQA_G0qss4UvU_vwYF7mJg@mail.gmail.com> (raw)
In-Reply-To: <or8rppb76q.fsf@lxoliva.fsfla.org>
On Wed, 22 Jun 2022 at 06:26, Alexandre Oliva via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>
> Though sleep, nanosleep and clock_nanosleep are all POSIX cancellation
> points, not all target systems follow this POSIX requirement.
> 30_threads/thread/native_handle/cancel.cc will run until it times out
> on such systems.
>
> Rather than failing a C++ library test because of a limitation of the
> target system, this patch gives the test a chance to successfully
> exercise the features it intends to exercise, by introducing a
> cancellation point in a loop that would otherwise run indefinitely on
> systems exhibiting this limitation.
>
> Regstrapped on x86_64-linux-gnu, also tested with a cross to
> aarch64-rtems6. Ok to install?
OK, thanks.
This test is already explicitly pthread-specific, so there's no
problem using pthread_testcancel there. It already uses
pthread_cancel, and is gated by:
// { dg-require-effective-target pthread }
prev parent reply other threads:[~2022-06-22 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 5:25 Alexandre Oliva
2022-06-22 9:13 ` Jonathan Wakely [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=CACb0b4mHEBh1bjyF-SegHfKdPFpBZQA_G0qss4UvU_vwYF7mJg@mail.gmail.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=oliva@adacore.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).