Opened 4 years ago
Last modified 6 weeks ago
#16696 new bug
SEM: Test FAILED - conformance/interfaces/sem_unlink/5-1.c
Reported by: | cocobean | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
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
Optional - per UNIX 2003 compliance. Result: PASSED on Linux.