|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1549 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 1549.
Report 1549 Actions
Problem Report Number 1549 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0831 Raised 2000-08-27 08:00 Updated 2003-03-13 08:00 Published 2000-09-18 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.4 Test Identification CAPIbase/lockf 43 Problem Summary TSD4U.00292 lseek() fails during test setup because the offset is greater than the maximum file size Problem Text
The testcase attempts to lseek() using the following code:
#define MAXOFF_VAL(x) pow((double)2, (double)((x*8)-1))-1
offset = (off_t)MAXOFF_VAL(sizeof(off_t)) - OFF_TBELOW;
if ((ret = lseek(fd, offset, SEEK_SET)) == -1) {
The offset value is calculated off the size of off_t, which on our
implementation is 8 bytes. This gives an offset of around 2^63. However,
our max filesize for a LFS file is 64 GB (2^36). Thus lseek() returns the
EINVAL(errno 22) error above. There are no UNIX98 requirements for the
maximum LFS file size.
Note, that fixing this will also invalidate the method used for testing lockf()
EOVERFLOW errors. Since in IPL32_OFFBIG, off_t will have a max value of
2^63 and the file size limit can be alot less, using a size of 512 bytes
as the region to lock will not work.Test Output
TEST PURPOSE #43
EOVERFLOW in errno and return -1 on a call to int
lockf(int fildes, int function, off_t size) when size
is not 0 and the offset of the last byte in the
requested section cannot be represented correctly in
an object of type off_t.
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_LP64_OFF64 environment
PREP: Obtain off_t size in XBS5_LPBIG_OFFBIG environment
TEST: Execute test built in XBS5_ILP32_OFF32 (32-bit off_t) environment that:
opens a file for writing,
set the offset below that which can be represented in an off_t
verifies lockf returns -1 and sets errno to EOVERFLOW when offset
of the last byte in request cannot be represented in an off_t object
TEST: Execute test built in XBS5_ILP32_OFFBIG (64-bit off_t) environment that:
opens a file for writing,
set the offset below that which can be represented in an off_t
verifies lockf returns -1 and sets errno to EOVERFLOW when offset
of the last byte in request cannot be represented in an off_t object
ERROR: In test program: lseek() failed, errno = 22(Invalid argument)
TEST: Execute test built in XBS5_LP64_OFF64 (64-bit off_t) environment that:
opens a file for writing,
set the offset below that which can be represented in an off_t
verifies lockf returns -1 and sets errno to EOVERFLOW when offset
of the last byte in request cannot be represented in an off_t object
ERROR: In test program: lseek() failed, errno = 22(Invalid argument)
TEST: Execute test built in XBS5_LPBIG_OFFBIG (64-bit off_t) environment that:
opens a file for writing,
set the offset below that which can be represented in an off_t
verifies lockf returns -1 and sets errno to EOVERFLOW when offset
of the last byte in request cannot be represented in an off_t object
ERROR: In test program: lseek() failed, errno = 22(Invalid argument)
43 UNRESOLVEDReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a fault in the test suite.
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 1549
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority