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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2535 Actions


    Problem Report Number 2535
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0680
    Raised 2007-07-20 21:09
    Updated 2007-07-27 19:38
    Published 2007-07-27 19:38
    Product Standard Commands and Utilities V4 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.2.10
    Test Identification POSIX.cmd/xargs 44 45
    Specification Shell and Utilities Issue 6
    Location in Spec test command at line 35182 in the combined PDF version.
    Problem Summary special characters that are generated by the testcase cause the test
    statement to fail
    Problem Text In addition to the test output, the following was observed on the terminal.

    t2.sh[10]: test: argument expected
    t2.sh[10]: test: argument expected
    t2.sh[10]: test: argument expected

    the problem is with the following statement in the tests

    # skip double-quote and newline (c is empty for newline)
    if test -n "$c" && test "$c" != '"'

    The test generates "!", "=", and "(" as characters. These are discussed
    these in Application Usage section as needing some form of escaping.

    In particular the failures look like this:

    $ test -n "="
    ksh: test: argument expected
    $ test "!"
    ksh: test: argument expected
    $ test "("
    ksh: test: argument expected
    Test Output
    ***********************************************************************

    /tset/POSIX.cmd/xargs/xargs.ex 44 Failed


    Test Information:
    Assertion #44 (A): quoting with double-quotes
    Command failed: 'test $(wc -l < xargs_eso_44) -eq 253'


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

    ***********************************************************************
    /tset/POSIX.cmd/xargs/xargs.ex 45 Failed


    Test Information:
    Assertion #45 (A): quoting with apostrophes
    Command failed: 'test $(wc -l < xargs_eso_45) -eq 253'


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

    Review Information

    Review Type TSMA Review
    Start Date 2007-07-20 21:09
    Last Updated 2007-07-20 23:09
    Completed 2007-07-20 23:09
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response These failures are cause by non-conformance of the implementation's
    test utility. The standard states the following rules for test with
    2 arguments:

    * If $1 is '!' , exit true if $2 is null, false if $2 is not null.

    * If $1 is a unary primary, exit true if the unary test is true,
    false if the unary test is false.

    In the test code, $1 is -n so the first bullet does not apply.
    The second bullet requires the unary primary -n to be evaluated.

    The standard states the following rules for test with 3 arguments:

    * If $2 is a binary primary, perform the binary test of $1 and $3.

    * If $1 is '!' , negate the two-argument test of $2 and $3.

    * If $1 is '(' and $3 is ')' , perform the unary test of $2.

    In the test code, $2 is != which is a binary primary, so the
    first bullet applies.

    The application usage section talks about problems caused by
    special characters in conjunction with -a and -o, recommending
    the use of && and || instead. The test code uses &&. It also
    talks about escaping parentheses to protect them from the shell.
    That doesn't apply here, as the ( is in a shell variable; it is
    not being interpreted by the shell. Finally, it talks about
    problems with special characters in historical versions of
    test. This seems to be the cause of the problem - the behaviour
    of the test utility on this implementation is (at least partly)
    historical, not conforming.

    Review Type SA Review
    Start Date 2007-07-20 22:09
    Last Updated 2007-07-21 03:50
    Completed 2007-07-21 03:50
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion This PR is rejected as a TSD as historical non conforming behavior by
    the implementation, rather than bad test code, is the believed to be the
    caused of the unexpected behaour

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority