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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1290 Actions


    Problem Report Number 1290
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0572
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1998-07-30 08:00
    Product Standard Internationalised Terminal Interfaces
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.2
    Test Identification xcurses/key_name 5
    Problem Summary TSD4U.00246 This test is not deriving its invalid wide character correctly.
    Problem Text
    Here are the important parts of CAPIxcurses/fkey_name/fkey_name1.c:

    static void test5A(void)
    {
    char *key;
    wchar_t wch;
    int ret_val, i;

    ....
    ret_val = mbtowc(&wch, 0x0, 1);
    if (ret_val == -1) {
    uwerrno("mbtowc");
    return;
    }
    key = (char *)key_name(wch);
    tet_infoline("TEST: Return value");
    if (key == NULL) {
    ....
    }

    The test is assuming that "mbtowc(&wch, 0x0, 1)" saves an invisible
    wide character at "wch". But according to XSH5, p. 504, "wch" is not
    required to be loaded if the second argument is a null pointer:

    If s [second argument] is not a null pointer, mbtowc() determines the
    number of bytes that constitute the character pointed to by s. ....
    If the character is valid and pwc [first argument] is not a null
    pointer, mbtowc() stores the wide-character code in the object
    pointed to by pwc.

    The value at "wch" is uninitialized and not affected by mbtowc(), so the
    result of the subsequent key_name() is meaningless.
    Test Output
    10|1005 /tset/CAPIxcurses/fkey_name/fkey_name1 03:03:59|TC Start, scenario
    ref 1
    76-270
    15|1005 1.10 6|TCM Start
    400|1005 1 1 03:03:59|IC Start
    520|1005 5 11988 1 1|SPEC1170TESTSUITE CASE 5
    520|1005 5 11988 1 2|A successful call to char *key_name(wchar_t c) for a
    520|1005 5 11988 1 3|key which is not a visible wide character or wide
    520|1005 5 11988 1 4|control character shall return a pointer to a string
    520|1005 5 11988 1 5|containing "UNKNOWN KEY".
    520|1005 5 11997 1 1|PREP: Set test locale: xcurses
    520|1005 5 11997 1 2|PREP: Set environment variables and open terminal connection
    520|1005 5 11997 2 1|PREP: Call newterm
    520|1005 5 11997 2 2|PREP: Initialize color pairs
    520|1005 5 11997 2 3|TEST: Call key_name for zero
    520|1005 5 11997 2 4|TEST: Return value
    520|1005 5 11997 2 5|ERROR: Returned "^E" not "UNKNOWN KEY"
    520|1005 5 11997 2 6|CLEANUP: Call endwin
    520|1005 5 11997 2 7|CLEANUP: Call delscreen
    520|1005 5 11997 2 8|CLEANUP: Restore environment variables and close
    terminal connection
    220|1005 5 1 03:03:59|FAIL

    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 defiency in the test suite version listed.

    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