Report 0048 Actions
Problem Report Number |
0048 |
Submitter's Classification |
Specification problem |
State |
Resolved |
Resolution |
Interpretation (INT) |
Problem Resolution ID |
INT.PX.0005 |
Raised |
2007-04-03 21:22 |
Updated |
2007-04-13 19:39 |
Published |
2007-04-13 19:39 |
Product Standard |
PSE52 Realtime Controller 1003.1-2003 System |
Certification Program |
POSIX Certified by IEEE and The Open Group |
Test Suite |
VSX4-PSE version 4.6.7 |
Test Identification |
ANSI.os/streamio/fopen/T.fopen.24
POSIX.os/files/creat/T.creat.22
POSIX.os/files/open/T.open.36 |
Specification |
IEEE Std 1003.13-2003 |
Location in Spec |
Section 2.3 "Error numbers", line 835 |
Problem Summary |
Various EMFILE related test cases fail if stat() can return EMFILE |
Problem Text |
Various EMFILE related test cases use stat() to check whether the file
size was modified as a side effect of a failed creat/O_TRUNC operation.
Our implementation of stat() can return EMFILE when all available file
descriptors have been used, resulting in test cases being reported as
Failed or Unresolved, even though they correctly implement the EMFILE
error for the interface being tested.
The specification allows this error from stat() - System Interfaces,
Issue 6, section 2.3 allows additional errors to be returned. |
Test Output |
************************************************************************
/tset/ANSI.os/streamio/fopen/T.fopen 24 Unresolved
Test Description:
One of the following conditions will occur If {_POSIX_OPEN_MAX} _
{OPEN_MAX} _ {PCTS_OPEN_MAX} then:
EMFILE in errno and NULL returned by fopen() when there are no more
file descriptors available in the calling process.
otherwise:
PCTS_OPEN_MAX file descriptors can be opened.
Posix Ref: Component FOPEN Assertion 8.2.3.11-11(A)
Test Information:
stat(./fopen-t.21, buf) failed - errno 24 (EMFILE)
************************************************************************
************************************************************************
/tset/POSIX.os/files/creat/T.creat 22 Failed
Test Description:
If {OPEN_MAX} _ {PCTS_OPEN_MAX}, then EMFILE in errno and a return
value of -1, on a call to creat(path, mode) when {OPEN_MAX} files have
already been opened
otherwise
PCTS_OPEN_MAX files can be opened.
Posix Ref: Component CREAT Assertion 5.3.2.4-48(A)
Test Strategy:
DETERMINE whether the value of NGROUPS_MAX using sysconf() with
_SC_NGROUPS_MAX
CREATE child process using cppair()
CREATE the lesser of OPEN_MAX and PCTS_OPEN_MAX files using creat()
the required number of times
VERIFY that creat() returned successfully and errno was not set
WRITE data to file on the last successful call to creat()
IF OPEN_MAX is less than PCTS_OPEN_MAX then
CREATE file using creat()
VERIFY that creat() returned -1 and errno was set to EMFILE
VERIFY that file was not truncated using stat()
REMOVE file using unlink()
IF OPEN_MAX is less than PCTS_OPEN_MAX then
CREATE file using creat()
VERIFY that creat() returned -1 and errno was set to EMFILE
VERIFY that file was not created using eaccess()
UNLINK file
Test Information:
stat(./creat-t.22, buf) failed - errno 24 (EMFILE)
creat("./creat-t.22", 0777) did not give correct results
************************************************************************
************************************************************************
/tset/POSIX.os/files/open/T.open 36 Failed
Test Description:
If {_POSIX_OPEN_MAX} _ {OPEN_MAX} _ {PCTS_OPEN_MAX}, then EMFILE in
errno and a return value of -1 on a call to open(path, oflag, mode)
when {OPEN_MAX} files have already been opened.
otherwise
{PCTS_OPEN_MAX} files can be opened.
Posix Ref: Component OPEN Assertion 5.3.1.4-62(A)
Test Strategy:
DETERMINE the value of NGROUPS_MAX using sysconf() with
_SC_NGROUPS_MAX
CREATE file using creat()
WRITE data to file using write()
CREATE child process using cppair()
OPEN the lesser of OPEN_MAX and PCTS_OPEN_MAX files using open() the
required number of times
VERIFY that open() returned successfully and errno was not set
IF OPEN_MAX is less than PCTS_OPEN_MAX then
OPEN file using open() with the O_CREAT flag
VERIFY that open() returned -1 and errno was set to EMFILE
VERIFY that file was not created using eaccess()
IF OPEN_MAX is less than PCTS_OPEN_MAX then
OPEN file using open() with the O_TRUNC flag
VERIFY that open() returned -1 and errno was set to EMFILE
VERIFY that file was not truncated using stat()
UNLINK file
Test Information:
stat(./open-t.36, buf) failed - errno 24 (EMFILE)
open("./open-t.36", O_RDWR|O_TRUNC) did not give correct results
************************************************************************ |
Review Information
Review Type |
SA Review |
Start Date |
2007-04-03 21:22 |
Last Updated |
2007-04-13 19:38 |
Completed |
2007-04-13 19:38 |
Status |
Complete |
Review Resolution |
Interpretation (INT) |
Review Conclusion |
Although the standard does not specify an EMFILE error for stat(), this
behaviour is allowed by the general rules about
additional errors in XSH6 section 2.3. An interpretation is granted. |
Problem Reporting System Options:
|