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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1040 Actions


    Problem Report Number 1040
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0279
    Raised 2000-11-20 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Commands and Utilities V3 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.1.2
    Test Identification POSIX.cmd/sort 5, 13
    Problem Summary PG4C.00131 These tests fail on systems where "sort -c" does not write a message to stderr when the exit status is 1.
    Problem Text
    According to the Commands and Utilities, Issue 5:

    "-c Check that the single input file is ordered as specified by the
    arguments and the collating sequence of the current locale. No
    output is produced; only the exit code is affected."

    The test code:

    CT_STDOUT=out.stdout
    CT_STDERR=out.stderr
    cmd=`OpenTP sort 5 A "Verify sort -c exits with 1 and writes stderr if not s
    orted."`


    $cmd -c unsorted1.txt > $CT_STDOUT 2> $CT_STDERR
    CT_EXIT_VALUE=$?
    if [ $CT_EXIT_VALUE -ne 1 ]; then
    SetResult $TET_FAIL "Expected exit code = 1; Received $CT_EXIT_VALUE"
    else
    SetResult $TET_PASS
    fi

    if [ -s $CT_STDERR ]; then
    SetResult $TET_PASS
    else
    SetResult $TET_FAIL "Standard error is empty"
    fi

    The failure occurs because $CT_STDERR is not of size > 0. However,
    according to the standard, it should not be size > 0 because no
    output would have been produced.
    Test Output
    ***********************************************************************
    /tset/POSIX.cmd/sort/sort.ex 1 Failed


    Test Information:
    Assertion #5 (A): Verify sort -c exits with 1 and writes stde
    <LC> rr if not sorted.
    Standard error is empty

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


    ***********************************************************************
    /tset/POSIX.cmd/sort/sort.ex 1 Failed


    Test Information:
    Assertion #13 (A): Verify sort -c -u exits with 1 and writes
    <LC> stderr.
    Standard error is empty

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

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    When the specification states "No output is produced" it is referring
    to the normal output of sorted data (to stdout or to the output file
    specified with -o) that would occur in the absence of the -c option.
    It does not mean that no diagnostic output is written to stderr.

    This misinterpretation of the specification by some implementors is
    precisely the reason that these tests were modified in VSC5.1.2 to
    add a check that stderr is not empty. The specification requires
    that a diagnostic is written to stderr when the exit code is non-zero,
    as stated in Base Working Group resolution bwg98-002. The ChangeLog
    file that accompanies the VSC5.1.2 release indicates that the changes
    to the tests for sort were made as a result of this resolution.

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