diff options
| author | Anas Nashif <nashif@intel.com> | 2007-08-03 12:40:05 +0000 |
|---|---|---|
| committer | Anas Nashif <nashif@intel.com> | 2007-08-03 12:40:05 +0000 |
| commit | dc09b03a2a705364b054fcaf7c65afd7f6583a81 (patch) | |
| tree | c0af8dc4f35ca83d100f17dde6dbd4be98b584fb /tests/cunit | |
| parent | 0288eff339ef36e57c0bd86d274f7f8b02664d87 (diff) | |
| download | wsmancli-dc09b03a2a705364b054fcaf7c65afd7f6583a81.tar.gz wsmancli-dc09b03a2a705364b054fcaf7c65afd7f6583a81.tar.xz wsmancli-dc09b03a2a705364b054fcaf7c65afd7f6583a81.zip | |
treat warnings as errors and fixed them
Diffstat (limited to 'tests/cunit')
| -rw-r--r-- | tests/cunit/enumeration.c | 41 | ||||
| -rw-r--r-- | tests/cunit/identify.c | 23 | ||||
| -rwxr-xr-x | tests/cunit/invoke.c | 14 | ||||
| -rw-r--r-- | tests/cunit/pull.c | 100 | ||||
| -rw-r--r-- | tests/cunit/transfer_get.c | 8 | ||||
| -rwxr-xr-x | tests/cunit/transfer_put.c | 12 |
6 files changed, 88 insertions, 110 deletions
diff --git a/tests/cunit/enumeration.c b/tests/cunit/enumeration.c index bb9f6c4..a062af5 100644 --- a/tests/cunit/enumeration.c +++ b/tests/cunit/enumeration.c @@ -50,7 +50,6 @@ -static int _debug = 0; static char *filters1[] = { @@ -76,17 +75,6 @@ static char *filters3[] = { NULL, NULL, }; -static char *filters4[] = { - NULL, // "/s:Envelope/s:Body/wsen:EnumerateResponse/wsman:Items[1]/p:OMC_InitdService[1]/p:SystemName", - "%s", - NULL, NULL, -}; - -static char *filters5[] = { - "/s:Envelope/s:Body/s:EnumerateResponse/wsman:EndOfSequence", - "", - NULL, NULL, -}; static char *filters[] = { "/s:Envelope/s:Body/s:EnumerateResponse/s:EnumerationContext", NULL, @@ -96,8 +84,8 @@ static char *filters[] = { static TestData tests[] = { { - "Enumeration with non existent Resource URI.", - "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", + "Enumeration with non existent Resource URI.", + "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", NULL, NULL, NULL, @@ -127,12 +115,12 @@ static TestData tests[] = { { "Enumeration (Count Estimation).", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, NULL, 200, FLAG_ENUMERATION_COUNT_ESTIMATION, @@ -140,7 +128,7 @@ static TestData tests[] = { filters3, }, { - "Enumeration (Optimized)", + "Enumeration (Optimized)", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", NULL, NULL, @@ -154,7 +142,7 @@ static TestData tests[] = { 200, }, { - "Enumeration (EPR)", + "Enumeration (EPR)", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", NULL, NULL, @@ -168,7 +156,7 @@ static TestData tests[] = { 200, }, { - "Enumeration (ObjEPR)", + "Enumeration (ObjEPR)", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", NULL, NULL, @@ -182,7 +170,7 @@ static TestData tests[] = { 200, }, { - "Enumeration (Optimized/EPR/Count Estimation)", + "Enumeration (Optimized/EPR/Count Estimation)", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", NULL, NULL, @@ -257,10 +245,9 @@ client_opt_t *options; -static void enumeration_test() { +static void enumeration_test(void) { char *enumContext = NULL; static int i = 0; - int num; char *selectors = NULL; @@ -282,7 +269,7 @@ static void enumeration_test() { CU_ASSERT_TRUE(wsmc_get_response_code(cl) == tests[i].final_status); if (wsmc_get_response_code(cl) != tests[i].final_status) { if (verbose) { - printf("\nExpected = %ld\nReturned = %ld ", + printf("\nExpected = %d\nReturned = %ld ", tests[i].final_status, wsmc_get_response_code(cl)); } goto RETURN; diff --git a/tests/cunit/identify.c b/tests/cunit/identify.c index ac53ad9..213cede 100644 --- a/tests/cunit/identify.c +++ b/tests/cunit/identify.c @@ -53,11 +53,11 @@ static TestData tests[] = { { - "Testing Identify Request, check protocol version", - NULL, - NULL, - NULL, - NULL, + "Testing Identify Request, check protocol version", + NULL, + NULL, + NULL, + NULL, "/s:Envelope/s:Body/wsmid:IdentifyResponse/wsmid:ProtocolVersion", XML_NS_WS_MAN, "/s:Envelope/s:Body/wsmid:IdentifyResponse/wsmid:ProductVersion", @@ -67,11 +67,11 @@ static TestData tests[] = { 0 }, { - "Testing Identify Request, check product vendor", - NULL, - NULL, - NULL, - NULL, + "Testing Identify Request, check product vendor", + NULL, + NULL, + NULL, + NULL, "/s:Envelope/s:Body/wsmid:IdentifyResponse/wsmid:ProductVendor", "Openwsman Project", NULL, @@ -91,8 +91,7 @@ client_opt_t *options; -static void -identify_test() { +static void identify_test(void) { WsXmlDocH response; static int i = 0; diff --git a/tests/cunit/invoke.c b/tests/cunit/invoke.c index e7e8cde..6660ae8 100755 --- a/tests/cunit/invoke.c +++ b/tests/cunit/invoke.c @@ -53,10 +53,10 @@ TestData invoke_tests[] = { NULL, NULL, "/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value", - "wsman:InvalidSelectors", + "wsman:InvalidSelectors", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InsufficientSelectors", - 400, + 400, 0, 0 }, @@ -65,13 +65,13 @@ TestData invoke_tests[] = { "Custom Method with non existent Resource URI.", "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdServicex", "ServiceStatus", - NULL, + NULL, NULL, "/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value", - "wsa:DestinationUnreachable", + "wsa:DestinationUnreachable", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InvalidResourceURI", - 400, + 400, 0, 0 }, @@ -183,7 +183,7 @@ static int ntests = sizeof (invoke_tests) / sizeof (invoke_tests[0]); extern WsManClient *cl; client_opt_t *options; -static void invoke_test() { +static void invoke_test(void) { WsXmlDocH doc; char *xpf = NULL; char *xpd = NULL; @@ -216,7 +216,7 @@ static void invoke_test() { if (wsmc_get_response_code(cl) != invoke_tests[i].final_status) { if (verbose) { - printf("\nExpected = %ld\nReturned = %ld ", + printf("\nExpected = %d\nReturned = %ld ", invoke_tests[i].final_status, wsmc_get_response_code(cl)); } diff --git a/tests/cunit/pull.c b/tests/cunit/pull.c index aaa95d3..1e5956b 100644 --- a/tests/cunit/pull.c +++ b/tests/cunit/pull.c @@ -48,22 +48,14 @@ #include "common.h" -static char *filters2[] = { - "/s:Envelope/s:Body/wsen:PullResponse/wsman:Items/wsa:EndpointReference/wsa:Address", - NULL, - NULL, NULL, -}; - - - static TestData pull_tests[] = { { - "Pull. Enumeration with non existent Resource URI.", - "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", - NULL, - NULL, - NULL, + "Pull. Enumeration with non existent Resource URI.", + "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", + NULL, + NULL, + NULL, "/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value", "wsa:DestinationUnreachable", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", @@ -73,58 +65,58 @@ static TestData pull_tests[] = { 0 }, { - "Pull. Enumeration (Optimized)", - "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + "Pull. Enumeration (Optimized)", + "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, 200, FLAG_ENUMERATION_OPTIMIZATION, 0 }, { - "Pull. Enumeration (Optimized/EPR/Count)", - "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + "Pull. Enumeration (Optimized/EPR/Count)", + "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, 200, FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_EPR | FLAG_ENUMERATION_COUNT_ESTIMATION , 10 }, { - "Pull. Enumeration (Optimized/EPR)", - "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + "Pull. Enumeration (Optimized/EPR)", + "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, 200, FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_EPR, 10 }, { - "Pull. Enumeration (Optimized/ObjEPR)", - "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + "Pull. Enumeration (Optimized/ObjEPR)", + "http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, 200, FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_OBJ_AND_EPR, 10 @@ -132,9 +124,9 @@ static TestData pull_tests[] = { { "Pull. Enumeration with valid Resource URI and Items Count Estimation.", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem", - NULL, - NULL, - NULL, + NULL, + NULL, + NULL, "/s:Envelope/s:Header/wsman:TotalItemsCountEstimate", NULL, NULL, @@ -153,7 +145,7 @@ extern WsManClient *cl; client_opt_t *options; -static void pull_test() { +static void pull_test(void) { char *enumContext = NULL; static int i = 0; char *xp = NULL; @@ -174,7 +166,7 @@ static void pull_test() { pull_tests[i].final_status); if (wsmc_get_response_code(cl) != pull_tests[i].final_status) { if (verbose) { - printf("\nExpected = %ld\nReturned = %ld ", + printf("\nExpected = %d\nReturned = %ld ", pull_tests[i].final_status, wsmc_get_response_code(cl)); } diff --git a/tests/cunit/transfer_get.c b/tests/cunit/transfer_get.c index 1867e29..54d5516 100644 --- a/tests/cunit/transfer_get.c +++ b/tests/cunit/transfer_get.c @@ -66,13 +66,13 @@ TestData get_tests[] = { "Transfer Get with non existent Resource URI.", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", NULL, - NULL, + NULL, NULL, "/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value", - "wsa:DestinationUnreachable", + "wsa:DestinationUnreachable", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InvalidResourceURI", - 400, + 400, 0, 0 }, @@ -158,7 +158,7 @@ static int ntests = sizeof (get_tests) / sizeof (get_tests[0]); extern WsManClient *cl; client_opt_t *options; -static void transfer_get_test() { +static void transfer_get_test(void) { WsXmlDocH doc; char *xpf = NULL; char *xpd = NULL; diff --git a/tests/cunit/transfer_put.c b/tests/cunit/transfer_put.c index 21b62c7..87f5263 100755 --- a/tests/cunit/transfer_put.c +++ b/tests/cunit/transfer_put.c @@ -56,7 +56,7 @@ TestData put_tests[] = { "wsman:InvalidSelectors", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InsufficientSelectors", - 400, + 400, 0, 0 }, @@ -65,13 +65,13 @@ TestData put_tests[] = { "Transfer Put with non existent Resource URI.", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemxx", NULL, - NULL, + NULL, NULL, "/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value", - "wsa:DestinationUnreachable", + "wsa:DestinationUnreachable", "/s:Envelope/s:Body/s:Fault/s:Detail/wsman:FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InvalidResourceURI", - 400, + 400, 0, 0 }, @@ -168,7 +168,7 @@ static int ntests = sizeof (put_tests) / sizeof (put_tests[0]); extern WsManClient *cl; client_opt_t *options; -static void transfer_put_test() { +static void transfer_put_test(void) { WsXmlDocH doc; char *xpf = NULL; char *xpd = NULL; @@ -200,7 +200,7 @@ static void transfer_put_test() { if (wsmc_get_response_code(cl) != put_tests[i].final_status) { if (verbose) { - printf("\nExpected = %ld, Returned = %ld ", + printf("\nExpected = %d, Returned = %ld ", put_tests[i].final_status, wsmc_get_response_code(cl)); // ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); |
