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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1854 Actions


    Problem Report Number 1854
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0931
    Raised 2003-01-24 08:00
    Updated 2003-03-13 08:00
    Published 2003-02-06 08:00
    Product Standard X Window System Applications Interface
    Certification Program The Open Brand certification program
    Test Suite VSW version 5.1.2
    Test Identification Xlib7/XcmsAllocColor 1
    Problem Summary TSD4W.00176 The test calculates incorrect expected colour values when bits_per_rgb is not 8.
    Problem Text

    Upon inspection of the test case code, I found a
    problem in the function svccmsAllocColor() in file
    tset/Xlib7/cmsac/Test.c. When verifying the results of the
    call to XcmsAllocColor(), the following code is used

    /******
    * verify the results of the service if successful completion.
    ******/
    if ((regr_args.l_flags.check) &&
    (errflg == 0) &&
    (stat_status == REGR_NORMAL))
    {
    check_dec(XcmsSuccess, svc_ret_value, "return value") ;
    tmpRGB = (goodColorSpec.red &
    ((0xFFFF << ccc_good->visual->bits_per_rgb) & 0xFFFF));
    check_dec(tmpRGB, color.spec.RGB.red, "red") ;
    tmpRGB = (goodColorSpec.green &
    ((0xFFFF << ccc_good->visual->bits_per_rgb) & 0xFFFF));
    check_dec(tmpRGB, color.spec.RGB.green, "green") ;
    tmpRGB = (goodColorSpec.blue &
    ((0xFFFF << ccc_good->visual->bits_per_rgb) & 0xFFFF));
    check_dec(tmpRGB, color.spec.RGB.blue, "blue") ;
    }

    The problem concerns the bit shift that is done using the
    cc_good->visual->bits_per_rgb value. The color components are
    stored in 16-bits, where the number of high order bits used to
    store the component value is equivalent to the bits_per_rgb
    for the visual. So, the code as written will only work for
    visuals with a bits_per_rgb of 8-bits.

    To perform correctly, the shift should have been written:

    (0xFFFF << (sizeof(short) - ccc_good->visual->bits_per_rgb))
    Test Output
    The failed case when running the suite is as follows:

    SECTION: Xlib7

    TEST CASE: XcmsAllocColor

    TEST PURPOSE #1
    Assertion XcmsAllocColor-1.(C)
    If the implementation is X11R5 or later: A call to
    XcmsAllocColor shall allocate a device-independent color and
    return the pixel value of the color cell and the color
    specification actually allocated.
    PREP: determining the color spec for red
    INFO: bits_per_rgb(10)
    TEST: Calling XcmsAllocColor
    *********************
    An error occurred during a call to XcmsAllocColor

    The routine call looked like this -
    svc_ret_value = XcmsAllocColor(
    display, colormap, color, format);

    The parameter values were as follows...
    ERROR: Expected red of 64512, received 65472

    End of error report
    *********************
    1 FAIL


    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is accepted as a fault in the test suite.

    Note that the correct number of bits to shift by is
    (16 - ccc_good->visual->bits_per_rgb).

    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