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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2484 Actions


    Problem Report Number 2484
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0674
    Raised 2005-10-27 03:42
    Updated 2005-10-28 19:38
    Published 2005-10-28 19:38
    Product Standard Commands and Utilities V4 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.2.7
    Test Identification POSIX.cmd/awk 35
    Specification Shell and Utilities Issue 6
    Problem Summary awk{35} : filename has "=", awk result is strange, so it fails.
    Problem Text I debugged awk{35} failure case after reviewing awk.ex source.
    If I test manually as below, I could see the problem exactly.

    1. create file as below;
    cat << "EOF" > file
    Beth 4.00 0
    Dan 3.75 0
    Kathy 4.00 10
    Mark 5.00 20
    EOF

    cat << "EOF" > awk.exp
    Mark 5.00 20
    EOF

    I. Normal case
    $ CT_STDOUT=out.stdout
    $ CT_STDERR=out.stderr
    $ cp file simplename
    $ awk '$2 > 4.00 {print $0}' simplename /dev/null > $CT_STDOUT 2> $CT_STDERR
    $ echo $?
    0
    $ cat $CT_STDOUT
    Mark 5.00 20 ==> result is same as awk.exp

    II. Fail case(file name has "=" syntax)
    $ CT_STDOUT=out.stdout
    $ CT_STDERR=out.stderr
    $ cp file 1x=y
    $ diff simplename 1x=y
    $ awk '$2 > 4.00 {print $0}' 1x=y /dev/null > $CT_STDOUT 2> $CT_STDERR
    $ echo $?
    0
    $ cat $CT_STDOUT ==> awk result is empty. so Fail

    $ cat 1x=y | awk '$2 > 4.00 {print $0}' > $CT_STDOUT 2> $CT_STDERR
    $ cat $CT_STDOUT
    Mark 5.00 20

    By above testing, I can see that if filename has "=", awk run result is
    strange.

    Do you have any idea how I can resolve this problem?








    Test Output 520|0 24 20527 1 1|Assertion #35 (A): Operand not syntactically an
    assignment is used as input file
    520|0 24 20527 2 1|Testing file name "simplename"
    520|0 24 20527 2 2|Testing file name "./x=y"
    520|0 24 20527 2 3|Standard output isn't the same as file 'awk.exp'
    520|0 24 20527 2 4|diff of "out.stdout" and "awk.exp":
    520|0 24 20527 2 5|*** out.stdout Wed Oct 26 10:23:07 2005
    520|0 24 20527 2 6|--- awk.exp Wed Oct 26 10:23:06 2005
    520|0 24 20527 2 7|***************
    520|0 24 20527 2 8|*** 0 ****
    520|0 24 20527 2 9|--- 1 ----
    520|0 24 20527 2 10|+ Mark 5.00 20
    520|0 24 20527 2 11|Testing file name
    "/tet/vsc/tet_tmp_dir/20526aa/tset/POSIX.cmd/awk/x=y"
    520|0 24 20527 2 12|Standard output isn't the same as file 'awk.exp'
    520|0 24 20527 2 13|diff of "out.stdout" and "awk.exp":
    520|0 24 20527 2 14|*** out.stdout Wed Oct 26 10:23:07 2005
    520|0 24 20527 2 15|--- awk.exp Wed Oct 26 10:23:06 2005
    520|0 24 20527 2 16|***************
    520|0 24 20527 2 17|*** 0 ****
    520|0 24 20527 2 18|--- 1 ----
    520|0 24 20527 2 19|+ Mark 5.00 20
    520|0 24 20527 2 20|Testing file name "1x=y"
    520|0 24 20527 2 21|Standard output isn't the same as file 'awk.exp'
    520|0 24 20527 2 22|diff of "out.stdout" and "awk.exp":
    520|0 24 20527 2 23|*** out.stdout Wed Oct 26 10:23:07 2005
    520|0 24 20527 2 24|--- awk.exp Wed Oct 26 10:23:06 2005
    520|0 24 20527 2 25|***************
    520|0 24 20527 2 26|*** 0 ****
    520|0 24 20527 2 27|--- 1 ----
    520|0 24 20527 2 28|+ Mark 5.00 20
    520|0 24 20527 2 29|Testing file name "x.y=z"
    520|0 24 20527 2 30|Standard output isn't the same as file 'awk.exp'
    520|0 24 20527 2 31|diff of "out.stdout" and "awk.exp":
    520|0 24 20527 2 32|*** out.stdout Wed Oct 26 10:23:07 2005
    520|0 24 20527 2 33|--- awk.exp Wed Oct 26 10:23:06 2005
    520|0 24 20527 2 34|***************
    520|0 24 20527 2 35|*** 0 ****
    520|0 24 20527 2 36|--- 1 ----
    520|0 24 20527 2 37|+ Mark 5.00 20
    520|0 24 20527 2 38|Testing file name "=x"
    520|0 24 20527 2 39|Standard output isn't the same as file 'awk.exp'
    520|0 24 20527 2 40|diff of "out.stdout" and "awk.exp":
    520|0 24 20527 2 41|*** out.stdout Wed Oct 26 10:23:07 2005
    520|0 24 20527 2 42|--- awk.exp Wed Oct 26 10:23:06 2005
    520|0 24 20527 2 43|***************
    520|0 24 20527 2 44|*** 0 ****
    520|0 24 20527 2 45|--- 1 ----
    520|0 24 20527 2 46|+ Mark 5.00 20
    220|0 24 1 10:23:07|FAIL

    Review Information

    Review Type TSMA Review
    Start Date 2005-10-27 03:42
    Last Updated 2005-10-27 19:15
    Completed 2005-10-27 19:15
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response This awk implementation is not recognising assignment operands in the
    way specified by the standard. It has taken the operand 1x=y to be an
    assignment instead of a file pathname. The standard states:

    "An operand that begins with an underscore or alphabetic character from
    the portable character set (see the table in the Base Definitions volume
    of IEEE Std 1003.1-2001, Section 6.1, Portable Character Set), followed
    by a sequence of underscores, digits, and alphabetics from the portable
    character set, followed by the '=' character, shall specify a variable
    assignment rather than a pathname."

    Since 1x=y begins with a digit, not with an underscore or alphabetic
    character, it should not be treated as an assignment.

    Review Type SA Review
    Start Date 2005-10-27 18:15
    Last Updated 2005-10-28 05:29
    Completed 2005-10-28 05:29
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion The SA agrees with the TSMA that there is not a deficiency in the test
    thus this PR is rejected as a TSD

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority