[PATCH v2 17/27] tests: viralloc: Remove testDispose case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The VIR_DISPOSE* APIs will be phased out. Additionally the test isn't
really doing useful work in ensuring that the values are indeed cleared
thus there's no point in keeping it around.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/viralloctest.c | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/tests/viralloctest.c b/tests/viralloctest.c
index 8ea98b8eca..0867be8ce1 100644
--- a/tests/viralloctest.c
+++ b/tests/viralloctest.c
@@ -312,38 +312,6 @@ testInsertArray(const void *opaque G_GNUC_UNUSED)
 }


-static int
-testDispose(const void *opaque G_GNUC_UNUSED)
-{
-    int *num = NULL;
-    int *nums = NULL;
-    size_t nnums = 0;
-    char *str = NULL;
-
-    VIR_DISPOSE(num);
-    VIR_DISPOSE_N(nums, nnums);
-    VIR_DISPOSE_STRING(str);
-
-    nnums = 10;
-    VIR_DISPOSE_N(nums, nnums);
-
-    num = g_new0(int, 1);
-
-    VIR_DISPOSE(num);
-
-    nnums = 10;
-    nums = g_new0(int, nnums);
-
-    VIR_DISPOSE_N(nums, nnums);
-
-    str = g_strdup("test");
-
-    VIR_DISPOSE_STRING(str);
-
-    return 0;
-}
-
-
 static int
 mymain(void)
 {
@@ -357,8 +325,6 @@ mymain(void)
         ret = -1;
     if (virTestRun("insert array", testInsertArray, NULL) < 0)
         ret = -1;
-    if (virTestRun("dispose tests", testDispose, NULL) < 0)
-        ret = -1;

     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux