[3195267] sfcc v2 tests segfault when sfcb is not running
diff --git a/ChangeLog b/ChangeLog
index b5e441b..b6d7772 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-02 Narasimha Sharoff <nsharoff@us.ibm.com>
+
+ * TEST/v2*.c
+ [ 3195267 ] sfcc v2 tests segfault when sfcb is not running
+
2011-03-01 Narasimha Sharoff <nsharoff@us.ibm.com>
* cimc/cimcclient.c
diff --git a/NEWS b/NEWS
index 68179e3..67133d3 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@
- 2348900: Concurrency issue when parsing responses
- 2793377: Missing includes
- 3101151: SfcbLocal failed to connect due to hardcoded library path
+- 3195267: sfcc v2 tests segfault when sfcb is not running
Changes in 2.2.1
================
diff --git a/TEST/v2test_ec.c b/TEST/v2test_ec.c
index ba81477..1d66da0 100644
--- a/TEST/v2test_ec.c
+++ b/TEST/v2test_ec.c
@@ -65,6 +65,10 @@
}
client = ce->ft->connect(ce, cim_host , "http", cim_host_port, cim_host_userid, cim_host_passwd , &status);
+ if (client == NULL) {
+ printf("Coudn't connect to the server. Check if sfcb is running.\n");
+ return 1;
+ }
op = ce->ft->newObjectPath(ce, "root/cimv2", NULL , &status);
diff --git a/TEST/v2test_ecn.c b/TEST/v2test_ecn.c
index 01629bf..35b1e65 100644
--- a/TEST/v2test_ecn.c
+++ b/TEST/v2test_ecn.c
@@ -69,6 +69,10 @@
return 1;
}
client = ce->ft->connect(ce, cim_host , "http", cim_host_port, cim_host_userid, cim_host_passwd , &status);
+ if (client == NULL) {
+ printf("Coudn't connect to the server. Check if sfcb is running.\n");
+ return 1;
+ }
op = ce->ft->newObjectPath(ce, "root/cimv2", NULL , &status);
printf(" calling enumClassNames \n") ;
diff --git a/TEST/v2test_ei.c b/TEST/v2test_ei.c
index e887b55..f2fd4e2 100644
--- a/TEST/v2test_ei.c
+++ b/TEST/v2test_ei.c
@@ -63,9 +63,9 @@
}
client = ce->ft->connect(ce, cim_host , "http", cim_host_port, cim_host_userid, cim_host_passwd , &status);
- if(client == NULL)
- {
- printf(" failed the call to connect \n") ;
+ if (client == NULL) {
+ printf("Coudn't connect to the server. Check if sfcb is running.\n");
+ return 1;
}
op = (CMPIObjectPath *) ce->ft->newObjectPath(ce, "root/cimv2", "CIM_ManagedElement" , &status);
diff --git a/TEST/v2test_ein.c b/TEST/v2test_ein.c
index 2aaf668..e2bc411 100644
--- a/TEST/v2test_ein.c
+++ b/TEST/v2test_ein.c
@@ -64,9 +64,9 @@
}
printf("do connect \n") ;
client = ce->ft->connect(ce, cim_host , "http", cim_host_port, cim_host_userid, cim_host_passwd , &status);
- if(client == NULL)
- {
- printf(" failed the call to connect \n") ;
+ if (client == NULL) {
+ printf("Coudn't connect to the server. Check if sfcb is running.\n");
+ return 1;
}
printf("do newObjectPath \n") ;
diff --git a/TEST/v2test_gc.c b/TEST/v2test_gc.c
index f6ee5e1..53fad69 100644
--- a/TEST/v2test_gc.c
+++ b/TEST/v2test_gc.c
@@ -93,6 +93,10 @@
if (rc == 0 ) {
client = ce->ft->connect(ce, cim_host , "http", cim_host_port, cim_host_userid, cim_host_passwd , &status);
+ if (client == NULL) {
+ printf("Coudn't connect to the server. Check if sfcb is running.\n");
+ return 1;
+ }
op = (CMPIObjectPath *)ce->ft->newObjectPath(ce, "root/cimv2", "CIM_ComputerSystem" , &status);
class =(CMPIConstClass *) client->ft->getClass(client,(CIMCObjectPath *) op, CMPI_FLAG_IncludeQualifiers, NULL, &status);