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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0825 Actions


    Problem Report Number 0825
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0340
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1996-03-18 08:00
    Product Standard Commands and Utilities V2 (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSC version 4.1.5
    Test Identification POSIX.upe/du 801 805 806
    Problem Summary TSD4C.00171 This test may fail on implementations that do not support 51,000 character field width specifiers.
    Problem Text
    This test may fail on implementations that do not support 51,000
    character field width specifiers.

    In all three instances, the suite tries to make a 51,200 character file,
    using, using the printf utility to format a string of that length.

    Our printf handles only LINE_MAX characters, so it fails with
    a 'line too long' message and a nonzero return value and the test
    cases are not executed.

    We believe that the command "printf '%51200s' x" is not portable
    and the test suite is in error.

    According to the XBD, Section 10.1, "Utility Argument Syntax", the
    maximum syntactically valid numeric value of a component or a utility
    operand is 2,147,483,647, but "this does not mean that all numbers within
    the allowable range are necessarily semantically correct". It goes on to
    describe the correct performance of a utility when presented with such a
    value: An out-of-range warning, rather than a syntax error, as in our
    case.

    The section goes on to give an example using the dd command. "dd
    obs=3000000000 would yield undefined behavior for the application and could be
    a syntax error" while "dd obs=000000000 may cause some error, such
    as 'blocksize too large', rather than a syntax error." This is just what
    we do.


    Further, the printf utility is modelled upon the printf library call, and
    its operation in fact defined only by its differences from the call's
    operation. The ANSI C standard, Sec. 7.9.6.1 specifies an Environmental
    Limit for the printf family of calls: "The minimum value for the maximum
    number of characters produced by any single conversion shall be 509".

    We do not believe that a portable application should expect printf to handle
    strings of more than 509 characters.
    Test Output
    -----------------start of test output------------------

    400|346 801 1 18:31:32|IC Start
    200|346 1 18:31:32|TP Start
    520|346 1 6991 1 1|Assertion #801 (C): When the option -a testfile is
    specified
    520|346 1 6991 1 2| <LC> , then du shall give...
    520|346 1 6991 1 11|Command failed: 'printf '%51200s' x > du_in_801_1'
    220|346 1 2 18:31:33|UNRESOLVED
    410|346 801 1 18:31:33|IC End

    400|346 805 1 18:31:38|IC Start
    200|346 1 18:31:38|TP Start
    520|346 1 6991 1 1|Assertion #805 (C): When the -k option is specified,
    then th
    520|346 1 6991 1 2| <LC> e file sizes are rep...
    520|346 1 6991 1 11|Command failed: 'printf '%51200s' x > du_in_805_1'
    220|346 1 2 18:31:39|UNRESOLVED
    410|346 805 1 18:31:39|IC End

    400|346 806 1 18:31:39|IC Start
    200|346 1 18:31:39|TP Start
    520|346 1 6991 1 1|Assertion #806 (C): When -x is specified, then only the
    file
    520|346 1 6991 1 2| <LC> s on the same device...
    520|346 1 6991 1 11|Command failed: 'printf "%51200s" x > du_in_806_1'
    220|346 1 2 18:31:40|UNRESOLVED
    410|346 806 1 18:31:40|IC End



    ------------------end of test output-------------------

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree this is a test suite deficiency in the test
    suite version(s) listed.

    The X/Open and POSIX specs are silent regarding the maximum field
    width XSH fprintf() and XCU printf must support. In the absence
    of any such specification the ANSI C wording should be considered
    normative.

    We believe none of the other arguments presented add any weight to
    this decision.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority