[PATCH 05/31] tests: Use 'storage' layer nodename accessors in tests

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

 



Convert all places in tests to use the 'storage' layer nodename
accessors instead of (virStorageSource)->nodestorage.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemublocktest.c       | 4 ++--
 tests/qemumonitorjsontest.c | 2 +-
 tests/qemuxml2argvtest.c    | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index edfe7719c8..9a72a67ce2 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -233,7 +233,7 @@ testQemuDiskXMLToJSONFakeSecrets(virStorageSource *src)

         srcpriv->secinfo->username = g_strdup(src->auth->username);
         srcpriv->secinfo->alias = g_strdup_printf("%s-secalias",
-                                                  NULLSTR(src->nodestorage));
+                                                  NULLSTR(qemuBlockStorageSourceGetStorageNodename(src)));
     }

     if (src->encryption) {
@@ -667,7 +667,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeImage(size_t idx)
    ret->type = VIR_STORAGE_TYPE_FILE;
    ret->format = VIR_STORAGE_FILE_QCOW2;
    ret->path = g_strdup_printf("/image%zu", idx);
-   ret->nodestorage = g_strdup_printf("libvirt-%zu-storage", idx);
+   qemuBlockStorageSourceSetStorageNodename(ret, g_strdup_printf("libvirt-%zu-storage", idx));
    ret->nodeformat = g_strdup_printf("libvirt-%zu-format", idx);

    return ret;
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 2e7b661db4..6b82e3841b 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2601,7 +2601,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque)
     src->format = VIR_STORAGE_FILE_QCOW2;
     src->readonly = true;
     src->nodeformat = g_strdup("test node");
-    src->nodestorage = g_strdup("backing nodename");
+    qemuBlockStorageSourceSetStorageNodename(src, g_strdup("backing nodename"));
     src->backingStore = virStorageSourceNew();

     if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0)
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a454dcb205..48058cb924 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -12,6 +12,7 @@
 # include "internal.h"
 # include "viralloc.h"
 # include "viridentity.h"
+# include "qemu/qemu_block.h"
 # include "qemu/qemu_capabilities.h"
 # include "qemu/qemu_domain.h"
 # include "qemu/qemu_migration.h"
@@ -338,7 +339,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,

                     srcpriv = qemuDomainStorageSourcePrivateFetch(src);

-                    srcpriv->fdpass = qemuFDPassNew(src->nodestorage, priv);
+                    srcpriv->fdpass = qemuFDPassNew(qemuBlockStorageSourceGetStorageNodename(src), priv);
                     qemuFDPassAddFD(srcpriv->fdpass, &fd, "-vdpa");
                 }
             }
-- 
2.41.0




[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