From 8a9bd034c254bb3e0c616a024c60591888dd25ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ry=C5=A1av=C3=BD?= Date: Thu, 26 May 2016 17:01:55 +0200 Subject: [PATCH] tests: Rename virtTestClearCommandPath to virTestClearCommandPath. This function doesn't follow our convention of naming functions. --- tests/networkxml2firewalltest.c | 2 +- tests/nwfilterebiptablestest.c | 14 +++++++------- tests/nwfilterxml2firewalltest.c | 2 +- tests/testutils.c | 2 +- tests/testutils.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index baf5904318..f3a501a0b0 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -65,7 +65,7 @@ static int testCompareXMLToArgvFiles(const char *xml, goto cleanup; actualargv = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actualargv); + virTestClearCommandPath(actualargv); virCommandSetDryRun(NULL, NULL, NULL); if (virTestCompareToFile(actualargv, cmdline) < 0) diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index 84e5ed24ef..74f9ebd366 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -113,7 +113,7 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -184,7 +184,7 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -233,7 +233,7 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -267,7 +267,7 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -339,7 +339,7 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -429,7 +429,7 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); @@ -502,7 +502,7 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque ATTRIBUTE_UNUSED) goto cleanup; actual = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actual); + virTestClearCommandPath(actual); if (STRNEQ_NULLABLE(actual, expected)) { virTestDifference(stderr, expected, actual); diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 205d3b6e16..ba327d0195 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -400,7 +400,7 @@ static int testCompareXMLToArgvFiles(const char *xml, goto cleanup; actualargv = virBufferContentAndReset(&buf); - virtTestClearCommandPath(actualargv); + virTestClearCommandPath(actualargv); virCommandSetDryRun(NULL, NULL, NULL); testRemoveCommonRules(actualargv); diff --git a/tests/testutils.c b/tests/testutils.c index 081ed8bf99..e643fb21bf 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -1008,7 +1008,7 @@ int virtTestMain(int argc, * iptables --table filter --insert FORWARD --out-interface virbr0 --jump REJECT * iptables --table filter --insert FORWARD --in-interface virbr0 --out-interface virbr0 --jump ACCEPT" */ -void virtTestClearCommandPath(char *cmdset) +void virTestClearCommandPath(char *cmdset) { size_t offset = 0; char *lineStart = cmdset; diff --git a/tests/testutils.h b/tests/testutils.h index d9f92b5115..77a5d259c0 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -54,7 +54,7 @@ int virTestRun(const char *title, int virTestLoadFile(const char *file, char **buf); int virtTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen); -void virtTestClearCommandPath(char *cmdset); +void virTestClearCommandPath(char *cmdset); int virTestDifference(FILE *stream, const char *expect, -- GitLab