mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
tests: Use 'storage' layer nodename accessors in tests
Convert all places in tests to use the 'storage' layer nodename accessors instead of (virStorageSource)->nodestorage. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
84c85337ad
commit
4f78275f89
@ -233,7 +233,7 @@ testQemuDiskXMLToJSONFakeSecrets(virStorageSource *src)
|
|||||||
|
|
||||||
srcpriv->secinfo->username = g_strdup(src->auth->username);
|
srcpriv->secinfo->username = g_strdup(src->auth->username);
|
||||||
srcpriv->secinfo->alias = g_strdup_printf("%s-secalias",
|
srcpriv->secinfo->alias = g_strdup_printf("%s-secalias",
|
||||||
NULLSTR(src->nodestorage));
|
NULLSTR(qemuBlockStorageSourceGetStorageNodename(src)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src->encryption) {
|
if (src->encryption) {
|
||||||
@ -667,7 +667,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeImage(size_t idx)
|
|||||||
ret->type = VIR_STORAGE_TYPE_FILE;
|
ret->type = VIR_STORAGE_TYPE_FILE;
|
||||||
ret->format = VIR_STORAGE_FILE_QCOW2;
|
ret->format = VIR_STORAGE_FILE_QCOW2;
|
||||||
ret->path = g_strdup_printf("/image%zu", idx);
|
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);
|
ret->nodeformat = g_strdup_printf("libvirt-%zu-format", idx);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2601,7 +2601,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque)
|
|||||||
src->format = VIR_STORAGE_FILE_QCOW2;
|
src->format = VIR_STORAGE_FILE_QCOW2;
|
||||||
src->readonly = true;
|
src->readonly = true;
|
||||||
src->nodeformat = g_strdup("test node");
|
src->nodeformat = g_strdup("test node");
|
||||||
src->nodestorage = g_strdup("backing nodename");
|
qemuBlockStorageSourceSetStorageNodename(src, g_strdup("backing nodename"));
|
||||||
src->backingStore = virStorageSourceNew();
|
src->backingStore = virStorageSourceNew();
|
||||||
|
|
||||||
if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0)
|
if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0)
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# include "internal.h"
|
# include "internal.h"
|
||||||
# include "viralloc.h"
|
# include "viralloc.h"
|
||||||
# include "viridentity.h"
|
# include "viridentity.h"
|
||||||
|
# include "qemu/qemu_block.h"
|
||||||
# include "qemu/qemu_capabilities.h"
|
# include "qemu/qemu_capabilities.h"
|
||||||
# include "qemu/qemu_domain.h"
|
# include "qemu/qemu_domain.h"
|
||||||
# include "qemu/qemu_migration.h"
|
# include "qemu/qemu_migration.h"
|
||||||
@ -338,7 +339,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
|
|||||||
|
|
||||||
srcpriv = qemuDomainStorageSourcePrivateFetch(src);
|
srcpriv = qemuDomainStorageSourcePrivateFetch(src);
|
||||||
|
|
||||||
srcpriv->fdpass = qemuFDPassNew(src->nodestorage, priv);
|
srcpriv->fdpass = qemuFDPassNew(qemuBlockStorageSourceGetStorageNodename(src), priv);
|
||||||
qemuFDPassAddFD(srcpriv->fdpass, &fd, "-vdpa");
|
qemuFDPassAddFD(srcpriv->fdpass, &fd, "-vdpa");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user