Opened 3 years ago

Closed 19 months ago

#16710 closed bug (invalid)

THR: Test FAILED - conformance/interfaces/pthread_rwlock_wrlock/2-1.test

Reported by: cocobean Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/POSIX Version: R1/Development
Keywords: POSIX, pthreads, pthread_rwlock_wrlock Cc:
Blocked By: Blocking:
Platform: All

Description

Test pthread_rwlock_wrlock(pthread_rwlock_t * rwlock)

If a signal is delivered to a thread waiting for a read-write lock for writing, upon return from the signal handler the thread resumes waiting for the read-write lock for writing as if it was not interrupted.

Steps:

1. main thread  create read-write lock 'rwlock', and lock it for writing
2. main thread create a thread sig_thread, the thread is set to handle SIGUSR1
3. sig_thread try to lock 'rwlock' for writing but blocked
4. main thread send SIGUSR1 to sig_thread via pthread_kill, while sig_thread is blocking
5. test that thread handler is called 
6. check that when thread handler returns, sig_thread resume block
7. main thread unlock 'rwlock', sig_thread should get the lock

Ref: ​​https://github.com/haiku/open_posix_testsuite/blob/from_haiku_trunk/conformance/interfaces/pthread_rwlock_wrlock/2-1.c

Expected result: Test passed

Actual Result: Test failed. sig_thread: Error at pthread_rwlock_wrlock() error code: 2147483638

Tested on: Haiku hrev54815 x86 with Open POSIX Test Suite 1.5.2

Change History (2)

comment:1 by cocobean, 19 months ago

Test fails on Linux - Please close this ticket.

comment:2 by waddlesplash, 19 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.