render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
From 1f1df77ba761141d7b68dd98442cd63c708ad6f0 Mon Sep 17 00:00:00 2001
Message-Id: <1f1df77ba761141d7b68dd98442cd63c708ad6f0@dist-git>
From: Andrea Bolognani <abologna@redhat.com>
Date: Tue, 11 Aug 2015 17:16:11 +0200
Subject: [PATCH] tests: Re-enable ppc64 cpu tests

Now that all the changes have been implemented we can run the
test cases once again, after updating them to reflect the new
behaviour.

(cherry picked from commit 049df97504e4f14cc4b8e16db26ea202c47d336a)

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1250977

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 tests/cputest.c                                          | 16 ++++------------
 .../cputestdata/ppc64-baseline-incompatible-vendors.xml  |  4 ++--
 tests/cputestdata/ppc64-baseline-no-vendor-result.xml    |  2 +-
 tests/cputestdata/ppc64-baseline-no-vendor.xml           |  2 +-
 tests/cputestdata/ppc64-exact.xml                        |  3 ---
 tests/cputestdata/ppc64-guest-exact.xml                  |  3 +++
 tests/cputestdata/ppc64-guest-nofallback.xml             |  3 +--
 tests/cputestdata/ppc64-guest-strict.xml                 |  3 +++
 tests/cputestdata/ppc64-guest.xml                        |  3 +--
 tests/cputestdata/ppc64-host+guest,ppc_models-result.xml |  2 +-
 tests/cputestdata/ppc64-host.xml                         |  2 +-
 tests/cputestdata/ppc64-strict.xml                       |  3 ---
 12 files changed, 18 insertions(+), 28 deletions(-)
 delete mode 100644 tests/cputestdata/ppc64-exact.xml
 create mode 100644 tests/cputestdata/ppc64-guest-exact.xml
 create mode 100644 tests/cputestdata/ppc64-guest-strict.xml
 delete mode 100644 tests/cputestdata/ppc64-strict.xml

diff --git a/tests/cputest.c b/tests/cputest.c
index 4dbccfd..09f690a 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -501,9 +501,7 @@ static const char *model486[]   = { "486" };
 static const char *nomodel[]    = { "nomodel" };
 static const char *models[]     = { "qemu64", "core2duo", "Nehalem" };
 static const char *haswell[]    = { "SandyBridge", "Haswell" };
-/* XXX temporarily disabled
-static const char *ppc_models[] = { "POWER7", "POWER7_v2.1", "POWER7_v2.3", "POWER8_v1.0"};
-*/
+static const char *ppc_models[] = { "POWER6", "POWER7", "POWER8" };
 
 static int
 mymain(void)
@@ -597,10 +595,8 @@ mymain(void)
     DO_TEST_COMPARE("x86", "host-worse", "nehalem-force", VIR_CPU_COMPARE_IDENTICAL);
     DO_TEST_COMPARE("x86", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL);
 
-    /* XXX temporarily disabled
-    DO_TEST_COMPARE("ppc64", "host", "strict", VIR_CPU_COMPARE_IDENTICAL);
-    DO_TEST_COMPARE("ppc64", "host", "exact", VIR_CPU_COMPARE_INCOMPATIBLE);
-    */
+    DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL);
+    DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE);
 
     /* guest updates for migration
      * automatically compares host CPU with the result */
@@ -629,10 +625,8 @@ mymain(void)
     DO_TEST_BASELINE("x86", "7", 0, 0);
     DO_TEST_BASELINE("x86", "8", 0, 0);
 
-    /* XXX temporarily disabled
     DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
     DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);
-    */
 
     /* CPU features */
     DO_TEST_HASFEATURE("x86", "host", "vmx", YES);
@@ -668,10 +662,8 @@ mymain(void)
     DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX",
                       NULL, "Haswell-noTSX", 0);
 
-    /* XXX temporarily disabled
     DO_TEST_GUESTDATA("ppc64", "host", "guest", ppc_models, NULL, 0);
-    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER7_v2.1", -1);
-    */
+    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER8", -1);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
diff --git a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
index 97d3c9c..9e67e9d 100644
--- a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
+++ b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
@@ -1,13 +1,13 @@
 <cpuTest>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7+_v2.1</model>
+  <model>POWER7</model>
   <vendor>Intel</vendor>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER8_v1.0</model>
+  <model>POWER8</model>
   <vendor>Intel</vendor>
   <topology sockets='1' cores='1' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
index 36bae52..758099c 100644
--- a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
+++ b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
@@ -1,3 +1,3 @@
 <cpu mode='custom' match='exact'>
-  <model fallback='allow'>POWER7_v2.3</model>
+  <model fallback='forbid'>POWER7</model>
 </cpu>
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor.xml b/tests/cputestdata/ppc64-baseline-no-vendor.xml
index 5e69a62..6d8dd0d 100644
--- a/tests/cputestdata/ppc64-baseline-no-vendor.xml
+++ b/tests/cputestdata/ppc64-baseline-no-vendor.xml
@@ -1,7 +1,7 @@
 <cpuTest>
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7_v2.3</model>
+  <model>POWER7</model>
   <topology sockets='2' cores='4' threads='1'/>
 </cpu>
 </cpuTest>
diff --git a/tests/cputestdata/ppc64-exact.xml b/tests/cputestdata/ppc64-exact.xml
deleted file mode 100644
index c84f16a..0000000
--- a/tests/cputestdata/ppc64-exact.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<cpu match='exact'>
-  <model>POWER8_v1.0</model>
-</cpu>
diff --git a/tests/cputestdata/ppc64-guest-exact.xml b/tests/cputestdata/ppc64-guest-exact.xml
new file mode 100644
index 0000000..f416a59
--- /dev/null
+++ b/tests/cputestdata/ppc64-guest-exact.xml
@@ -0,0 +1,3 @@
+<cpu match='exact'>
+  <model>POWER8</model>
+</cpu>
diff --git a/tests/cputestdata/ppc64-guest-nofallback.xml b/tests/cputestdata/ppc64-guest-nofallback.xml
index 42026b4..070f006 100644
--- a/tests/cputestdata/ppc64-guest-nofallback.xml
+++ b/tests/cputestdata/ppc64-guest-nofallback.xml
@@ -1,4 +1,3 @@
 <cpu match='exact'>
-  <model fallback='forbid'>POWER7_v2.1</model>
-  <topology sockets='2' cores='4' threads='1'/>
+  <model fallback='forbid'>POWER8</model>
 </cpu>
diff --git a/tests/cputestdata/ppc64-guest-strict.xml b/tests/cputestdata/ppc64-guest-strict.xml
new file mode 100644
index 0000000..217dfc7
--- /dev/null
+++ b/tests/cputestdata/ppc64-guest-strict.xml
@@ -0,0 +1,3 @@
+<cpu match='strict'>
+  <model>POWER7</model>
+</cpu>
diff --git a/tests/cputestdata/ppc64-guest.xml b/tests/cputestdata/ppc64-guest.xml
index 9e91501..a60c59f 100644
--- a/tests/cputestdata/ppc64-guest.xml
+++ b/tests/cputestdata/ppc64-guest.xml
@@ -1,4 +1,3 @@
 <cpu match='exact'>
-  <model>POWER7_v2.3</model>
-  <topology sockets='2' cores='4' threads='1'/>
+  <model fallback='allow'>POWER7</model>
 </cpu>
diff --git a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
index 3e55f68..3548c0e 100644
--- a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
+++ b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
@@ -1,5 +1,5 @@
 <cpu mode='custom' match='exact'>
   <arch>ppc64</arch>
-  <model fallback='allow'>POWER7_v2.3</model>
+  <model fallback='allow'>POWER7</model>
   <vendor>IBM</vendor>
 </cpu>
diff --git a/tests/cputestdata/ppc64-host.xml b/tests/cputestdata/ppc64-host.xml
index 39cb741..0ac5c4e 100644
--- a/tests/cputestdata/ppc64-host.xml
+++ b/tests/cputestdata/ppc64-host.xml
@@ -1,6 +1,6 @@
 <cpu>
   <arch>ppc64</arch>
-  <model>POWER7_v2.3</model>
+  <model>POWER7</model>
   <vendor>IBM</vendor>
   <topology sockets='1' cores='64' threads='1'/>
 </cpu>
diff --git a/tests/cputestdata/ppc64-strict.xml b/tests/cputestdata/ppc64-strict.xml
deleted file mode 100644
index e91c6e7..0000000
--- a/tests/cputestdata/ppc64-strict.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<cpu match='exact'>
-  <model>POWER7_v2.3</model>
-</cpu>
-- 
2.5.0