From 86edcfac4d4ffc4343c3c907fc94f3454fdd7c3e Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 3 Jul 2023 13:40:38 +0200 Subject: [PATCH] tests: qemudomainsnapshotxml2xmlout: Use real 'x86_64' capabilities in all test data Use the platform which is getting most development for the snapshot XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- .../disk_snapshot_redefine.xml | 9 ++++++--- .../external_vm_redefine.xml | 9 ++++++--- tests/qemudomainsnapshotxml2xmlout/full_domain.xml | 9 ++++++--- tests/qemudomainsnapshotxml2xmlout/metadata.xml | 9 ++++++--- tests/qemudomainsnapshotxml2xmltest.c | 6 ++++++ 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml index 24b41ba7c5..736a260eab 100644 --- a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml +++ b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml @@ -31,15 +31,18 @@ 219100 1 - hvm + hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 @@ -76,7 +79,7 @@
- +
diff --git a/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml b/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml index eae4691c1c..da717cb236 100644 --- a/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml +++ b/tests/qemudomainsnapshotxml2xmlout/external_vm_redefine.xml @@ -21,22 +21,25 @@ 219100 1 - hvm + hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64
- +
diff --git a/tests/qemudomainsnapshotxml2xmlout/full_domain.xml b/tests/qemudomainsnapshotxml2xmlout/full_domain.xml index 1ddaa2a9aa..643f20269b 100644 --- a/tests/qemudomainsnapshotxml2xmlout/full_domain.xml +++ b/tests/qemudomainsnapshotxml2xmlout/full_domain.xml @@ -14,22 +14,25 @@ 219100 1 - hvm + hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64
- +
diff --git a/tests/qemudomainsnapshotxml2xmlout/metadata.xml b/tests/qemudomainsnapshotxml2xmlout/metadata.xml index 4b14c9efde..3fae6aa9e4 100644 --- a/tests/qemudomainsnapshotxml2xmlout/metadata.xml +++ b/tests/qemudomainsnapshotxml2xmlout/metadata.xml @@ -18,22 +18,25 @@ 219100 1 - hvm + hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64
- +
diff --git a/tests/qemudomainsnapshotxml2xmltest.c b/tests/qemudomainsnapshotxml2xmltest.c index a09404a9d5..035c275b14 100644 --- a/tests/qemudomainsnapshotxml2xmltest.c +++ b/tests/qemudomainsnapshotxml2xmltest.c @@ -109,11 +109,17 @@ testCompareXMLToXMLHelper(const void *data) static int mymain(void) { + g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps(); + g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref); int ret = 0; if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; + if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "", + capslatest, capscache, NULL, NULL) < 0) + return EXIT_FAILURE; + virDomainXMLOptionSetMomentPostParse(driver.xmlopt, testSnapshotPostParse);