summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordenise.eckstein <denise.eckstein>2004-09-19 02:01:03 +0000
committerdenise.eckstein <denise.eckstein>2004-09-19 02:01:03 +0000
commitb5b48f7a21cc9fb352fad345ac161eb697f48c82 (patch)
tree65064076142d43170270ff24c9e6e5ebed53445d
parent2ce4ab3d1ef3bc099eff7e368b70888a90473999 (diff)
downloadtog-pegasus-b5b48f7a21cc9fb352fad345ac161eb697f48c82.zip
tog-pegasus-b5b48f7a21cc9fb352fad345ac161eb697f48c82.tar.gz
tog-pegasus-b5b48f7a21cc9fb352fad345ac161eb697f48c82.tar.xz
BUG#: 2097
TITLE: benchmarkProvider returns invalid Property name DESCRIPTION: The benchmarkProvider was generating property names from ...0000 to ...<n-1> instead of from ...0001 to ...<n> as defined in the mof. In addition, (1) corrected serveral class definitions in the mof, (2) added a test to the Client to be sure that the correct number of Properties are returned on enumerateInstances and and getInstance and (3) changed value of LocalOnly to false.
-rw-r--r--src/Clients/benchmarkTest/Load/benchmarkProvider_Property.mof16
-rw-r--r--src/Clients/benchmarkTest/benchmarkClient/benchmarkTest.cpp32
-rw-r--r--src/Clients/benchmarkTest/benchmarkProvider/benchmarkProvider.cpp2
3 files changed, 30 insertions, 20 deletions
diff --git a/src/Clients/benchmarkTest/Load/benchmarkProvider_Property.mof b/src/Clients/benchmarkTest/Load/benchmarkProvider_Property.mof
index e22d961..b0669a4 100644
--- a/src/Clients/benchmarkTest/Load/benchmarkProvider_Property.mof
+++ b/src/Clients/benchmarkTest/Load/benchmarkProvider_Property.mof
@@ -19,7 +19,6 @@
[Version ("1.0.0")] class benchmarkClassP00010S00400I00001
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -29,12 +28,12 @@
string Property0007;
string Property0008;
string Property0009;
+ string Property0010;
};
[Version ("1.0.0")] class benchmarkClassP00100S00040I00001
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -134,12 +133,12 @@
string Property0097;
string Property0098;
string Property0099;
+ string Property0100;
};
[Version ("1.0.0")] class benchmarkClassP00200S00020I00001
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -439,12 +438,12 @@
string Property0297;
string Property0298;
string Property0299;
+ string Property0300;
};
[Version ("1.0.0")] class benchmarkClassP00400S00010I00001
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -844,6 +843,7 @@
string Property0397;
string Property0398;
string Property0399;
+ string Property0400;
};
[Version ("1.0.0")] class benchmarkClassP00001S04000I00100
@@ -855,7 +855,6 @@
[Version ("1.0.0")] class benchmarkClassP00010S00400I00100
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -865,12 +864,12 @@
string Property0007;
string Property0008;
string Property0009;
+ string Property0010;
};
[Version ("1.0.0")] class benchmarkClassP00100S00040I00100
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -970,12 +969,12 @@
string Property0097;
string Property0098;
string Property0099;
+ string Property0100;
};
[Version ("1.0.0")] class benchmarkClassP00200S00020I00100
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -1275,12 +1274,12 @@
string Property0297;
string Property0298;
string Property0299;
+ string Property0300;
};
[Version ("1.0.0")] class benchmarkClassP00400S00010I00100
{
[key] uint32 Identifier;
- string Property0000;
string Property0001;
string Property0002;
string Property0003;
@@ -1680,4 +1679,5 @@
string Property0397;
string Property0398;
string Property0399;
+ string Property0400;
};
diff --git a/src/Clients/benchmarkTest/benchmarkClient/benchmarkTest.cpp b/src/Clients/benchmarkTest/benchmarkClient/benchmarkTest.cpp
index 339886e..5a50f78 100644
--- a/src/Clients/benchmarkTest/benchmarkClient/benchmarkTest.cpp
+++ b/src/Clients/benchmarkTest/benchmarkClient/benchmarkTest.cpp
@@ -709,7 +709,7 @@ void benchmarkTestCommand::_getCSInfo(ostream& outPrintWriter,
isConnected = true;
Boolean deepInheritance = true;
- Boolean localOnly = true;
+ Boolean localOnly = false;
Boolean includeQualifiers = false;
Boolean includeClassOrigin = false;
Array<CIMInstance> cimNInstances =
@@ -729,7 +729,7 @@ void benchmarkTestCommand::_getCSInfo(ostream& outPrintWriter,
{
errPrintWriter << "Returned ClassName = " << instanceRef.getClassName().getString() << endl;
errPrintWriter << "Expected ClassName = " << CSINFO_CLASSNAME.getString() << endl;
- errorExit(errPrintWriter, "EnumerateInstances failed");
+ errorExit(errPrintWriter, "EnumerateInstances failed. Incorrect class name returned.");
}
for (Uint32 j = 0; j < cimNInstances[0].getPropertyCount(); j++)
@@ -772,7 +772,7 @@ void benchmarkTestCommand::_getOSInfo(ostream& outPrintWriter,
isConnected = true;
Boolean deepInheritance = true;
- Boolean localOnly = true;
+ Boolean localOnly = false;
Boolean includeQualifiers = false;
Boolean includeClassOrigin = false;
Array<CIMInstance> cimNInstances =
@@ -796,7 +796,7 @@ void benchmarkTestCommand::_getOSInfo(ostream& outPrintWriter,
{
errPrintWriter << "Returned ClassName = " << instanceRef.getClassName().getString() << endl;
errPrintWriter << "Expected ClassName = " << OSINFO_CLASSNAME.getString() << endl;
- errorExit(errPrintWriter, "EnumerateInstances failed");
+ errorExit(errPrintWriter, "enumerateInstances failed. Incorrect class name returned.");
}
for (Uint32 j = 0; j < cimNInstances[0].getPropertyCount(); j++)
@@ -1029,7 +1029,7 @@ void benchmarkTestCommand::dobenchmarkTest2(
{
outPrintWriter << "Returned ClassName = " << instanceRef.getClassName().getString() << endl;
outPrintWriter << "Expected ClassName = " << className.getString() << endl;
- errorExit(errPrintWriter, "getInstance failed");
+ errorExit(errPrintWriter, "getInstance failed. Incorrect class name returned.");
}
double elapsedTime = stopwatchTime.getElapsed();
@@ -1090,7 +1090,12 @@ void benchmarkTestCommand::dobenchmarkTest3(
{
outPrintWriter << "Returned ClassName = " << instanceRef.getClassName().getString() << endl;
outPrintWriter << "Expected ClassName = " << className.getString() << endl;
- errorExit(errPrintWriter, "getInstance failed");
+ errorExit(errPrintWriter, "getInstance failed. Incorrect class name returned.");
+ }
+
+ if ( cimInstance.getPropertyCount() != numberOfProperties+1)
+ {
+ errorExit(errPrintWriter, "getInstance failed. Incorrect number of properties returned.");
}
}
@@ -1155,14 +1160,14 @@ void benchmarkTestCommand::dobenchmarkTest4(
numberInstances = cimInstanceNames.size();
if (numberInstances != expectedNumberOfInstances)
{
- errorExit(errPrintWriter, "enumerateInstanceNames failed");
+ errorExit(errPrintWriter, "enumerateInstanceNames failed. Incorrect number of instances returned.");
}
for (Uint32 j = 0; j < numberInstances; j++)
{
if ( !(cimInstanceNames[j].getClassName().equal(className)))
{
- errorExit(errPrintWriter, "enumerateInstanceNames failed");
+ errorExit(errPrintWriter, "enumerateInstanceNames failed. Incorrect class name returned.");
}
} // end for looping through instances
@@ -1221,7 +1226,7 @@ void benchmarkTestCommand::dobenchmarkTest5(
Boolean deepInheritance = true;
- Boolean localOnly = true;
+ Boolean localOnly = false;
Boolean includeQualifiers = false;
Boolean includeClassOrigin = false;
@@ -1236,7 +1241,7 @@ void benchmarkTestCommand::dobenchmarkTest5(
numberInstances = cimNInstances.size();
if (numberInstances != expectedNumberOfInstances)
{
- errorExit(errPrintWriter, "enumerateInstances failed");
+ errorExit(errPrintWriter, "enumerateInstances failed. Incorrect number of instances returned.");
}
for (Uint32 j = 0; j < numberInstances; j++)
@@ -1244,7 +1249,12 @@ void benchmarkTestCommand::dobenchmarkTest5(
CIMObjectPath instanceRef = cimNInstances[j].getPath ();
if ( !(instanceRef.getClassName().equal(className)))
{
- errorExit(errPrintWriter, "enumerateInstances failed");
+ errorExit(errPrintWriter, "enumerateInstances failed. Incorrect class name returned.");
+ }
+
+ if ( cimNInstances[j].getPropertyCount() != numberOfProperties+1)
+ {
+ errorExit(errPrintWriter, "enumerateInstances failed. Incorrect number of properties returned.");
}
} // end for looping through instances
diff --git a/src/Clients/benchmarkTest/benchmarkProvider/benchmarkProvider.cpp b/src/Clients/benchmarkTest/benchmarkProvider/benchmarkProvider.cpp
index 7f36723..c4acd12 100644
--- a/src/Clients/benchmarkTest/benchmarkProvider/benchmarkProvider.cpp
+++ b/src/Clients/benchmarkTest/benchmarkProvider/benchmarkProvider.cpp
@@ -82,7 +82,7 @@ CIMInstance benchmarkProvider::_buildInstance(
CIMInstance instance(className);
instance.addProperty(CIMProperty(CIMName("Identifier"), Identifier));
- for(Uint32 i = 0; i < numberOfProperties; i++)
+ for(Uint32 i = 1; i <= numberOfProperties; i++)
{
sprintf(propertyName, "Property%4.4d", i);
instance.addProperty(CIMProperty(CIMName(propertyName),