[PATCH 50/51] qemuxml2argvtest: Remove cpu model faking for fake-caps tests

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

 



Now that all fake-caps testing was removed we can also remove the
filling of the fake caps by cpu models.

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

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 99e0d3aa0d..2d06e2a0d1 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -256,32 +256,6 @@ static virNWFilterDriver fakeNWFilterDriver = {
 };


-static int
-testAddCPUModels(virQEMUCaps *caps)
-{
-    virArch arch = virQEMUCapsGetArch(caps);
-    const char *x86Models[] = {
-        "n270", "athlon", "pentium3", "pentium2", "pentium",
-        "486", "coreduo", "kvm32", "qemu32", "kvm64",
-        "core2duo", "phenom", "qemu64",
-        "Opteron_G3", "Opteron_G2", "Opteron_G1",
-        "Nehalem", "Penryn", "Conroe",
-        "Haswell-noTSX", "Haswell",
-    };
-
-    if (ARCH_IS_X86(arch)) {
-        if (virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_KVM, x86Models,
-                                         G_N_ELEMENTS(x86Models),
-                                         VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0 ||
-            virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_QEMU, x86Models,
-                                         G_N_ELEMENTS(x86Models),
-                                         VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0)
-            return -1;
-    }
-
-    return 0;
-}
-
 static void
 testUpdateQEMUCapsHostCPUModel(virQEMUCaps *qemuCaps, virArch hostArch)
 {
@@ -289,24 +263,6 @@ testUpdateQEMUCapsHostCPUModel(virQEMUCaps *qemuCaps, virArch hostArch)
     virQEMUCapsUpdateHostCPUModel(qemuCaps, hostArch, VIR_DOMAIN_VIRT_QEMU);
 }

-static int
-testUpdateQEMUCaps(const struct testQemuInfo *info,
-                   virArch arch,
-                   virCaps *caps)
-{
-    if (!caps)
-        return -1;
-
-    virQEMUCapsSetArch(info->qemuCaps, arch);
-
-    if (testAddCPUModels(info->qemuCaps) < 0)
-        return -1;
-
-    testUpdateQEMUCapsHostCPUModel(info->qemuCaps, caps->host.arch);
-
-    return 0;
-}
-

 static int
 testCheckExclusiveFlags(int flags)
@@ -554,11 +510,6 @@ testCompareXMLToArgv(const void *data)
     if (arch == VIR_ARCH_NONE)
         arch = virArchFromHost();

-    if (!(info->flags & FLAG_REAL_CAPS)) {
-        if (testUpdateQEMUCaps(info, arch, driver.caps) < 0)
-            goto cleanup;
-    }
-
     virFileCacheClear(driver.qemuCapsCache);

     if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) < 0)
-- 
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