[LTP] [PATCH v2 1/2] open_posix: pthread_rwlock_rdlock: Update second assertion
Ricardo B. Marlière
rbm@suse.com
Mon Sep 22 12:49:05 CEST 2025
From: Ricardo B. Marlière <rbm@suse.com>
Link: https://austingroupbugs.net/view.php?id=1111
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
.../conformance/interfaces/pthread_rwlock_rdlock/2-1.c | 13 +++++++------
.../conformance/interfaces/pthread_rwlock_rdlock/2-2.c | 13 +++++++------
.../conformance/interfaces/pthread_rwlock_rdlock/2-3.c | 13 +++++++------
.../interfaces/pthread_rwlock_rdlock/assertions.xml | 15 ++++++++-------
4 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
index 288eb3e3566abf26100f999d02081b5ef02a6694..fa57e64985ef46da143d3f323bb3c727eeb3db66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
@@ -6,12 +6,13 @@
* Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
*
- * 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.
+ * 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.
*
* In this case, we test "higher priority writer block"
*
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
index 3593e4c7966bef183bc5979e296beff512196d47..f6ffddfbe417a7affdf1114b9cc2e97bc09f8fac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
@@ -6,12 +6,13 @@
* Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
*
- * 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.
+ * 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.
*
* In this case, we test "equal priority writer block"
*
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
index 40170dbb2d025ffda3693644c7d9aa4246f16bcf..aa1511bae3703efc92bc8569d7f4dc81f6219aa3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
@@ -6,12 +6,13 @@
* Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
*
- * 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.
+ * 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.
*
* In this case, reader has higher priority than the writer
*
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/assertions.xml b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/assertions.xml
index 07263b3dedde488196037e7140fcaa367cc49f5c..deb318cb786a5299c20b846eabfbad1111cb24ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/assertions.xml
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/assertions.xml
@@ -6,13 +6,14 @@
no writers blocked on the lock.
</assertion>
- <assertion id="2" tag="ref:XSH6:34768:34771">
- 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.
+ <assertion id="2" tag="ref:XSH8:{System Interfaces:pthread_rwlock_rdlock:DESCRIPTION}">
+ 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.
</assertion>
<assertion id="3" tag="ref:XSH6:34772:34775">
--
2.51.0
More information about the ltp
mailing list