Changes between Initial Version and Version 4 of Ticket #16709


Ignore:
Timestamp:
Nov 7, 2024, 12:43:51 PM (8 days ago)
Author:
cocobean
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16709 – Description

    initial v4  
    1 Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
     1pthread_rwlock_rdlock implementation in Haiku R1b5 must pass this OpenPOSIX test for POSIX.1-2008 conformance.
    22
    3 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.
    4 
    5 In this case, reader has higher priority than the writer
    6 
    7 Steps:
    8 We have three threads, main(also a reader), writer, reader
    93{{{
    10 1.  Main thread set its shcedule policy as "SCHED_FIFO", with highest priority the three: sched_get_priority_min()+2.
    11 2.  Main thread read lock 'rwlock'
    12 3.  Create a writer thread, with schedule policy as "SCHED_FIFO", and priority using sched_get_priority_min().
    13 4.  The thread write lock 'rwlock', should block.
    14 5.  Main thread create a reader thread, with schedule policy as "SCHED_FIFO", and priority sched_get_priority_min()+1
    15 6.  Reader thread read lock 'rwlock', shouldn't block, since it has a higher priority than the writer blocked on 'rwlock'
    16 7.  Main thread release the 'rwlock', the writer should get the lock first.
    17 
     4https://github.com/haiku/open_posix_testsuite/blob/from_haiku_trunk/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
    185}}}
    196
     7Expected result: Test passed
     8Actual result: Test failed. rd_thread blocked on read lock
    209
    21 NOTE: The test result is UNSUPPORTED if Thread Execution Scheduling option is not supported.
    22 
    23 
    24 Ref: ​https://github.com/haiku/open_posix_testsuite/blob/from_haiku_trunk/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
    25 
    26 Expected result: Test passed
    27 
    28 Actual Result: Test failed. rd_thread blocked on read lock
    29 
    30 Tested on: Haiku hrev54815 x86 with Open POSIX Test Suite 1.5.2
     10Tested on: Haiku hrev58305 x86 with Open POSIX Test Suite 1.5.2