#16711: THR: Test FAILED - conformance/interfaces/pthread_rwlock_wrlock/3-1.test
-------------------------------------------------+-------------------------
Reporter: cocobean | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone:
| Unscheduled
Component: System/POSIX | Version: R1/beta2
Keywords: POSIX, pthreads, | Blocked By:
pthread_rwlock_wrlock |
Blocking: | Platform: All
-------------------------------------------------+-------------------------
Test pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
It may fail if:
[EDEADLK] The current thread already owns the rwlock for writing or
reading.
Steps:
{{{
1. Create and initialize an rwlock
2. Perform a write lock via pthread_rwlock_wrlock()
3. Perform a write lock _again_ with pthread_rwlock_wrlock without first
unlocking rwlock()
4. Test if returns EDEADLK or not. Note the standard states "may" fail,
so the test always passes even if 0 is returned.
}}}
Ref:
https://github.com/haiku/open_posix_testsuite/blob/from_haiku_trunk/conformance/interfaces/pthread_rwlock_wrlock/3-1.c
Expected result: Test passed
Actual Result: Test runs (i.e. attempts/acquires write lock), then HANGS.
Tested on: Haiku hrev54815 x86 with Open POSIX Test Suite 1.5.2
--
Ticket URL: <https://dev.haiku-os.org/ticket/16711>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.