|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2189 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2189.
Report 2189 Actions
Problem Report Number 2189 Submitter's Classification Minor System Fault State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.1108 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 test2A Problem Summary TSD4M.00014 Similar case is XmSelectionDialog 2 where the same kind of error occurs about resource XmNlistVisibleItemCount. X/Open Waiver Reference: Page: 2 WAIVER DOCUMENT X/Open Waiver Reference: This report on... Problem Text
Similar case is XmSelectionDialog 2 where the same kind of error
occurs about resource XmNlistVisibleItemCount.
X/Open Waiver Reference: Page: 2
WAIVER DOCUMENT X/Open Waiver Reference:
This report only asks waiver for such kind of error:
/***********************************************************************/
TEST: Create with XmNhistoryVisibleItemCount='1'
TEST: Create with XmNhistoryVisibleItemCount='8'
ERROR: Resource XmNhistoryVisibleItemCount: Expected 8, received 3
TEST: Create with XmNhistoryVisibleItemCount='10'
ERROR: Resource XmNhistoryVisibleItemCount: Expected 10, received 3
TEST: Create with XmNhistoryVisibleItemCount='20'
ERROR: Resource XmNhistoryVisibleItemCount: Expected 20, received 3
/**********************************************************************/
The above error is caused by test suite fault. Reference to
report.zw030 for related information about XmNlistVisibleItemCount. This
error has the same problem describle in report.zw030, please see that
report for related information.
XmNhistoryVisibleItemCount is the XmNlistVisibleItemCount resource
in SelectionBox, see spec about XmCommand.
Here is the code in Xm library(libXm.a) Command.c file about resource
XmNhistoryVisibleItemCount for widget XmCommand:
{ XmNhistoryVisibleItemCount,
sizeof(int),
XtOffsetOf( struct _XmSelectionBoxRec, selection_box.list_visible_item_c
ount),
_XmSelectionBoxGetListVisibleItemCount,
NULL },
_XmSelectionBoxGetListVisibleItemCount is defined in SelectioB.c in
lib Xm. The default value for XmNlistVisibleItemCount is 8, here is the code
^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^
in SelectioB.c of lib Xm:
{ XmNlistVisibleItemCount,
XmCVisibleItemCount, XmRInt, sizeof(int),
XtOffsetOf( struct _XmSelectionBoxRec, selection_box.list_visibl
e_item_count),
XmRImmediate, (XtPointer) 8
},
But in our test case, the window size for command dialog box is small,
only 125x125, so that this box can only hold 3 lines of text according to the
size of the font used, this is one of the reason why we always get
^^^^^^
XmNhistoryVisibleItemCount to be 3. Here is the stack sequence to reach the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
place to set the command dialog box size(I have similar description in
report.zw030):
mvsTestCreateResources(testWidgetClassInfo, parentWidgetInfo);
/* ../vsm4/tset/widgets/command.c test2A */
X/Open Waiver Reference: Page: 3
WAIVER DOCUMENT X/Open Waiver Reference:
widget_info = mvsCreateWidget(widget_class_info,
parent_info, UseCommonArgs,
(Arg *)args,1);
/* ../vsm4/src/mvslib/resources/mvsTstCtRscs.c, line # 159 */
return(mvsCreateManageWidget(widget_class_info, parent_info, use_common,
args_in, nargs_in, TRUE));
/* ../vsm4/src/mvslib/widgets/mvsCreateWid.c */
mvsSetUpGlobalArgs(widget_class_info);
/* ../vsm4/src/mvslib/widgets/mvsCreateWid.c, Line # 140 */
if(mvsGetResourceNum(widget_class_info,XmNwidth) != NON_EXISTENT) {
XtSetArg(widget_class_info->common_args[n], XmNwidth, 125);
n++;
}
if(mvsGetResourceNum(widget_class_info,XmNheight)!= NON_EXISTENT) {
XtSetArg(widget_class_info->common_args[n], XmNheight, 125);
n++;
}
/* ../vsm4/src/mvslib/resources/mvsSetUpGlob.c, line # 271 */
Here is the end of tracing XmCommand dialog box size.
Now let's go to the final point. Here is the stack sequences to
reach where the error occurs in the journal file:
mvsTestCreateResources(testWidgetClassInfo, parentWidgetInfo);
/*../vsm4/tset/widgets/command.c test2A */
..................................................................
for ( ; i<num_resources; i++) {
if (xisTerminateRequested())
break;
if(!strcmp("depth",resource_info[i].name)) {
continue;
}
.........................................................
/* If the resource is Creatable and not related to another, create */
if( ((resource_info[i].access) & CREATE) &&
( resource_info[i].resource_type != ResourceTypeStateVariable ) &&
(!(resource_info[i].is_related)) ) {
........................................................
if (resource_info[i].enum_func != NULL) {
num_enums = (*resource_info[i].enum_func)(-1);
for (j=0; j<num_enums; j++) {
if (xisTerminateRequested())
break;
mvsClearAsserts();
XtSetArg(args[0],resource_info[i].name,
X/Open Waiver Reference: Page: 4
WAIVER DOCUMENT X/Open Waiver Reference:
(*resource_info[i].enum_func)(j));
.......................................
#endif /* MOTIF_20 */
}
else {
widget_info = mvsCreateWidget(widget_class_info,
parent_info, UseCommonArgs,
(Arg *)args,1);
}
sprintf(tmp_assert,
"Create with XmN%s='%s'", resource_info[i].name,
mvsResourceValueToString(widget_class_info, i,
args[0].value) );
mvsAssertion(widget_info,tmp_assert);
mvsCompareResources(widget_info);
..................................................
mvsDestroyWidget(widget_info->parent,
DontCheckCallbacks);
..............................................................
/* ../vsm4/src/mvslib/resources/mvsTstCtRscs.c */
The above block is trying to do this: for every widget's resource,
passing in the resource's value we want to the creating widget function(here
is mvsCreateWidget), later on in mvsCompareResources function, get the
current testing resource's value from the created widget and compare it from
the original value we passed in during the creating time, if they are same,
then ok, otherwise failed, destroy the created widget, and repeat the above
process for another widget resource until finished.
The failure reason here is same as report.zw030, in mvsCompareResources
function, when you are trying to get the XmNhistoryVisibleItemCount or
XmNlistVisibleItemCount, what you get is not directly from
widget->selection_box.list_visible_item_count, actually is from
widget->selection_box.list.visible_item_count, normally they are same, but
sometimes they could be different. If they are different, it could produce a
problem, and this is what we meet. Because the XmCommandDialog widget's size
is 125x125, so that when the XmCommandDialog widget is created,
widget->selection_box.list.visible_item_count is 3 and causes error in journal
file.
During this problem's analysis process, I found out that the resource
XmNlistVisibleItemCount or XmNhistoryVisibleItemCount is not setable for
widget XmCommandDialog, but works fine for widget XmSelectionDialog. Here are
some simple programs you can take a look.
/*************** First program ***************************/
#include <stdio.h>
#include <Xm/RowColumn.h>
#include <Xm/Text.h>
#include <Xm/BulletinB.h>
X/Open Waiver Reference: Page: 5
WAIVER DOCUMENT X/Open Waiver Reference:
#include <Xm/PushB.h>
#include <Xm/Form.h>
#include <Xm/ArrowB.h>
#include <Xm/Label.h>
#include <Xm/Command.h>
Widget toplevel, fm;
main(int argc, char **argv)
{
int i, j,data;
char txname[10][10];
Arg args[5];
Cardinal n;
XtAppContext context;
toplevel = XtAppInitialize(&context, "toplevel", NULL, 0, argc, argv, NULL, NULL, 0);
n=0;
XtSetArg(args[n], XmNwidth, 125); n++;
XtSetArg(args[n], XmNheight, 125); n++;
XtSetValues(toplevel, args, n);
n=0;
XtSetArg(args[n], XmNwidth, 125); n++;
XtSetArg(args[n], XmNheight, 125); n++;
/* XtSetArg(args[n], XmNresizePolicy, XmRESIZE_NONE); n++; */
/* XtSetArg(args[n], XmNresizePolicy, XmRESIZE_ANY); n++; */
/* XtSetArg( args[n], XmNvisibleItemCount, 8) ;n++;*/
fm = XmCreateSelectionDialog(toplevel, "CommandD", args, n);
/* change above to
fm = XmCreateCommandDialog(toplevel, "CommandD", args, n);
will get a very different result
*/
XtManageChild(fm);
printf("XmRESIZE_ANY is %d 0, XmRESIZE_ANY);
XtSetArg( args[0], XmNlistVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("initial XmNlistVisibleItemCount is %d0,data);
XtRealizeWidget(fm);
XSync(XtDisplay(fm), False);
XtSetArg( args[0], XmNlistVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("after realize XmNlistVisibleItemCount is %d0,data);
n=0;
XtSetArg(args[n], XmNforeground, "black"); n++;
X/Open Waiver Reference: Page: 6
WAIVER DOCUMENT X/Open Waiver Reference:
XtSetValues(fm,args,n);
XtSetArg( args[0], XmNlistVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("after SetValue XmNlistVisibleItemCount is %d0,data);
XSync(XtDisplay(fm), False);
sleep(5);
n=0;
XtSetArg(args[n], XmNwidth, 225); n++;
XtSetArg(args[n], XmNheight, 225); n++;
XtSetValues(fm, args, n);
XSync(XtDisplay(fm), False);
sleep(5);
XtSetArg( args[0], XmNresizePolicy, &data);
XtGetValues(fm, args, 1);
printf("XmNresizePolicy is %d 0, data);
n=0;
XtSetArg( args[0], XmNlistVisibleItemCount, 16);
XtSetValues(fm, args, 1);
XtSetArg(args[0], XmNlistVisibleItemCount, &data);
XtGetValues(fm, args, 1);
printf("XmNlistVisibleItemCount is %d , after set it to 16 0, data);
XSync(XtDisplay(fm), False);
sleep(5);
}
/**************************** End first program *******************/
/*********************** Second program, just for your convenience ******/
#include <stdio.h>
#include <Xm/RowColumn.h>
#include <Xm/Text.h>
#include <Xm/BulletinB.h>
#include <Xm/PushB.h>
#include <Xm/Form.h>
#include <Xm/ArrowB.h>
#include <Xm/Label.h>
#include <Xm/Command.h>
Widget toplevel, fm;
main(int argc, char **argv)
{
X/Open Waiver Reference: Page: 7
WAIVER DOCUMENT X/Open Waiver Reference:
int i, j,data;
char txname[10][10];
Arg args[5];
Cardinal n;
XtAppContext context;
toplevel = XtAppInitialize(&context, "toplevel", NULL, 0, argc, argv, NULL, NULL, 0);
n=0;
XtSetArg(args[n], XmNwidth, 125); n++;
XtSetArg(args[n], XmNheight, 125); n++;
XtSetValues(toplevel, args, n);
n=0;
XtSetArg(args[n], XmNwidth, 125); n++;
XtSetArg(args[n], XmNheight, 125); n++;
/* XtSetArg(args[n], XmNresizePolicy, XmRESIZE_NONE); n++; */
/* XtSetArg(args[n], XmNresizePolicy, XmRESIZE_ANY); n++; */
/* XtSetArg( args[n], XmNvisibleItemCount, 8) ;n++;*/
fm = XmCreateCommandDialog(toplevel, "CommandD", args, n);
XtManageChild(fm);
printf("XmRESIZE_ANY is %d 0, XmRESIZE_ANY);
XtSetArg( args[0], XmNhistoryVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("initial XmNhistoryVisibleItemCount is %d0,data);
XtRealizeWidget(fm);
XSync(XtDisplay(fm), False);
XtSetArg( args[0], XmNhistoryVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("after realize XmNhistoryVisibleItemCount is %d0,data);
n=0;
XtSetArg(args[n], XmNforeground, "black"); n++;
XtSetValues(fm,args,n);
XtSetArg( args[0], XmNhistoryVisibleItemCount, &data) ;
XtGetValues( fm, args, 1) ;
printf("after SetValue XmNhistoryVisibleItemCount is %d0,data);
XSync(XtDisplay(fm), False);
sleep(5);
n=0;
XtSetArg(args[n], XmNwidth, 225); n++;
XtSetArg(args[n], XmNheight, 225); n++;
XtSetValues(fm, args, n);
XSync(XtDisplay(fm), False);
X/Open Waiver Reference: Page: 8
WAIVER DOCUMENT X/Open Waiver Reference:
sleep(5);
XtSetArg( args[0], XmNresizePolicy, &data);
XtGetValues(fm, args, 1);
printf("XmNresizePolicy is %d 0, data);
n=0;
XtSetArg( args[0], XmNhistoryVisibleItemCount, 16);
XtSetValues(fm, args, 1);
XtSetArg(args[0], XmNhistoryVisibleItemCount, &data);
XtGetValues(fm, args, 1);
printf("XmNhistoryVisibleItemCount is %d , after set it to 16 0, data);
XSync(XtDisplay(fm), False);
sleep(5);
}
/********************************** End second program *****************/
The above problem also exists for Motif 2.0
I will try to fix this problem for widget XmCommandDialog.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:
- View Report 2189
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority