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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0196 Actions


    Problem Report Number 0196
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0196
    Raised 1994-10-25 08:00
    Updated 2003-03-13 08:00
    Published 1994-11-03 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.4
    Test Identification ANSI.os/streamio/fscanf,scanf,sscanf 45
    Problem Summary TSD4.196 Test 45 for fscanf(), scanf(), and sscanf() assume a feature of the family of functions which is not portable because it is implementation-dependent. From the XPG4 System Interfaces and Headers docume...
    Problem Text
    Test 45 for fscanf(), scanf(), and sscanf() assume a feature of the
    family of functions which is not portable because it is
    implementation-dependent. From the XPG4 System Interfaces and Headers
    document:

    "[ Matches a non-empty sequence of bytes ...
    ... If a - is in the scanlist and is not the first character,
    nor the second where the first character is a ^, nor the last
    character, the behaviour is implementation-dependent."

    Basically, the problem boils down to:

    fscanf(t_fp, "%*4[c-f]%d", &x);

    not being portable since the application cannot assume that '%*4[c-f]'
    will skip over "cdef" in the data being processed by the function.
    This is causing the following failures:

    /tset/ANSI.os/streamio/scanf/T.fscanf 45 Failed
    /tset/ANSI.os/streamio/scanf/T.scanf 45 Failed
    /tset/ANSI.os/streamio/scanf/T.sscanf 45 Failed

    Note that test 41 of this family of functions also uses the
    non-portable format specifier "%4[c-f]" (no assignment suppression) but
    they only produce warnings so we do not believe a waiver would be
    appropriate.
    Test Output
    /tset/ANSI.os/streamio/scanf/T.fscanf 45 Failed

    Test Description:
    For the XNFS specification:
    Not in use.
    For the XSH specification:
    When format contains %*n?, where ? = a type conversion character
    (d, i, o, u, x, X, f, e, E, g, G, c, s, C, S), and n = an integer
    then the input string converted by "%n?" is not assigned to an
    argument.
    C and S conversions not tested in POSIX and XPG3 modes.

    Test Strategy:
    CREATE child process
    CREATE file of test data and freopen() it on stdin
    PERFORM format conversion using fscanf()
    VERIFY the action of the star and field width options on the
    specifiers d, i, o, u, x, X, n, f, e, E, g, G, c and s
    CREATE file of test data and freopen() it on stdin
    CHANGE to wide character locale using setlocale()
    PERFORM format conversion using fscanf()
    VERIFY the action of the star and field width options on the
    specifiers C and S

    Test Information:
    fscanf(t_fp,
    "%*5d%*5i%*6o%*5u%*4x%*4X%*6f%*9e%*9E%*9g%*9G%*4[c-f]%*11s%d")
    failed
    Input data: \361\362\363\364\365\361\362\363\364\365\360\363\360\360\367
    \361\361\362\363\364\365\363\360\363\371\363\360\363\371\364\365
    \366.\361\362\361\361.\362\363e+\360\360\362\361.\362\363e+\360\
    360\363\361.\362\363e+\360\360\364\361.\362\363e+\360\360cdef\24
    3e\242\243-\242\243ring\371\371
    Expected result: 99
    Observed result: 0

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is agreed to be a test suite deficiency and it is recommended that a
    waiver be granted on these grounds.

    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