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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2722 Actions


    Problem Report Number 2722
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1421
    Raised 2020-07-24 02:02
    Updated 2020-07-24 09:56
    Published 2020-07-24 09:56
    Product Standard Commands and Utilities V4 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSC version 5.3.18
    Test Identification /tset/POSIX.annexA/yacc/yacc_02.ex{140}
    Specification Shell and Utilities Issue 6
    Location in Spec https://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html
    Problem Summary The test for assertion 140 of yacc creates an invalid yacc file yacc_in_140_1.y, causing the test to
    fail.
    Problem Text In tp140() of /tset/POSIX.annexA/yacc/yacc_02.ex, a yacc file is created using the following shell code:

    cat << \VSC-EOF > yacc_in_140_1.y
    %{
    #include <stdio.h>
    %}
    %%
    start: 'a'
    %%
    int main() {
    yyparse();
    return(0);

    }
    int yyerror(const char *s)
    {
    printf("error\n");
    exit(0);
    /* NOTREACHED */
    return(0);
    }

    int yylex()
    {
    return 'b';
    }
    VSC-EOF

    The problem lies in the call to exit() in the function yyerror(). According to ISO/IEC 9989:1999, a source file that invokes
    exit() must first either include <stdlib.h> or provide a function declaration for exit(). The C program that yacc generates
    from this (y.tab.c) then fails to compile.
    Test Output 00|0 68 15:18:36|TP Start
    520|0 68 20255 1 1|Assertion #140 (C): When the parser is in a state where the action associated wi...
    520|0 68 20255 4 1|Command failed: 'c99 y.tab.c >/dev/null 2>&1'
    520|0 68 20255 4 2|Standard output isn't the same as file 'yacc_out_140_1'
    520|0 68 20255 4 3|diff of "out.stdout" and "yacc_out_140_1":
    520|0 68 20255 4 4|*** out.stdout Thu Jul 16 15:18:36 2020
    520|0 68 20255 4 5|--- yacc_out_140_1 Thu Jul 16 15:18:36 2020
    520|0 68 20255 4 6|***************
    520|0 68 20255 4 7|*** 1 ****
    520|0 68 20255 4 8|! a
    520|0 68 20255 4 9|--- 1 ----
    520|0 68 20255 4 10|! error
    220|0 68 1 15:18:36|FAIL

    Review Information

    Review Type TSMA Review
    Start Date 2020-07-24 02:02
    Last Updated 2020-07-24 09:46
    Completed 2020-07-24 09:46
    Status Complete
    Review Recommendation Test Suite Deficiency (TSD)
    Review Response This is accepted as a fault in the test suite.

    Review Type SA Review
    Start Date 2020-07-24 17:46
    Last Updated 2020-07-24 09:56
    Completed 2020-07-24 09:56
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion A test suite deficiency is granted

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority