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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0572 Actions


    Problem Report Number 0572
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0176
    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.6
    Test Identification POSIX.cmd/mailx/mailx 70
    Problem Summary PG4C.00101 This IR claims that the exit status must be zero if the message was sent.
    Problem Text
    Ignoring the problems with diagnostic output, which have been covered
    in TSD4C.00190 this test is testing for non-XPG4 behavior.

    On page 477 of the XCU, V2 spec it states the following:
    "When the -e option is specified, the following exit values
    are returned:

    0 Mail was found.
    >0 Mail was not found or an error occurred.

    Otherwise, the following exit values are returned:

    0 Successfully completion; note this status implies that all
    messages were send, but it gives no assurances that any of them
    were actually delivered

    >0 An error occurred."

    Then in the Consequences of Errors Section the following is stated:

    "When in receive or send mode:
    - if an error is encountered processing a command escape... (1)
    - other errors will prevent the sending of the message. (2)

    When in command mode:
    - Default" (3)


    Processing the .mailrc file has nothing to do with command escapes so
    ignore number (1). And number (3) is not being tested here.
    Number (2) implies that when mail exits with a status >0, this indicates
    an error occurred, and when an error occurs in receive or send mode, the
    message should not be sent.

    Changing our code such that mail exits with a status >0 when encountering
    a .mailrc problem would also imply that mail terminated and did not
    send anything. This would be contradictory to XCU V2 page 465 section
    "Start-up in mailx" that states:

    "Any errors in the start-up file will either cause mailx to
    terminate with a diagnostic message and a non-zero status
    or to continue after writing a diagnostic message, ignoring
    the remainder of the lines in the start-up file."

    If mail is allowed to continue, ignoring the remainder of the
    lines in the .mailrc file, then the exit status should be 0,
    since mailx was not prevented from sending the mail.
    This would keep in compliance with the "exit status" section.

    If mail is allowed to continue, ignoring the remainder of the lines
    in the .mailrc file, and exits with a status >0, then not only
    does this imply an error occured but that mail also terminated
    and did not send anything. That implication would be incorrect,
    since mailx was allowed to continue and send the mail.

    Writing a diagnostic message is adequate notification
    that a problem was encountered so the user can correct his/her
    .mailrc file in these instances. But exiting with a status >0
    would be indicating that no mail was sent and that is incorrect.
    Test Output

    ***********************************************************************
    /tset/POSIX.cmd/mailx/mailx_01.ex 1 Failed


    Test Information:
    Assertion #70 (C): Action on errors in the MAILRC file
    -- Testing with !pwd in startup file
    -- A diagnostic message was written to stderr.
    ERROR: .mailrc processing continued past !pwd.
    ERROR: Zero exit status.
    -- Testing with edit in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on edit
    ERROR: Zero exit status.
    -- Testing with hold in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on hold
    ERROR: Zero exit status.
    -- Testing with mail vsc0 in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on mail vsc0
    ERROR: Zero exit status.
    -- Testing with preserve in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on preserve
    ERROR: Zero exit status.
    -- Testing with reply in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on reply
    ERROR: Zero exit status.
    -- Testing with Reply in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on Reply
    ERROR: Zero exit status.
    -- Testing with shell in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on shell
    ERROR: Zero exit status.
    -- Testing with visual in startup file
    -- A diagnostic message was written to stderr.
    ERROR: mailx did not exit on visual
    ERROR: Zero exit status.

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

    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.

    Whether a message is sent or not is not the sole
    determinator of the exit status.

    The issue of exit status and consequences of error are separate. The
    XCU states on page 16:

    The CONSEQUENCES OF ERRORS section describes the effects on
    the environment, file systems, process state, and so on, when
    error conditions occur. It does not describe error messages
    produced or exit status values used.

    For mailx, the Consequences of Errors section describes when an error
    will prevent the sending of a message. But, it does not determine the
    exit status.

    In the Exit Status section, an exit value of zero does indicates that
    all messages were sent. However, a non-zero exit status does not
    necessarily indicate the opposite. It only indicates that an error
    occurred.

    As the described in the Start-up in mailx section on page 465,

    Any errors in the start-up file will either cause mailx to
    terminate with a diagnostic message and a non-zero status or
    to continue after writing a diagnostic message, ignoring the
    remainder of the lines in the start-up file.

    Both methods of handling "errors in the start-up file" indicate that
    an error occured. When an error message is written to STDERR, as is
    the case in the journal output provided, a non-zero exit status
    required. This behavior is specified by the Utility Description
    Default for STDERR on page 15,

    Default Behaviour: When this section is listed as ``Used only
    for diagnostic messages,'' it means that, unless otherwise
    stated, the diagnostic messages are sent to the standard error
    only when the exit status is non-zero and the utility is used
    as described by this document.

    If a nonzero exit status is returned, then diagnostic messages written
    to STDERR will determine the nature of the failure. Note that the
    exit status when the a message is written to stdout is unspecified.

    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