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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0226 Actions


    Problem Report Number 0226
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0226
    Raised 1995-08-31 08:00
    Updated 2003-03-13 08:00
    Published 1995-09-04 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.5
    Test Identification ANSI.os/streamio/fscanf_X 31
    Linked Problem Reports TSD4.196, (in, old, system)
    Problem Summary TSD4.226 . to be modified Test 31 for fscanf(), scanf(), and sscanf() assumes a feature of the family of functions which is not portable because it is implementation-dependent. From the XPG4 System Interfaces ...
    Problem Text
    .************************** to be modified **************************
    Test 31 for fscanf(), scanf(), and sscanf() assumes 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, "%1$[a-f]");

    not being portable since the application cannot assume that '%1$[a-f]'
    will skip over "abcdef" in the data being processed by the function.
    This is causing the following failures:

    /tset/ANSI.os/streamio/scanf_X/T.sscanf_X 31.Failed
    /tset/ANSI.os/streamio/scanf_X/T.scanf_X 31.Failed
    /tset/ANSI.os/streamio/scanf_X/T.fscanf_X 31 Failed

    Note that test 41 of this family of functions also uses the
    non-portable format specifier "%7$3[c-f]" (no assignment suppression)
    but they only produce WARNINGs so we do not believe a waiver would be
    appropriate or necessary.
    Test Output
    ***********************************************************************
    /tset/ANSI.os/streamio/scanf_X/T.fscanf_X 31 Failed

    Test Description:
    For the XNFS specification:
    Not in use.
    For the XSH specification:
    When format contains %k$[ch1-ch2], where k = a positive integer
    and arg is the kth argument :
    a. when ch1 is lexically less than or equal to ch2, the maximal
    sequence of input characters consisting entirely of characters in
    the range ch1 to ch2 is returned;
    b. when ch1 is lexically greater than ch2, the maximal sequence of
    input characters consisting entirely of the characters ch1, "-",
    ch2 is returned.

    Test Strategy:
    CREATE file of test data and freopen() it on stdin
    PERFORM format conversion using fscanf()
    VERIFY that %k$[ch1-ch2] matches against in the range ch1 to ch2 when
    ch1 is lexically less than ch2
    PERFORM format conversion using fscanf()
    VERIFY that %k$[ch1-ch2] matches against the longest sequence of
    characters ch1, "-" and ch2 when ch1 is lexically greater than ch2

    Test Information:
    fscanf(t_fp, "%1$[a-f]") failed
    Input data: abcdefghij-klmnopq
    Expected result: "abcdef"
    Observed result: "a"
    ***********************************************************************
    /tset/ANSI.os/streamio/scanf_X/T.scanf_X 31.Failed

    Test Description:
    For the XNFS specification:
    Not in use.
    For the XSH specification:
    When format contains %k$[ch1-ch2], where k = a positive integer
    and arg is the kth argument :
    a. when ch1 is lexically less than or equal to ch2, the maximal
    sequence of input characters consisting entirely of characters in
    the range ch1 to ch2 is returned;
    b. when ch1 is lexically greater than ch2, the maximal sequence of
    input characters consisting entirely of the characters ch1, "-",
    ch2 is returned.

    Test Strategy:
    CREATE file of test data and freopen() it on stdin
    PERFORM format conversion using scanf()
    VERIFY that %k$[ch1-ch2] matches against in the range ch1 to ch2 when
    CH1 Is lexically less than ch2
    PERFORM format conversion using scanf()
    VERIFY that %k$[ch1-ch2] matches against the longest sequence of
    characters ch1, "-" and ch2 when ch1 is lexically greater than ch2

    Test Information:
    scanf("%1$[a-f]") failed
    Input data: abcdefghij-klmnopq
    Expected result: "abcdef"
    Observed result: "a"
    *******************************************************************
    /tset/ANSI.os/streamio/scanf_X/T.sscanf_X 31.Failed

    Test Description:
    When format contains %k$[ch1-ch2], where k = a positive integer and
    arg is the kth argument :
    a. when ch1 is lexically less than or equal to ch2, the maximal
    sequence of input characters consisting entirely of characters in the
    range ch1 to ch2 is returned;
    b. when ch1 is lexically greater than ch2, the maximal sequence of
    input characters consisting entirely of the characters ch1, "-", ch2
    is returned.

    Test Strategy:
    CREATE file of test data and freopen() it on stdin
    PERFORM format conversion using sscanf()
    VERIFY that %k$[ch1-ch2] matches against in the range ch1 to ch2 when
    ch1 is lexically less than ch2
    PERFORM format conversion using sscanf()
    VERIFY that %k$[ch1-ch2] matches against the longest sequence of
    characters ch1, "-" and ch2 when ch1 is lexically greater than ch2

    Test Information:
    sscanf(data, "%1$[a-f]") failed
    Input data: abcdefghij-klmnopq
    Expected result: "abcdef"
    Observed result: "a"
    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is accepted as fault in the test suite and it is recommended that
    a waiver is granted on the grounds of a Test Suite Deficiency.

    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