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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1636 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 1636.


Report 1636 Actions


    Problem Report Number 1636
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0193
    Raised 1999-01-22 08:00
    Updated 2003-03-13 08:00
    Published 1999-02-12 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.3
    Test Identification CAPI.os/streamio/fseek 2 3
    Specification System Interfaces and Libraries Issue 4 Version 2
    Location in Spec See Problem Text
    Problem Summary PIN4U.00059 This request claims the error returned by fseek() may vary depending on the underlying function.
    Problem Text
    In VSU5.0.2, these tests were checking only for the return
    code and for SIGPIPE. In VSU5.0.3, the test code has been
    changed to check for the error set in errno, ahead of the
    check for the signal.

    CAE Specifications for fseek says that EPIPE will be set in
    errno, and the test looks for it, while VSX tests for fseek
    and fsetpos functions look for ESPIPE. VSX tests seem to be based
    on POSIX Specifications, which says that the error returned will
    be based on the underlying function, which in this case is lseek.

    This is probably an error in CAE Specifications which needs to
    be changed. Code for the test cases need to be changed as well.

    Ref: 1. VSX4.4.2, test cases - fsetpos #6 and fseek #12
    2. POSIX - IEEE Standards 1003.1, System Application Program
    Interface [ C Language ], section 6.5.3.3 (Returns).

    Test Output
    TEST CASE: fseek

    TEST PURPOSE #2
    EPIPE in errno, return -1, and generate a SIGPIPE
    signal on a call to int fseek(FILE *stream, long int
    offset, int whence) when the call causes a call to
    write() which fails because an attempt is made to
    write to a PIPE that only has one end open.
    PREP: Catch SIGPIPE signal
    PREP: Create pipe
    PREP: Associate stream with write end of pipe
    PREP: Enable full stream buffering
    PREP: Write a buffer and a half worth of data
    PREP: Close read end of pipe
    TEST: fseek fails with EPIPE
    ERROR: fseek failed, errno = 29(ESPIPE - Illegal seek)
    TEST: fseek generates SIGPIPE
    CLEANUP: Ignore SIGPIPE signals
    CLEANUP: Shutdown pipe
    CLEANUP: Reset signal handler
    2 FAIL

    TEST PURPOSE #3
    EPIPE in errno, return -1, and generate a SIGPIPE
    signal on a call to int fseek(FILE *stream, long int
    offset, int whence) when the call causes a call to
    write() which fails because an attempt is made to
    write to a FIFO that only has one end open.
    PREP: Catch SIGPIPE signal
    PREP: Create fifo
    PREP: Open read end of fifo
    PREP: Associate stream with write end of pipe
    PREP: Enable full stream buffering
    PREP: Write a buffer and a half worth of data
    PREP: Close read end of fifo
    TEST: fseek fails with EPIPE
    ERROR: fseek failed, errno = 29(ESPIPE - Illegal seek)
    TEST: fseek generates SIGPIPE
    CLEANUP: Ignore SIGPIPE signals
    CLEANUP: Shutdown fifo
    CLEANUP: Reset signal handler
    3 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this issue be referred to the Base Work Group and a
    Permanent Interpretation be granted.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The fseek() manual page defines two error cases related to a
    pipe or FIFO:

    [EPIPE] The file descriptor underlying stream is associated with a pipe or
    FIFO.

    [EPIPE] An attempt was made to write to a pipe or FIFO that is not open for
    reading by any process; a SIGPIPE signal will also be sent to the thread.

    It would appear that the first error case is an error and that
    the EPIPE ought to be ESPIPE . This would be consistent with wording
    elsewhere in XSH Issue 5, and also consistent with the POSIX test
    methods standard.

    The second wording [EPIPE] is consistent with the POSIX definition
    of write().

    This should be forwarded to the Base WG for consideration, is the
    supposition that the first error be ESPIPE correct?
    Should either error be acceptable for the test cases, or
    is the second error condition not applicable given the first?


    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This is a grey area in the specification.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority