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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2190 Actions


    Problem Report Number 2190
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1109
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Motif Toolkit
    Certification Program The Open Brand certification program
    Test Suite VSM version 4.0.0
    Test Identification vsm4/tset/widgets/XmCommandDialog test3A
    Problem Summary TSD4M.00015 This report is ask for all the errors in this test case, those errors are caused by same reason. This test case failure is cause by test suite itself. According to the spec, also the Command.c file of...
    Problem Text

    This report is ask for all the errors in this test case,
    those errors are caused by same reason. This test case failure
    is cause by test suite itself.

    According to the spec, also the Command.c file of lib Xm,
    we have following information:

    XmNcommand
    Contains the current command-line text. This is the XmNtextString
    ^^^^^^^^^^^^^
    resource in SelectionBox, renamed for Command.

    XmNpromptString
    Specifies a prompt for the command line. This is the
    XmNselectionLabelString resource in SelectionBox, renamed for Command.
    ^^^^^^^^^^^^^^^^^^^^^^^

    Here I only explain the reason for the following error, all the rest
    are same:
    /***********************************************************************/
    TEST: Set XmNpromptString to '<Key>F8'
    ERROR: Resource XmNselectionLabelString: Expected '>' received '<Key>F8'
    /***********************************************************************/

    For all the testing widget's resources, VSM4 makes a copy and stores
    it somewhere, let's say it to be a local copy. When we modify a widget's
    resource, VSM4 also updates this resource's value in VSM4's stored local
    copy, later on, we retrieve all this widget's resources and compare them
    with VSM4's stored local copy correspondly. In Motif, when you modify resource
    XmNpromptString, at the same time, you are modifying XmNselectionLabelString'
    value. In VSM4, when it modifys widget's XmNpromptString resource, VSM4 only
    update XmNpromptString's value in VSM4's stored local copy, it will not
    update XmNselectionLabelString's value in VSM4's stored local copy, and this
    cause the failure.

    Now let's trace the program to where it fails.

    mvsTestSetResources(testWidgetClassInfo, parentWidgetInfo);
    /* ../vsm4/tset/widgets/commandd.c, test3A */

    X/Open Waiver Reference: Page: 5

    WAIVER DOCUMENT X/Open Waiver Reference:


    /* mvsTestSetResources defined in ../vsm4/src/mvslib/resources/mvsTstStRscs.c */

    /*********************** some code of mvsTestSetResources *****************/
    ..............................................................
    for ( ; i<num_resources; i++) {
    if (xisTerminateRequested())
    break;
    .........................................................
    /* If the resource is settable and not related to another, set */
    if( (resource_info[i].access & SET) && !(resource_info[i].is_related)
    && ( resource_info[i].resource_type!=ResourceTypeStateVariable)) {
    .........................................................
    else {
    widget_info = mvsCreateWidget(widget_class_info, parent_info,
    UseCommonArgs, (ArgList)NULL,0 );
    }
    .........................................................
    if (resource_info[i].enum_func != NULL) {
    .........................................................
    for (j=0; j<num_enums; j++) {
    .........................................................
    XtSetArg(args[0],resource_info[i].name,
    (*resource_info[i].enum_func)(j));
    .........................................................
    mvsSetValues(widget_info,args,1);

    } /* End for() */
    .........................................................
    } /* End if(access & SET) && (!related) */
    } /* End for(i<num_resources) */

    } /* End mvsTestSetResources() */
    /*********************************** in function mvsTestSetResources ********/

    In the above "if(access & SET) && (!related)" statement, VSM4 probably
    try to avoid this kind of resource testing error, because it puts such condition
    here: "!(resource_info[i].is_related", but anyway, "resource_info[i].is_related"
    here are 0 for all error cases.

    "mvsSetValues(widget_info,args,1);" will pass in whatever value we will
    set for resource XmNpromptString when the XmCommandDialog widget is created.
    Function mvsSetValues will also update XmNpromptString's value in VSM4's local
    copy, this function is defined in ../src/mvslib/resources/mvsSetValues.c, it
    only has 2 lines code:
    mvsSetValuesNoCheck(widget_info,args,nargs);
    mvsCompareResources(widget_info);
    Function mvsSetValuesNoCheck is defined in mvsSetValNCk.c. "mvsCompareResources"
    is defined in mvsCmpRscs.c.

    Here is the important code in mvsSetValuesNoCheck:

    X/Open Waiver Reference: Page: 6

    WAIVER DOCUMENT X/Open Waiver Reference:


    ...................................................
    XtSetValues(widget,args,nargs);

    mvsSetLocalValues(widget_info,args,&nargs);
    ...................................................

    Function mvsSetLocalValues is defined in ../resources/mvsSetLocVal.c,
    here is the important code in this function:
    ...................................................
    case RefXmString:
    if((char *)mvs_resources[j] != (char *)NULL) {
    XtFree( (char *)mvs_resources[j]);
    }
    mvs_resources[j] = (MvsArgVal)
    mvsExtractString((XmString)args[i].value,
    args[i].name);
    break;
    ...................................................

    Function mvsExtractString is defined in ../mvslib/other/ExtractStrng.c,
    this function extracts the "real" string out of an XmString.
    If we want to correct this VSM4 problem, probably we can add something
    in the above block code of function mvsSetLocalValues.

    Function mvsSetLocalValues is defined in ../resources/mvsSetLocVal.c,
    I put the original function's summary here:
    /**************************************************************************/
    Summary:
    This function sets the local copy of the resource values.
    These are what the MVS thinks the widget resource values should be.
    For pointer resources, memory is allocated and structures copied.
    /*************************************************************************/

    Function mvsCompareResources is defined in ../resources/mvsCmpRscs.c,
    it's very clear to read the code, so I end my explanation here.

    Review Information

    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