From: "Ricardo B. Marlière via ltp" <ltp@lists.linux.it>
To: "Cyril Hrubis" <chrubis@suse.cz>,
"Linux Test Project" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] open_posix: Update pthread_rwlock_rdlock 2nd assertion
Date: Tue, 20 May 2025 15:13:27 -0300 [thread overview]
Message-ID: <DA16X0C1V0BA.L4ETKIDDFBNV@suse.com> (raw)
In-Reply-To: <20250520-fixes-pthread_rwlock_rdlock-v1-1-402ee45114cc@suse.com>
On Tue May 20, 2025 at 3:10 PM -03, Ricardo B. Marlière wrote:
> From: Ricardo B. Marlière <rbm@suse.com>
>
> The pthread_rwlock_rdlock/2-*.c tests are broken because they rely on an
> old version of the POSIX standard which says:
>
> If the Thread Execution Scheduling option is supported, and the threads
> involved in the lock are executing with the scheduling policies
> SCHED_FIFO or SCHED_RR, the calling thread shall not acquire the lock if
> a writer holds the lock or if writers of higher or equal priority are
> blocked on the lock; otherwise, the calling thread shall acquire the
> lock.
>
> Whereas the new version says:
>
> If the Thread Execution Scheduling option is supported, and the threads
> that hold or are blocked on the lock are executing with the scheduling
> policies SCHED_FIFO or SCHED_RR, the calling thread shall not acquire the
> lock if a writer holds the lock or if the calling thread does not already
> hold a read lock and writers of higher or equal priority are blocked on
> the lock; otherwise, the calling thread shall acquire the lock.
>
> This behaviour is not supported by default on GNU/Linux, so add a call to
> Glibc pthread_rwlockattr_setkind_np() to set the correct lock kind as a
> prerequisite to the 2-1.c and 2-2.c tests.
>
> Link: https://austingroupbugs.net/view.php?id=1111
> Link: https://sourceware.org/bugzilla/show_bug.cgi?id=13701
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> .../interfaces/pthread_rwlock_rdlock/2-1.c | 21 ++++++++++++++-------
> .../interfaces/pthread_rwlock_rdlock/2-2.c | 21 ++++++++++++++-------
> .../interfaces/pthread_rwlock_rdlock/2-3.c | 13 +++++++------
> .../interfaces/pthread_rwlock_rdlock/assertions.xml | 15 ++++++++-------
> 4 files changed, 43 insertions(+), 27 deletions(-)
>
Hi Cyril,
I think this one might be worth including in the new release!
Thanks,
- Ricardo.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-05-20 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 18:10 [LTP] [PATCH] open_posix: Update pthread_rwlock_rdlock 2nd assertion Ricardo B. Marlière via ltp
2025-05-20 18:13 ` Ricardo B. Marlière via ltp [this message]
2025-09-19 11:54 ` Cyril Hrubis
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=DA16X0C1V0BA.L4ETKIDDFBNV@suse.com \
--to=ltp@lists.linux.it \
--cc=chrubis@suse.cz \
--cc=rbm@suse.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 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.