[PATCH 19/51] qemuxml2argvtest: Remove FLAG_SKIP_LEGACY_CPUS

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

 



Remove the notion of legacy cpus as there are no test cases using it any
more.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemuxml2argvtest.c | 27 +++++----------------------
 tests/testutilsqemu.h    |  5 ++---
 2 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a8f476b551..a6a1646efb 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -257,18 +257,16 @@ static virNWFilterDriver fakeNWFilterDriver = {


 static int
-testAddCPUModels(virQEMUCaps *caps, bool skipLegacy)
+testAddCPUModels(virQEMUCaps *caps)
 {
     virArch arch = virQEMUCapsGetArch(caps);
     const char *x86Models[] = {
-        "Opteron_G3", "Opteron_G2", "Opteron_G1",
-        "Nehalem", "Penryn", "Conroe",
-        "Haswell-noTSX", "Haswell",
-    };
-    const char *x86LegacyModels[] = {
         "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)) {
@@ -279,18 +277,6 @@ testAddCPUModels(virQEMUCaps *caps, bool skipLegacy)
                                          G_N_ELEMENTS(x86Models),
                                          VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0)
             return -1;
-
-        if (!skipLegacy) {
-            if (virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_KVM,
-                                             x86LegacyModels,
-                                             G_N_ELEMENTS(x86LegacyModels),
-                                             VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0 ||
-                virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_QEMU,
-                                             x86LegacyModels,
-                                             G_N_ELEMENTS(x86LegacyModels),
-                                             VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0)
-                return -1;
-        }
     }

     return 0;
@@ -313,8 +299,7 @@ testUpdateQEMUCaps(const struct testQemuInfo *info,

     virQEMUCapsSetArch(info->qemuCaps, arch);

-    if (testAddCPUModels(info->qemuCaps,
-                         !!(info->flags & FLAG_SKIP_LEGACY_CPUS)) < 0)
+    if (testAddCPUModels(info->qemuCaps) < 0)
         return -1;

     testUpdateQEMUCapsHostCPUModel(info->qemuCaps, caps->host.arch);
@@ -330,11 +315,9 @@ testCheckExclusiveFlags(int flags)
                   FLAG_EXPECT_PARSE_ERROR |
                   FLAG_FIPS_HOST |
                   FLAG_REAL_CAPS |
-                  FLAG_SKIP_LEGACY_CPUS |
                   FLAG_SLIRP_HELPER |
                   0, -1);

-    VIR_EXCLUSIVE_FLAGS_RET(FLAG_REAL_CAPS, FLAG_SKIP_LEGACY_CPUS, -1);
     return 0;
 }

diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h
index 7845ac7cb6..89d40ce9bc 100644
--- a/tests/testutilsqemu.h
+++ b/tests/testutilsqemu.h
@@ -57,9 +57,8 @@ typedef enum {
     FLAG_EXPECT_PARSE_ERROR = 1 << 1,
     FLAG_FIPS_HOST          = 1 << 2, /* simulate host with FIPS mode enabled */
     FLAG_REAL_CAPS          = 1 << 3,
-    FLAG_SKIP_LEGACY_CPUS   = 1 << 4,
-    FLAG_SLIRP_HELPER       = 1 << 5,
-    FLAG_SKIP_CONFIG_ACTIVE = 1 << 6, /* Skip 'active' config test in qemuxml2xmltest */
+    FLAG_SLIRP_HELPER       = 1 << 4,
+    FLAG_SKIP_CONFIG_ACTIVE = 1 << 5, /* Skip 'active' config test in qemuxml2xmltest */
 } testQemuInfoFlags;

 struct testQemuConf {
-- 
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