[libvirt] [PATCH v2 17/19] tests: Rename virtTestCounterNext to virTestCounterNext.

Tomáš Ryšavý tom.rysavy.0 at gmail.com
Thu May 26 15:02:06 UTC 2016


This function doesn't follow our convention of naming functions.
---
 tests/qemucommandutiltest.c | 2 +-
 tests/testutils.c           | 6 +++---
 tests/testutils.h           | 2 +-
 tests/virbitmaptest.c       | 2 +-
 tests/virfiletest.c         | 2 +-
 tests/virstoragetest.c      | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c
index 5997229..1975a36 100644
--- a/tests/qemucommandutiltest.c
+++ b/tests/qemucommandutiltest.c
@@ -87,7 +87,7 @@ mymain(void)
     do {                                                            \
         data1.props = PROPS;                                        \
         data1.expectprops = EXPECT;                                 \
-        if (virTestRun(virtTestCounterNext(),                       \
+        if (virTestRun(virTestCounterNext(),                        \
                        testQemuCommandBuildObjectFromJSON,          \
                        &data1) < 0)                                 \
             ret = -1;                                               \
diff --git a/tests/testutils.c b/tests/testutils.c
index 32a7ee2..a979f63 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -1174,7 +1174,7 @@ static char *virtTestCounterPrefixEndOffset;
  * @prefix: name of the test group
  *
  * Resets the counter and sets up the test group name to use with
- * virtTestCounterNext(). This function is not thread safe.
+ * virTestCounterNext(). This function is not thread safe.
  *
  * Note: The buffer for the assembled message is 128 bytes long. Longer test
  * case names (including the number index) will be silently truncated.
@@ -1190,7 +1190,7 @@ virTestCounterReset(const char *prefix)
 
 
 /**
- * virtTestCounterNext:
+ * virTestCounterNext:
  *
  * This function is designed to ease test creation and reordering by adding
  * a way to do automagic test case numbering.
@@ -1203,7 +1203,7 @@ virTestCounterReset(const char *prefix)
  * case names (including the number index) will be silently truncated.
  */
 const char
-*virtTestCounterNext(void)
+*virTestCounterNext(void)
 {
     size_t len = ARRAY_CARDINALITY(virtTestCounterStr);
 
diff --git a/tests/testutils.h b/tests/testutils.h
index 30d7a60..95af06a 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -98,7 +98,7 @@ char *virTestLogContentAndReset(void);
 void virTestQuiesceLibvirtErrors(bool always);
 
 void virTestCounterReset(const char *prefix);
-const char *virtTestCounterNext(void);
+const char *virTestCounterNext(void);
 
 int virtTestMain(int argc,
                  char **argv,
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index eb2385f..00369af 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -645,7 +645,7 @@ test12(const void *opaque ATTRIBUTE_UNUSED)
     testBinaryOpData.a = A;                                                   \
     testBinaryOpData.b = B;                                                   \
     testBinaryOpData.res = RES;                                               \
-    if (virTestRun(virtTestCounterNext(), FUNC, &testBinaryOpData) < 0)       \
+    if (virTestRun(virTestCounterNext(), FUNC, &testBinaryOpData) < 0)        \
         ret = -1;
 
 static int
diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index 27e83fd..a6458df 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -160,7 +160,7 @@ mymain(void)
     do {                                                                       \
         data1.path = PATH;                                                     \
         data1.expect = EXPECT;                                                 \
-        if (virTestRun(virtTestCounterNext(), testFileSanitizePath,            \
+        if (virTestRun(virTestCounterNext(), testFileSanitizePath,             \
                        &data1) < 0)                                            \
             ret = -1;                                                          \
     } while (0)
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 3d4a763..580065e 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -693,7 +693,7 @@ mymain(void)
         for (i = 0; i < ARRAY_CARDINALITY(data.files); i++)          \
             if (data.files[i])                                       \
                 data.nfiles++;                                       \
-        if (virTestRun(virtTestCounterNext(),                        \
+        if (virTestRun(virTestCounterNext(),                         \
                        testStorageChain, &data) < 0)                 \
             ret = -1;                                                \
     } while (0)
-- 
2.5.5




More information about the libvir-list mailing list