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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1039 Actions


    Problem Report Number 1039
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0278
    Raised 1999-12-10 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 5.0.2
    Test Identification POSIX.cmd/mailx 14 132 134
    Problem Summary PG4C.00130 These tests fail because the "record" file is written in the background after mailx has exited.
    Problem Text
    mailx #14, #132, and #134 are failing on our system now that we
    have gone to a faster processor.

    mailx fork/exec's tsmail which actually sends the mail and then
    writes the mail to the record file mailx_out_1

    On a faster faster processor the relative performance improvement
    of fork/exec is not as great as that of the rest of the script
    and mailx_out_1 is not written by the time it's checked in the
    script.

    Since the testsuites are intended to test functionality and not
    performance we feel that this is a testsuite problem, and not
    something that needs to be changed in our implementation.

    The following demonstrates the situation for mailx#14:

    You can see I tried to cat and ls mailx_out_1 immediately after
    the first mailx call and it was not there. After sleeping 7 sec
    mailx_out_1 is there and the testcase goes on to PASS.
    (This sleep duration could probably be less, I did not try to
    fine tune how long it has to sleep in order to have the file
    created)

    tp14() {
    $TST_TRACE
    CT_STDOUT=out.stdout
    CT_STDERR=out.stderr
    cmd=`OpenTP mailx_01 14 C "The -s option sets the subject"`


    if . `GetConfig POSIX2_UPE` = "undefined" .; then
    SetResult $TET_UNSUPPORTED
    return
    fi


    begintest
    if . $? -ne 0 .; then
    SetResult $TET_UNRESOLVED "Command failed: 'begintest'"
    return
    fi

    setmailrc 'set record=mailx_out_1'
    if . $? -ne 0 .; then
    SetResult $TET_UNRESOLVED "Command failed: 'setmailrc 'set rec
    return
    fi

    subject='yyyyyyyyyy'
    if . $? -ne 0 .; then
    SetResult $TET_UNRESOLVED "Command failed: 'subject='yyyyyyyyy
    return
    fi

    printf "%s" "Test the -s option" | mailx -s $subject $VSC_MAIL_USE
    CT_EXIT_VALUE=$?

    # VWM cat mailx_out_1 right after mailx -s called... see if it's t
    ls -l mailx_out_1
    cat mailx_out_1

    if . $CT_EXIT_VALUE -ne 0 .; then
    SetResult $TET_FAIL "Expected exit code = 0; Received $CT_EXIT
    else
    SetResult $TET_PASS
    fi
    if . ! -s $CT_STDERR .; then
    SetResult $TET_PASS
    else
    SetResult $TET_FAIL "Standard error isn't empty"
    JrnlFile $CT_STDERR
    fi

    #VWM sleep to see if it's timing
    echo "VWM sleep 7 to see if it is timing"
    sleep 7

    # VWM cat mailx_out_1 right after sleep... see if it's there
    ls -l mailx_out_1
    cat mailx_out_1

    # verify that the string "yyyyyyyyyy" was found in the subject
    # field
    printf "print /yyyyyyyyyy\nexit\n" | mailx -n -N -f mailx_out_
    CT_EXIT_VALUE=$?
    if . $CT_EXIT_VALUE -ne 0 .; then
    SetResult $TET_FAIL "Expected exit code = 0; Received $CT_
    else
    SetResult $TET_PASS
    fi

    grep -e "Test the -s option" $CT_STDOUT > /dev/null
    if . ! $? -eq 0 .; then
    SetResult $TET_FAIL "\"Test the -s option\" wasn't found i
    else
    SetResult $TET_PASS
    fi

    if . -z "$VSC_DEBUG" . ; then
    .rm -f $CT_STDOUT $CT_STDERR
    fi
    CloseTP
    } # End of tp14
    ------------------------------------------------------------------------
    Here's the output, you can see only the 2nd ls -l and cat find that the
    file mailx_out_1 exists, (which should have been
    created by the 1st mailx call).

    $ tcc -s tet_scen.mailx01 -bec vsc all 2>/tmp/viv/mailx01.stderr.Dec1
    journal file name is: /vsc/VSC5.0.2/vsc/results/0130bec/journall
    VWM sleep 7 to see if it is timing
    -rw-rw-rw- 1 VSC0 VSCG0 84 Dec 1 12:56 mailx_out_1
    >From VSC0 Wed Dec 1 12:56:16 1999
    To: VSC00
    Subject: yyyyyyyyyyy
    Test the -s optionn
    you have mail in /usr/mail/VSC0.



    Neither ls -l mailx_out_1 nor cat mailx_out_1 called immediately after
    printf "%s" "Test the -s option" | mailx -s $subject $VSC_MAIL_USER >
    $CT_STDOUT 2> $CT_STDERR
    find the file mailx_out_1, but the same commands after sleeping for 7
    seconds find that file


    Note that /tmp/viv/mailx01.stderr.Dec1 contains the following error
    messages
    ls: FSUM6785 File or directory "mailx_out_1" is not found
    cat: mailx_out_1: EDC5129I No such file or directory.
    created by the first ls and cat calls.

    Test Output
    200|199 1 13:06:49|TP Start
    520|199 1 285212702 1 1|Assertion #14 (C): The -s option sets the subject
    520|199 1 285212702 1 11|Expected exit code = 0; Received 1
    520|199 1 285212702 1 12|"Test the -s option" wasn't found in standard
    output
    220|199 1 1 13:06:50|FAIL
    410|199 14 1 13:06:50|IC End

    400|202 132 1 13:41:54|IC Start
    200|202 1 13:41:54|TP Start
    520|202 1 721420327 1 1|Assertion #132 (A): GA10: attributes of newly
    created f
    520|202 1 721420327 1 2| <LC> iles
    520|202 1 721420327 1 11|ls: FSUM6785 File or directory "mailx_out_1" is
    not fo
    520|202 1 721420327 1 12| <LC> und
    520|202 1 721420327 1 13|Failure: file mode '' did not match RE
    '-rw[a-rt-zA-RT
    520|202 1 721420327 1 14| <LC> -Z-]r-[a-rt-zA-RT-Z-]-w[a-rt-zA-RT-Z-]'.
    520|202 1 721420327 1 15|ga10 failed
    220|202 1 1 13:41:56|FAIL
    410|202 132 1 13:41:56|IC End

    400|202 134 1 13:41:57|IC Start
    200|202 1 13:41:57|TP Start
    520|202 1 721420327 1 1|Assertion #134 (A): GA12: pathname resolution
    520|202 1 721420327 1 11|'mailx_out_1' was not affected by the command
    line.
    520|202 1 721420327 1 12|ga60 failed
    520|202 1 721420327 1 13|'mailx_out_1' was not affected by the command
    line.
    520|202 1 721420327 1 14|ga61 failed
    520|202 1 721420327 1 15|'mailx_dir_1/mailx_out_1' was not affected by the
    comm
    520|202 1 721420327 1 16| <LC> and line.
    520|202 1 721420327 1 17|ga64 failed
    520|202 1 721420327 1 18|'mailx_dir_1/mailx_out_1' was not affected by the
    comm
    520|202 1 721420327 1 19| <LC> and line.
    520|202 1 721420327 1 20|ga65 failed
    520|202 1 721420327 1 21|'mailx_dir_1/mailx_out_1' was not affected by the
    comm
    520|202 1 721420327 1 22| <LC> and line.
    520|202 1 721420327 1 23|ga66 failed
    520|202 1 721420327 1 24|'mailx_dir_1/mailx_out_1' was not affected by the
    comm
    520|202 1 721420327 1 25| <LC> and line.
    520|202 1 721420327 1 26|ga666 failed
    520|202 1 721420327 1 27|'mailx_out_1' was not affected by the command
    line.
    520|202 1 721420327 1 28|ga69 failed
    520|202 1 721420327 1 29|'mailx_dir_2/mailx_dir_1/mailx_out_1' was not
    affected
    520|202 1 721420327 1 30| <LC> by the command line.
    520|202 1 721420327 1 31|ga65 failed
    520|202 1 721420327 1 32|'mailx_dir_2/mailx_dir_1/mailx_out_1' was not
    affected
    520|202 1 721420327 1 33| <LC> by the command line.
    520|202 1 721420327 1 34|ga666 failed
    220|202 1 1 13:42:28|FAIL
    410|202 134 1 13:42:28|IC End



    #132 also fails sometimes as follows:

    400|202 132 1 18:56:06|IC Start
    200|202 1 18:56:06|TP Start
    520|202 1 637534229 1 1|Assertion #132 (A): GA10: attributes of newly
    created f
    520|202 1 637534229 1 2| <LC> iles
    520|202 1 637534229 1 11|Error: Test file mailx_out_1 not created
    520|202 1 637534229 1 12|ga10 function returned an error
    220|202 1 2 18:56:07|UNRESOLVED
    410|202 132 1 18:56:07|IC End

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is not a timing/performance issue. The reason the tests are
    failing is not because they do not allow sufficient time, but because
    they do not allow _any_ time between executing mailx and testing for
    the existence of the "record" file. There is no indication in the
    specification that the "record" file can be written after the mailx
    command has exited, and so there is no reason for the tests to allow
    for this eventuality.

    When the specification states that a particular command creates an
    output file, it naturally means that the file must be created before
    the command exits (unless it explicitly states otherwise). In the
    case of output files that are named as operands on the command line
    this is clear from the "CONSEQUENCES OF ERRORS" part of the section
    "Utility Description Defaults", where it indicates how an error while
    writing such a file affects the exit status of the command. It may be
    less clear that this requirement also applies to output files that are
    not named as operands, however any argument that the specification
    does not require mailx to finish writing the "record" file before the
    command exits could equally well be applied to, say, the object files
    created by c89. Clearly it would be ridiculous to allow this
    behaviour for c89.

    It is recommended that this request is refused.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This request should go for a 14 day review by the Base Working Group.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The Base WG agrees with the consultant's initial response and
    notes that output files created by a utility must be available by the
    time the utility exits. Otherwise, it will be impossible for
    applications using that utility to use the output file that was created
    by the utility. The problem is not that fork/exec are relatively slow
    on the submitter's faster processor, but that mailx is not waiting for
    tsmail to complete before it exits. This waiver request should be refused.

    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