#16696: SEM: Test FAILED - conformance/interfaces/sem_unlink/5-1.c
-------------------------------------------+-----------------------------
Reporter: cocobean | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: System/POSIX | Version: R1/Development
Keywords: POSIX, semaphores, sem_unlink | Blocked By:
Blocking: | Platform: All
-------------------------------------------+-----------------------------
This sample test aims to check the following assertion:
sem_unlink will return -1 and set errno to ENAMETOOLONG when the semaphore
name length is greater than PATH_MAX or a component length is greater than
NAME_MAX.
The steps are:
{{{
-> If PATH_MAX is positive,
-> create a semaphore with a name bigger than PATH_MAX.
-> if the creation succeeds, try to unlink. It should fail.
-> If NAME_MAX is positive, do similar test.
}}}
The test fails if the ENAMETOOLONG is not returned.
It also FAILS if this error is returned, as it means we can create a
semaphore
which cannot be removed.
So actually, if the creation succeeds, the test fails :))
Ref: conformance/interfaces/sem_unlink/5-1.c
Expected result: Test passed
Actual Result: [18:28:13]PATH_MAX: 1024
[18:28:13]Creation of the semaphore failed with error 2147459068: File
name too long
[18:28:13]NAME_MAX: 256
[18:28:13]Test conformance/interfaces/sem_unlink/5-1.c FAILED: The
function did not return ENAMETOOLONG as expected
Tested on: Haiku hrev54811 x86_gcc2 with Open POSIX Test 1.5.2
--
Ticket URL: <https://dev.haiku-os.org/ticket/16696>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.