|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0493 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0493.
Report 0493 Actions
Problem Report Number 0493 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0112 Raised 1995-09-06 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.5 Test Identification POSIX.os/ioprim/fcntl 15, 16 Linked Problem Reports TSD4.185, (in, old, system) Problem Summary PG4R.113 Some VSX fcntl() tests attempt to verify that adjacent fcntl() record locks are coalesced by the operating system into one lock. We believe that these tests are testing fcntl() locking characteristics... Problem Text
Some VSX fcntl() tests attempt to verify that adjacent fcntl()
record locks are coalesced by the operating system into one lock.
We believe that these tests are testing fcntl() locking characteristics
not specified by X/open or POSIX. POSIX states that the GETLK command
must return a lock, however, since POSIX does not specify how the
operating system should implement record locks, the only information
that must be returned is that a lock exists on a given byte.
We found XPG3 waivers for this problem (PG3san.146, PG3san.254,
PG3san.501) but were unsure that any of these waivers could be used in
XPG4 branding. We also found a reference to the XPG3 waivers in
PG4Rsan.020 which agreed that the function of coalescing adjacent
locks was not required. It was suggested that we submit a new request
foa a XPG4 waiver.
The authors of the original waivers included tests 11, 12, 15, 16,
and 23 in their list of tests failing but only tests 15 and 16 are
failing on our implementation so those are the only ones we are
requesting waivers for.
This request was submitted once as req.4.2.413 which was refused and
the consultant asked for more information. See TSD4.185 for detailed
VSX_DBUG output generated to support our interpretation request for
VSX 4.3.4.
To summarize, after the first call to fcntl(), the child saw a
5-byte lock starting at byte 5, as expected. After the second
call, the child saw a 10-byte lock starting at byte 5. After the
third call, the child unexpectedly saw a 5-byte lock starting at
byte 5. Upon further investigation, we have found that after the
third call to fcntl(), there are two locks associated with the
file, the 5-byte lock starting at byte 5 and the 10-byte lock
starting at byte 10.
- It is also interesting to note that test 15 fails on our
implementation but test 11 is virtually identical and it succeeds.
The difference between the tests is that test 11 uses F_SETLK and
test 15 uses F_SETLKW. For some reason, these two ways to set
locks work differently. After the third fcntl(F_SETLK) call, the
child will see a 15-byte lock starting at byte 5(as expected).
After the third fcntl(F_SETLKW) call, the child sees a 5-byte lock
starting at byte 5. While this is indeed strange, the standards
do not prevent F_SETLKW and F_SETLK from combining locks
differently as long as the status of individual bytes is correct.Test Output
/tset/POSIX.os/ioprim/fcntl/T.fcntl 15 Failed
Test Description:
For the XNFS specification:
if the implementation supports file locking for files residing on
a remote file system: On a call to fcntl(fildes, F_SETLKW, arg)
when l_type = F_RDLCK is specified a shared lock is created on the
segment specified in arg.
For the XSH specification:
On a call to fcntl(fildes, F_SETLKW, arg) when l_type = F_RDLCK is
specified a shared lock is created on the segment specified in
arg.
Posix Ref: Component FCNTL Assertion 6.5.2.2-20(A)
Test Strategy:
OPEN pipes using opensync() - (genlib)
OPEN new file using creat()
WRITE 40 bytes to filee
CLOSE file and OPEN it again O_RDWR
SEEK to offset 5 within the file
CREATE process pair
PARENT Process:
SET lock {F_RDLCK, SEEK_SET, 5, 5, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
5, 20, 0} gives lock description {F_RDLCK, SEEK_SET, 5, 5,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_RDLCK, SEEK_SET, 10, 5, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
5, 20, 0} gives lock description {F_RDLCK, SEEK_SET, 5, 10,
getppid()}
WRITTE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_RDLCK, SEEK_SET, 10, 10, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
5, 20, 0} gives lock description {F_RDLCK, SEEK_SET, 5, 15,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_RDLCK, SEEK_SET, 5, 20, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
5, 25, 0} gives lock description {F_RDLCK, SEEK_SET, 5, 20,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_WRLCK, SEEK_SET, 20, 10, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
5, 25, 0} gives lock description {F_RDLCK, SEEK_SET, 5, 15,
getppid()}
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
20, 25, 0} gives lock description {F_WRLCK, SEEK_SET, 20, 10,
getppid()}
Test Information:
F_RDLCK not created/detected properly
lock lengths differ: got 5 - expected 15
************************************************************************
************************************************************************
/test/POSIX.os/ioprim/fcntl/T.fcntl 16 Failed
Test Description:
For the XNFS specification:
If the implementation supports file locking for files residing on
a remote file system: On a call to fcntl(fildes, F_SETLKW, arg)
when l_type = F_WRLCK is specified an exclusive lock is created on
the segment specified in arg.
For the XSH specification:
On a call to fcntl(fildes, F_SETLKW, arg) when l_type = F_WRLCK is
specified an exclusive lock is created on the segment specified in
arg.
Posix Ref: Component FCNTL Assertion 6.5.2.2-21(A)
Test Strategy:
OPEN pipes using opensync() - (genlib)
OPEN new file using creat()
WRITE 40 bytes to file
CLOSE file and OPEN it again O_RDWR
SEEK to offset 5 within the file
CREATE process pair
PARENT Process:
SET lock {F_WRLCK, SEEK_SET, 5, 5, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
5, 20, 0} gives lock description {F_WRLCK, SEEK_SET, 5, 5,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_WRLCK, SEEK_SET, 10, 5, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
5, 20, 0} gives lock description {F_WRLCK, SEEK_SET, 5, 10,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_WRLCK, SEEK_SET, 10, 10, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
5, 20, 0} gives lock description {F_WRLCK, SEEK_SET, 5, 15,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_WRLCK, SEEK_SET, 5, 20, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
5, 25, 0} gives lock description {F_WRLCK, SEEK_SET, 5, 20,
getppid()}
WRITE data to pipe using sendsync() - (genlib)
PARENT Process:
READ data from pipe using waitsync() - (genlib)
SET lock {F_RDLCK, SEEK_SET, 20, 10, 0} using fcntl(F_SETLKW)
WRITE data to pipe using sendsync() - (genlib)
CHILD Process:
READ data from pipe using waitsync() - (genlib)
VERIFY that fcntl(F_GETLK) with lock description {F_RDLCK, SEEK_SET,
5, 25, 0} gives lock description {F_WRLCK, SEEK_SET, 5, 15,
getppid()}
VERIFY that fcntl(F_GETLK) with lock description {F_WRLCK, SEEK_SET,
20, 25, 0} gives lock description {F_RDLCK, SEEK_SET, 20, 10,
getppid()}
Test Information:
F_RDLCK not created/detected properly
lock lengths differ: got 5 - expected 15
*******************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This Test Suite Deficiency is already covered by the waiver TSD4.220.
It is recommended that this request is refused.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 0493
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority