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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0607 Actions


    Problem Report Number 0607
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0211
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Commands and Utilities V2 (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSC version 4.1.4
    Test Identification Section:POSIX.cmd/tail(1)/tail.ex 20 21 22 23
    Problem Summary PG4C.00065 The test fails because of insufficient delay between running the test in background and checking for expected output.
    Problem Text
    The tail command FAILS intermittently in Assertions 20, 21, 22, 23

    We are providing below our argument and analysis for Assertion #23.
    The same argument will hold good for the assertions 20-22 also.

    Below is an extract from tp23 (we have underlined some lines and
    numbered them for reference in the discussion below )

    tp23() {
    $TST_TRACE
    CT_STDOUT=out.stdout
    CT_STDERR=out.stderr
    .
    .
    .

    # Obtain a private copy of the input file and create expected output file
    # by invoking utility without -f option:
    cp more_than_10 file_23_infile > /dev/null 2>&1
    if [ $? -ne 0 ]; then
    SetResult $TET_UNRESOLVED "Command failed: 'cp more_than_10
    file_23_infile > /dev/null 2>&1'"
    return
    fi

    tail -10c < file_23_infile > file_23_exp 2>/dev/null
    if [ $? -ne 0 ]; then
    SetResult $TET_UNRESOLVED "Command failed: 'tail -10c < file_23_infile
    > file_23_exp 2>/dev/null'"
    return
    fi


    # Invoke 'tail -c 10 -f < file_21_infile' as a background process,
    redirecting
    # standard output to a temporary file and capturing its pid:

    tail -c 10 -f < file_23_infile > file_23_temp 2> /dev/null & ---------> ( 1 )
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    if [ $? -ne 0 ]; then
    SetResult $TET_FAIL "Command failed: 'tail -c 10 -f < file_23_infile >
    file_23_temp 2> /dev/null &'"
    else
    SetResult $TET_PASS
    fi

    proc_id=$!

    # Verify that the command WITHOUT the -f option generates same stdout as it
    # does WITH the -f option:

    cmp -s file_23_exp file_23_temp -----------------> ( 2 )
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    if [ $? -ne 0 ]; then
    SetResult $TET_FAIL "Command failed: 'cmp -s file_23_exp file_23_temp'"
    else
    SetResult $TET_PASS
    fi


    Command (2) is being executed after puting command (1) in the
    background. This is assuming that command (1) would have completed
    writing to the file "file_23_temp" before command (2) compares it with
    the expected output file "file_23_exp". This is incorrect assumption
    and cannot be guaranteed to be valid always.

    Hence we believe this is a Test Suite Deficiency and should be waivered.

    One possible suggestion to fix the test would be to introduce a sufficient
    Delay between the two process ( i.e. the tail -f and the cmp command ).
    >
    Test Output
    200|283 1 21:30:43|TP Start
    520|283 1 12237 1 1|Assertion #23 (A): When stdin is regular file, tail -cf
    file
    writes to stdout exactly what would be written by tail -10c file, and then
    does
    not terminates but reads other bytes from file
    520|283 1 12237 1 1|Command failed: 'cmp -s file_23_exp file_23_temp'
    220|283 1 1 21:30:53|FAIL
    410|283 23 1 21:30:54|IC End

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused.

    Journals have not been provided for all test cases.

    The reasoning for test purpose 23 appears to be valid. Test
    purposes 21 and 22 have constructs as described for 23 and are
    probably TSDs. But journals are required to tell for sure.

    Test purpose 20 already contains a VSC_NAP sleep between the
    background process and the comparison check. It should be
    possible to configure this test so that it passes.

    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