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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2732 Actions


    Problem Report Number 2732
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0700
    Raised 2021-07-13 09:50
    Updated 2021-09-04 11:20
    Published 2021-09-04 11:20
    Product Standard Commands and Utilities V5 (UNIX V7)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.3.20NW
    Test Identification /tset/POSIX.upe/more/more.ex Assertion: 132
    Specification Base Specifications Issue 7
    Location in Spec https://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html.
    Problem Summary Test for more Assertion 132 uses a non-text file as input
    Problem Text The test for Assertion 132 of the "more" utility uses this construct:
    printf 'abc\n' > ./+q
    if [ $? -ne 0 ]; then
    SetResult $TET_UNRESOLVED "Command failed: 'printf 'abc\n' > ./+q'"
    return
    fi

    $cmd /dev/null +q > $CT_STDOUT 2> $CT_STDERR
    CT_EXIT_VALUE=$?
    if [ $CT_EXIT_VALUE -ne 0 ]; then
    SetResult $TET_FAIL "Expected exit code = 0; Received $CT_EXIT_VALUE"
    else
    SetResult $TET_PASS
    fi

    But the standard says
    (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html, section 3.91) that
    /dev/null is a Character Special File. The standard further says
    (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html. under INPUT FILES) that
    "The input files being examined shall be text files." /dev/null is not a text file and this is not a
    portable test. There are many ways to portably create an empty file that could be used in this test.
    Test Output 400|144 132 1 05:46:41|IC Start
    520|144 128 54978 1 1|Assertion #132 (C): An argument beginning with '+' following an operand
    520|144 128 54978 4 1|Expected exit code = 0; Received 1
    
520|144 128 54978 4 2|Standard error isn't empty
    
520|144 128 54978 4 3|Contents of out.stderr:

    520|144 128 59659 1 1|/dev/null is not a regular file (use -f to see it)
    220|144 128 1 05:46:41|FAIL
    410|144 132 1 05:46:41|IC End

    Review Information

    Review Type TSMA Review
    Start Date 2021-07-13 09:50
    Last Updated 2021-07-13 09:19
    Completed 2021-07-13 09:19
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response The definition of the term "text file" in XBD7 section 3.403 talks only
    about the contents of the file. The file type has no effect on whether
    or not a file is a text file.

    There are many other tests that use /dev/null as input to a utility
    whose input files are required to be text files. There is nothing in the
    standard to suggest that the more utility needs to be treated
    differently.

    Note that in the test, the standard output of the more command it uses
    is not a terminal and the description of more says that in this case
    "all input files shall be copied to standard output in their entirety,
    without modification, except as specified for the -s option" (i.e. more
    behaves just like cat). So although there might be some justification
    for requesting a change to the standard to allow more to refuse to open
    non-regular files (and add the -f option), it would only make sense for
    this to apply to the case where the standard output is a terminal.

    Finally, although it is unlikely that a portable application would want
    to use more with /dev/null as input, other non-regular files such as
    FIFOs are certainly something that portable applications might rely on
    being able to open with more.

    It is recommended that this request is rejected.

    Review Type SA Review
    Start Date 2021-07-13 17:19
    Last Updated 2021-07-13 09:59
    Completed 2021-07-13 09:59
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion It is recommended that this request is rejected.

    The definition of the term "text file" in XBD7 section 3.403 talks only
    about the contents of the file. The file type has no effect on whether
    or not a file is a text file.

    There are many other tests that use /dev/null as input to a utility
    whose input files are required to be text files. There is nothing in the
    standard to suggest that the more utility needs to be treated
    differently.

    Note that in the test, the standard output of the more command it uses
    is not a terminal and the description of more says that in this case
    "all input files shall be copied to standard output in their entirety,
    without modification, except as specified for the -s option" (i.e. more
    behaves just like cat). So although there might be some justification
    for requesting a change to the standard to allow more to refuse to open
    non-regular files (and add the -f option), it would only make sense for
    this to apply to the case where the standard output is a terminal.

    Finally, although it is unlikely that a portable application would want
    to use more with /dev/null as input, other non-regular files such as
    FIFOs are certainly something that portable applications might rely on
    being able to open with more.


    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority