HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1923 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1923.


Report 1923 Actions


    Problem Report Number 1923
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0559
    Raised 1998-03-19 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.4
    Test Identification LFS.os/ioprim/fcntl 4
    Problem Summary PG5R.002 This interpretation request is for the following assertions: LFS.os/ioprim/fcntl/T.fcntl 4 LFS.os/ioprim/lseek/T.lseek 2 LFS.os/streamio/fclose/T.fclose 1 LFS.os/streamio/fflush/T.fflush 1 LFS.os/stre...
    Problem Text
    This interpretation request is for the following assertions:

    LFS.os/ioprim/fcntl/T.fcntl 4
    LFS.os/ioprim/lseek/T.lseek 2
    LFS.os/streamio/fclose/T.fclose 1
    LFS.os/streamio/fflush/T.fflush 1
    LFS.os/streamio/fprintf/T.fprintf 1
    LFS.os/streamio/fputc/T.fputc 1
    LFS.os/streamio/fputs/T.fputs 1
    LFS.os/streamio/fputwc/T.fputwc 1
    LFS.os/streamio/fputws/T.fputws 1
    LFS.os/streamio/fseek/T.fseek 2
    LFS.os/streamio/fseek/T.fseek 3
    LFS.os/streamio/fseeko/T.fseeko 11
    LFS.os/streamio/fseeko/T.fseeko 17
    LFS.os/streamio/fwrite/T.fwrite 1
    LFS.os/streamio/printf/T.printf 1
    LFS.os/streamio/putc/T.putc 1
    LFS.os/streamio/putchar/T.putchar 1
    LFS.os/streamio/puts/T.puts 1
    LFS.os/streamio/putw/T.putw 1
    LFS.os/streamio/putwc/T.putwc 1
    LFS.os/streamio/putwchar/T.putwchar 1
    LFS.os/streamio/tmpfile/T.tmpfile 1
    LFS.os/streamio/vfprintf/T.vfprintf 1
    LFS.os/streamio/vprintf/T.vprintf 1


    The value of OFF_NORMAL_OFFMAX is set in the subset configuration
    (install_sub.sh) by calling lfs_calmax. However, lfs_calmax is
    using a non-XPG5 method to calculate the max offset allowed. The
    XPG5 XSH has a defined method that is usuable on per directory basis;
    page 1097 <limits.h> states:

    "FILESIZEBITS Minimum number of bits needed to represent, as a signed
    integer value, the maximum size of a regular file allowed in
    the specified directory.
    Minimum Acceptable Value: 32"

    Thus lfs_calcmax.c needs to first do lfsdir = tet_getvar("VSX5_LARGEFILE_DIR")

    and then something like

    MAXOFF_VAL = pow((double)2, (double)(pathconf(lfsdir,_PC_FILESIZEBITS)-1))-1


    Test Output

    ************************************************************************
    /tset/LFS.os/ioprim/fcntl/T.fcntl 4 Unresolved

    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 Information:
    lseek() to 9223372036854775807 failed - errno 22 (EINVAL)
    lseek() to 9223372036854775807 failed - errno 22 (EINVAL)
    lseek() to 9223372036854775807 failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/ioprim/lseek/T.lseek 2 Unresolved

    Test Description:
    When the file position requested by a seek operation would be larger
    than the value that can be contained in an entity of type off_t, then
    a call to lseek() returns -1, sets errno to EOVERFLOW and the file
    pointer is unchanged.

    Test Information:
    lseek() failed when expecting to succeed.
    lseek() failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fclose/T.fclose 1 Unresolved

    Test Description:
    A call to fclose() causes all buffered data to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fflush/T.fflush 1 Unresolved

    Test Description:
    A call to fflush() causes all buffered data to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fprintf/T.fprintf 1 Unresolved

    Test Description:
    A call to fprintf() causes all formatted data to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fputc/T.fputc 1 Unresolved

    Test Description:
    A call to fputc() causes the byte c to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fputs/T.fputs 1 Unresolved

    Test Description:
    A call to fputs() causes the null terminated string pointed to by s to
    be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fputwc/T.fputwc 1 Unresolved

    Test Description:
    A call to fputwc() causes the character corresponding to the wide
    character code wc to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fputws/T.fputws 1 Unresolved

    Test Description:
    A call to fputws() causes the character string corresponding to the
    wide character string ws to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fseek/T.fseek 2 Unresolved

    Test Description:
    When the file size limit is set to RLIM_INFINITY and a call to fseek()
    causes all buffered data to be written to stream and the resulting
    file size is less than the offset maximum established for the file,
    then the call to fseek() does not give an error.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************

    ************************************************************************
    /tset/LFS.os/streamio/fseek/T.fseek 3 Unresolved

    Test Description:
    When a call to fseek() attempts to set the file pointer to a position
    which cannot be represented in a value of type long, then the call
    returns -1 and sets errno to EOVERFLOW.

    Test Information:
    fseek() failed when expected to succeed- errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fseeko/T.fseeko 11 Unresolved

    Test Description:
    When the file size limit is set to RLIM_INFINITY and a call to fseek()
    causes all buffered data to be written to stream and the resulting
    file size is less than the offset maximum established for the file,
    then the call to fseeko() does not give an error.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************

    ************************************************************************
    /tset/LFS.os/streamio/fseeko/T.fseeko 17 Unresolved

    Test Description:
    When a call to fseeko() attempts to set the file pointer to a position
    which cannot be represented in a value of type off_t, then the call
    returns -1 and sets errno to EOVERFLOW.

    Test Information:
    fseeko() failed when expected to succeed- errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/fwrite/T.fwrite 1 Unresolved

    Test Description:
    A call to fwrite() causes the data from the array pointed to by ptr to
    be written to stream.
    Testing Requirements: Test for cases where the data to be written
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/printf/T.printf 1 Unresolved

    Test Description:
    A call to printf() causes all formatted data to be written to standard
    output.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/putc/T.putc 1 Unresolved

    Test Description:
    A call to putc() causes the byte c to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/putchar/T.putchar 1 Unresolved

    Test Description:
    A call to putchar() causes the byte c to be written to the standard
    output stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/puts/T.puts 1 Unresolved

    Test Description:
    A call to puts() causes the null terminated string pointed to by s to
    be written to the standard output stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/putw/T.putw 1 Unresolved

    Test Description:
    If either the LEGACY feature group is supported or putw() is
    supported:
    A call to putw() causes the word w to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476731, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/putwc/T.putwc 1 Unresolved

    Test Description:
    A call to putwc() causes the character corresponding to the wide
    character code wc to be written to stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)
    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/putwchar/T.putwchar 1 Unresolved

    Test Description:
    A call to putwchar() causes the character corresponding to the wide
    character code wc to be written to the standard output stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/tmpfile/T.tmpfile 1 Failed

    Test Description:
    A successful call to tmpfile() creates a file with an offset maximum
    that is equal to the largest value that can be contained in an entity
    of type off_t.

    Test Strategy:
    CALL tmpfile() to generate a temporary file and stream pointer
    VERIFY that tmpfile() has succeeded
    SEEK to the end of the file with lseek(stream, LFS_NORMAL_OFFMAX,
    SEEK_SET)
    VERIFY the success of the lseek() call
    WRITE one byte out to stream
    VERIFY that wrtie() returns -1 and sets errno to EFBIG

    Test Information:
    lseek(tmpfile, LFS_NORMAL_OFFMAX, SEEK_SET) failed.
    got errno 22(EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/vfprintf/T.vfprintf 1 Unresolved

    Test Description:
    A call to vfprintf() causes all formatted data to be written to
    stream.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or the
    maximum file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************
    ************************************************************************
    /tset/LFS.os/streamio/vprintf/T.vprintf 1 Unresolved

    Test Description:
    A call to vprintf() causes all formatted data to be written to
    standard output.
    Testing Requirements: Test for cases where the data to be flushed
    will be written to positions close to the offset maximum or maximum
    file size, whichever is the smaller.

    Test Information:
    lseek(fd, 68719476734, 0) failed - errno 22 (EINVAL)

    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    The value of LFS_NORMAL_OFFMAX is calculated as the maximum value that
    can be represented by an off_t in a `normal' process. It is not related
    to maximum file size. Tests which need to know the maximum file size
    obtain it by calling a user-supplied function lfs_umaxsize(), which
    typically uses fpathconf() in a manner similar to that shown above.

    It appears that this implementation is incorrectly returning EINVAL when
    lseek() is used to set the file offset to greater than the maximum file
    size of the file. This behaviour is not compliant with SUSv2, as can be
    seen from the definition of "offset maximum" in XBD5:

    "An attribute of an open file description representing the largest
    value that can be used as a file offset."

    It is clear from this that lseek() must be able to set the file offset
    to any value up to and including the "offset maximum". The offset
    maximum for a file descriptor is set when the file is opened. See for
    example the description of open() in XSH5:

    "The largest value that can be represented correctly in an object of
    type off_t will be established as the offset maximum in the open file
    description."

    Thus when a file descriptor is opened by a `normal' process, its offset
    maximum is set to the largest possible off_t value in that process, and
    this is the same value assigned to LFS_NORMAL_OFFMAX in the test suite.

    It is recommended that this waiver 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:

     

    Back   


Contact the Certification Authority