|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1931 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 1931.
Report 1931 Actions
Problem Report Number 1931 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0567 Raised 2002-05-24 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSX5 version 5.1.6 Test Identification LFS.os/ioprim/fcntl 4 Linked Problem Reports PIN5.003, (in, old, system) Problem Summary PG5R.010 The test output has changed from VSX 5.1.4 to current release 5.1.6. But the cause of the failures is still the same as described in PIN5.003. Problem Text
The test output has changed from VSX 5.1.4 to current release 5.1.6. But the
cause of the failures is still the same as described in PIN5.003.Test Output
************************************************************************
/tset/LFS.os/ioprim/fcntl/T.fcntl 4 Failed
Test Description:
When cmd is F_GETLK, FSETLK or F_SETLKW and l_len is zero and the
smallest offset in the requested segment cannot be represented in an
entity of type off_t, then a call to fcntl() returns -1 and sets errno
to EOVERFLOW.
Test Strategy:
OBTAIN limit-setting privilege, using setprv(PRV_LIMITS)
SET the hard and soft file size limits to RLIM_INFINITY, using
setrlimit()
OPEN a new file in the current directory, using creat()
REPEAT for F_GETLK, F_SETLK and F_SETLKW:
SEEK to offset 1, using lseek()
CALL fcntl() with l_type=F_WRLCK, l_whence=SEEK_CUR,
l_start=LFS_NORMAL_OFFMAX, l_len=0
VERIFY that fcntl() returned -1 with errno set to EOVERFLOW
Test Information:
fcntl(F_GETLK) set errno to 22 (EINVAL), expected 127 (EOVERFLOW)
fcntl(F_SETLK) set errno to 22 (EINVAL), expected 127 (EOVERFLOW)
fcntl(F_SETLKW) set errno to 22 (EINVAL), expected 127 (EOVERFLOW)
************************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The basis for granting PIN5.003 was the description of the EINVAL
error for lseek() in POSIX.1-1996:
[EINVAL] ... the resulting file offset would be invalid
and a decision by the Base Working Group that it is acceptable for
implementations to treat the offset used in the lseek() call made
by VSX5.1.4 as invalid.
Now that the test has been modified to avoid using an invalid offset in
the lseek() call, the test fails at the subsequent fcntl() call. The
question now is whether the specification allows fcntl() to set errno
to EINVAL instead of EOVERFLOW under the conditions set up by the test.
The only relevant part of the description of the EINVAL error for
fcntl() in XSH5 is:
[EINVAL] ... the cmd argument is F_GETLK, F_SETLK or F_SETLKW and
the data pointed to by arg is not valid
This condition would apply to the test if the struct flock used in the
fcntl() call contains some invalid data. The values set in struct flock
are as follows:
l_type is F_WRLCK
l_whence is SEEK_CUR
l_start is set to the maximum value of off_t
l_len is 0
None of these values is invalid, and so the condition does not apply.
There is still one way in which the specification might allow the fcntl()
call to give an EINVAL error, and that is the rule regarding additional
error conditions in XSH5 Section 2.3 "Error Numbers". This states:
Implementations ... may generate errors included in this list
under circumstances other than those described here
However, it also states:
Implementations will not generate a different error number from
the ones described here for error conditions described in this
specification
The condition which has been set up by the test is described on the
fcntl() page as follows:
[EOVERFLOW]
The cmd argument is F_GETLK, F_SETLK or F_SETLKW and the
smallest or, if l_len is non-zero, the largest offset of any
byte in the requested segment cannot be represented correctly
in an object of type off_t.
Therefore because the condition is described in the specification,
fcntl() is required to set errno to EOVERFLOW for this condition, and
is not allowed to set it to EINVAL.
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 1931
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority