From: Michael Chase-S. <mc...@us...> - 2011-04-05 16:07:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCC - Small Footprint CIM Client". The branch, master has been updated via 8b03b1cfa434f5edaa89061be539616bedb86213 (commit) from 1b022da7d5a336f9162714aff2b00be797f17c86 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8b03b1cfa434f5edaa89061be539616bedb86213 Author: Michael Chase-Salerno <br...@li...> Date: Tue Apr 5 12:06:27 2011 -0400 [3213591] Local intf client abort abnormally on enum filter syntax err added testcase for above. ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index bf810ad..b706e4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-05 Michael Chase-Salerno <br...@li...> + + * TEST/v2test_xq_synerr.c: + [ 3213591 ] Local intf client abort abnormally on enum filter syntax err + 2011-03-30 Chris Buccella <buc...@li...> * TEST/v2test_im.c: diff --git a/TEST/Makefile.am b/TEST/Makefile.am index adc9359..f26191d 100644 --- a/TEST/Makefile.am +++ b/TEST/Makefile.am @@ -63,6 +63,7 @@ noinst_PROGRAMS = test \ v2test_ein \ v2test_gc \ v2test_im \ + v2test_xq_synerr \ print-types test_SOURCES = test.c show.c @@ -196,6 +197,9 @@ v2test_gc_LDADD = ../libcmpisfcc.la v2test_im_SOURCES = v2test_im.c show.c v2test_im_LDADD = ../libcmpisfcc.la +v2test_xq_synerr_SOURCES = v2test_xq_synerr.c show.c +v2test_xq_synerr_LDADD = ../libcmpisfcc.la + print_types_SOURCES = print-types.c #@INC_AMINCLUDE@ diff --git a/TEST/v2test_ein.c b/TEST/v2test_xq_synerr.c similarity index 61% copy from TEST/v2test_ein.c copy to TEST/v2test_xq_synerr.c index e2bc411..b9f722e 100644 --- a/TEST/v2test_ein.c +++ b/TEST/v2test_xq_synerr.c @@ -70,38 +70,40 @@ int count = 0; } printf("do newObjectPath \n") ; - op = (CMPIObjectPath *)ce->ft->newObjectPath(ce, "root/cimv2", "CIM_ManagedElement" , &status); + op = (CMPIObjectPath *)ce->ft->newObjectPath(ce, "root/cimv2", "Linux_ComputerSystem" , &status); if(op == NULL) { printf(" failed the call to newObjectPath \n") ; } - printf("do enumInstances \n") ; - enm = client->ft->enumInstanceNames(client, (CIMCObjectPath *) op , &status); - if(enm == NULL) - { - printf(" failed the call to client->ft->enumInstances \n") ; + printf("\ndo execQuery (select spelling error) \n") ; + char * query = "selet * from Linux_ComputerSystem where PrimaryOwnerName=\"root\""; + enm = client->ft->execQuery(client, (CIMCObjectPath *) op , query, "CQL", &status); + if (status.rc) { + printf("Syntax error successfully caught by execQuery status.rc = %d\n",status.rc) ; + } else { + // Though it won't get here since the execQuery aborted before this fix. + printf("Syntax error NOT caught by execQuery status.rc = %d\n",status.rc) ; + } + + printf("\ndo execQuery (missing * error) \n") ; + query = "select from Linux_ComputerSystem where PrimaryOwnerName=\"root\""; + enm = client->ft->execQuery(client, (CIMCObjectPath *) op , query, "CQL", &status); + if (status.rc) { + printf("Syntax error successfully caught by execQuery status.rc = %d\n",status.rc) ; + } else { + // Though it won't get here since the execQuery aborted before this fix. + printf("Syntax error NOT caught by execQuery status.rc = %d\n",status.rc) ; } - - /* Print the results */ - - if (!status.rc) { - printf("results:\n"); - count = enm->ft->hasNext(enm, NULL) ; - while (count > 0) { - - data = enm->ft->getNext(enm, NULL); - showObjectPath(data.value.ref); - /* - * see if we have any more - */ - count = enm->ft->hasNext(enm, NULL) ; - } + printf("\ndo execQuery (from spelling error) \n") ; + query = "select * fom Linux_ComputerSystem where PrimaryOwnerName=\"root\""; + enm = client->ft->execQuery(client, (CIMCObjectPath *) op , query, "CQL", &status); + if (status.rc) { + printf("Syntax error successfully caught by execQuery status.rc = %d\n",status.rc) ; } else { - printf(" ERROR received from enumInstanceNames status.rc = %d\n",status.rc) ; - if(msg) - printf(" ERROR msg = %s\n",msg) ; + // Though it won't get here since the execQuery aborted before this fix. + printf("Syntax error NOT caught by execQuery status.rc = %d\n",status.rc) ; } if(enm) enm->ft->release(enm); hooks/post-receive -- SFCC - Small Footprint CIM Client |