|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1297 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 1297.
Report 1297 Actions
Problem Report Number 1297 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0579 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1998-07-10 08:00 Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSU version 5.0.2 Test Identification CAPIbase/readv 72 Problem Summary TSD4U.00239 This test is not correctly verifying the assertion. Problem Text
There are multiple problems with this test, two of which have been
addressed by TSD4U.00225 (on systems that don't support the 64-bit
compilation environment) and TSD4U.00222 (on systems that support a
64-bit compilation environment but not a 64-bit execution environment).
Note that because of the problem noted in TSD4U.00225 (makefile test
for "unsupported" rather than "undefined" for getconf options), this
test also wrongly tests the unsupported XBS5_LP64_OFF64 and
XBS5_LPBIG_OFFBIG environments on the system under test. However,
the test continues because as per XSH5, XBS5_ILP64_OFF64_CFLAGS
and XBS5_LPBIG_OFFBIG_CFLAGS are still valid options to getconf
though we return the null string for each in this case. This results
in make creating default 32-bit, off32 binaries, when the test is
expecting LP64_OFF64 and LPBIG_OFFBIG binaries.
Once we can get by the failures noted above, we are left with the
remaining failure with readv() which is occurring in the valid 32-bit
tests as well:
ERROR: In LFS program: readv() did not fail as expected. Expected:
-1 Recevied: 0
This failure is the result of an error in the test. The tests does the
following:
Process 1 is compiled with small off_t's.
Process 2 is compiled with large off_t's.
Process 1 opens a file - a regular open so it has small off_t's.
Process 1 then forks and execs process 2.
Process 2 opens the same file, via a passed filename, with large off_t's.
Process 2 then does an ftruncate() on this file and closes it.
Process 2 uses a passed file descriptor from process 1 to attempt
to seek and read past the 32-bit boundary expecting a failure.
Rather than returning the expected EOVERFLOW, readv() returns 0
indicating EOF. The reason for this is that the test seeks TO the
end-of-file (exactly to where the file was truncated), not BEFORE
the end of file. As taken from the t72lrgoff.c file:
ftruncate(fd1, (off_t)MAXOFF_VAL(small_offt)+OFF_TBEYOND)
and then:
seek(fd, (off_t)MAXOFF_VAL(small_offt)+OFF_TBEYOND, SEEK_SET)
Because it is the end of file, readv() returns 0 to indicate EOF. This
is as per the XSH5 description for readv (page 690):
[EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting
position is before the end-of-file and the starting position
is greater than or equal to the offset maximum established in the
open file description associated with fildes.
If this test is updated to seek to a position BEFORE the end of file, the
test passes.Test Output
TEST PURPOSE #72
If the implementation allows creation of a file
description with an offset maximum less than the
largest size it supports for an off_t:
EOVERFLOW in errno and return -1 on a call to ssize_t
readv(int fildes, const struct iovec *iov, int iovcnt)
when the file is a regular file, nbyte is greater than
zero, the starting position is before the end of file,
and the starting position is greater than the offset
maximum established in the open file description
associated with fildes.
PREP: Check for existence of programming environments
PREP: Obtain off_t size in XBS5_ILP32_OFF32 environment
PREP: Obtain off_t size in XBS5_ILP32_OFFBIG environment
PREP: Obtain off_t size in XBS5_ILP64_OFF64 environment
PREP: Obtain off_t size in XBS5_LPBIG_OFFBIG environment
PREP: Open communication pipe for child
PREP: Fork a child
PREP: Wait for child
INFO: Read child's test result
ERROR: In LFS program: readv() did not fail as expected. Expected: -1
Recevied: 0
PREP: Open communication pipe for child
PREP: Fork a child
PREP: Connect child's pipe to stdout
PREP: Execute a program compiled in XBS5_ILP32_OFF32(32-bit off_t)
environment that:
opens a file that is larger than which can be represented in 32-bit
off_t,
set the offset greater than the value that can be
represented in 32-bit off_t,
execs program compiled in XBS5_ILP32_OFFBIG(64-bit off_t) environment,
passing
it the open file descriptor
TEST: readv returns -1 and sets errno to EOVERFLOW when offset is beyond the
offset maximum
PREP: Wait for child
INFO: Read child's test result
ERROR: In 32-bit program: open() failed, errno = 79(Value too large for defined
data type)
PREP: Open communication pipe for child
PREP: Fork a child
PREP: Connect child's pipe to stdout
PREP: Execute a program compiled in XBS5_ILP64_OFF64(32-bit off_t)
environment that:
opens a file that is larger than which can be represented in 32-bit
off_t,
set the offset greater than the value that can be
represented in 32-bit off_t,
execs program compiled in XBS5_ILP32_OFFBIG(64-bit off_t) environment,
passing
it the open file descriptor
TEST: readv returns -1 and sets errno to EOVERFLOW when offset is beyond the
offset maximum
PREP: Wait for child
INFO: Read child's test result
ERROR: In 32-bit program: open() failed, errno = 79(Value too large for defined
data type)
PREP: Connect child's pipe to stdout
PREP: Execute a program compiled in XBS5_LPBIG_OFFBIG(32-bit off_t)
environment that:
opens a file that is larger than which can be represented in 32-bit
off_t,
set the offset greater than the value that can be
represented in 32-bit off_t,
execs program compiled in XBS5_ILP32_OFFBIG(64-bit off_t) environment,
passing
it the open file descriptor
TEST: readv returns -1 and sets errno to EOVERFLOW when offset is beyond the
offset maximum
72 FAILReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We agree this is a Test Suite Deficiency in the test suite versions listed.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 1297
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority