render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7a3408
From 1f1df77ba761141d7b68dd98442cd63c708ad6f0 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <1f1df77ba761141d7b68dd98442cd63c708ad6f0@dist-git>
7a3408
From: Andrea Bolognani <abologna@redhat.com>
7a3408
Date: Tue, 11 Aug 2015 17:16:11 +0200
7a3408
Subject: [PATCH] tests: Re-enable ppc64 cpu tests
7a3408
7a3408
Now that all the changes have been implemented we can run the
7a3408
test cases once again, after updating them to reflect the new
7a3408
behaviour.
7a3408
7a3408
(cherry picked from commit 049df97504e4f14cc4b8e16db26ea202c47d336a)
7a3408
7a3408
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1250977
7a3408
7a3408
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 tests/cputest.c                                          | 16 ++++------------
7a3408
 .../cputestdata/ppc64-baseline-incompatible-vendors.xml  |  4 ++--
7a3408
 tests/cputestdata/ppc64-baseline-no-vendor-result.xml    |  2 +-
7a3408
 tests/cputestdata/ppc64-baseline-no-vendor.xml           |  2 +-
7a3408
 tests/cputestdata/ppc64-exact.xml                        |  3 ---
7a3408
 tests/cputestdata/ppc64-guest-exact.xml                  |  3 +++
7a3408
 tests/cputestdata/ppc64-guest-nofallback.xml             |  3 +--
7a3408
 tests/cputestdata/ppc64-guest-strict.xml                 |  3 +++
7a3408
 tests/cputestdata/ppc64-guest.xml                        |  3 +--
7a3408
 tests/cputestdata/ppc64-host+guest,ppc_models-result.xml |  2 +-
7a3408
 tests/cputestdata/ppc64-host.xml                         |  2 +-
7a3408
 tests/cputestdata/ppc64-strict.xml                       |  3 ---
7a3408
 12 files changed, 18 insertions(+), 28 deletions(-)
7a3408
 delete mode 100644 tests/cputestdata/ppc64-exact.xml
7a3408
 create mode 100644 tests/cputestdata/ppc64-guest-exact.xml
7a3408
 create mode 100644 tests/cputestdata/ppc64-guest-strict.xml
7a3408
 delete mode 100644 tests/cputestdata/ppc64-strict.xml
7a3408
7a3408
diff --git a/tests/cputest.c b/tests/cputest.c
7a3408
index 4dbccfd..09f690a 100644
7a3408
--- a/tests/cputest.c
7a3408
+++ b/tests/cputest.c
7a3408
@@ -501,9 +501,7 @@ static const char *model486[]   = { "486" };
7a3408
 static const char *nomodel[]    = { "nomodel" };
7a3408
 static const char *models[]     = { "qemu64", "core2duo", "Nehalem" };
7a3408
 static const char *haswell[]    = { "SandyBridge", "Haswell" };
7a3408
-/* XXX temporarily disabled
7a3408
-static const char *ppc_models[] = { "POWER7", "POWER7_v2.1", "POWER7_v2.3", "POWER8_v1.0"};
7a3408
-*/
7a3408
+static const char *ppc_models[] = { "POWER6", "POWER7", "POWER8" };
7a3408
 
7a3408
 static int
7a3408
 mymain(void)
7a3408
@@ -597,10 +595,8 @@ mymain(void)
7a3408
     DO_TEST_COMPARE("x86", "host-worse", "nehalem-force", VIR_CPU_COMPARE_IDENTICAL);
7a3408
     DO_TEST_COMPARE("x86", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL);
7a3408
 
7a3408
-    /* XXX temporarily disabled
7a3408
-    DO_TEST_COMPARE("ppc64", "host", "strict", VIR_CPU_COMPARE_IDENTICAL);
7a3408
-    DO_TEST_COMPARE("ppc64", "host", "exact", VIR_CPU_COMPARE_INCOMPATIBLE);
7a3408
-    */
7a3408
+    DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL);
7a3408
+    DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE);
7a3408
 
7a3408
     /* guest updates for migration
7a3408
      * automatically compares host CPU with the result */
7a3408
@@ -629,10 +625,8 @@ mymain(void)
7a3408
     DO_TEST_BASELINE("x86", "7", 0, 0);
7a3408
     DO_TEST_BASELINE("x86", "8", 0, 0);
7a3408
 
7a3408
-    /* XXX temporarily disabled
7a3408
     DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
7a3408
     DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);
7a3408
-    */
7a3408
 
7a3408
     /* CPU features */
7a3408
     DO_TEST_HASFEATURE("x86", "host", "vmx", YES);
7a3408
@@ -668,10 +662,8 @@ mymain(void)
7a3408
     DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX",
7a3408
                       NULL, "Haswell-noTSX", 0);
7a3408
 
7a3408
-    /* XXX temporarily disabled
7a3408
     DO_TEST_GUESTDATA("ppc64", "host", "guest", ppc_models, NULL, 0);
7a3408
-    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER7_v2.1", -1);
7a3408
-    */
7a3408
+    DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER8", -1);
7a3408
 
7a3408
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
7a3408
 }
7a3408
diff --git a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
7a3408
index 97d3c9c..9e67e9d 100644
7a3408
--- a/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
7a3408
+++ b/tests/cputestdata/ppc64-baseline-incompatible-vendors.xml
7a3408
@@ -1,13 +1,13 @@
7a3408
 <cpuTest>
7a3408
 <cpu>
7a3408
   <arch>ppc64</arch>
7a3408
-  <model>POWER7+_v2.1</model>
7a3408
+  <model>POWER7</model>
7a3408
   <vendor>Intel</vendor>
7a3408
   <topology sockets='2' cores='4' threads='1'/>
7a3408
 </cpu>
7a3408
 <cpu>
7a3408
   <arch>ppc64</arch>
7a3408
-  <model>POWER8_v1.0</model>
7a3408
+  <model>POWER8</model>
7a3408
   <vendor>Intel</vendor>
7a3408
   <topology sockets='1' cores='1' threads='1'/>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
7a3408
index 36bae52..758099c 100644
7a3408
--- a/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
7a3408
+++ b/tests/cputestdata/ppc64-baseline-no-vendor-result.xml
7a3408
@@ -1,3 +1,3 @@
7a3408
 <cpu mode='custom' match='exact'>
7a3408
-  <model fallback='allow'>POWER7_v2.3</model>
7a3408
+  <model fallback='forbid'>POWER7</model>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-baseline-no-vendor.xml b/tests/cputestdata/ppc64-baseline-no-vendor.xml
7a3408
index 5e69a62..6d8dd0d 100644
7a3408
--- a/tests/cputestdata/ppc64-baseline-no-vendor.xml
7a3408
+++ b/tests/cputestdata/ppc64-baseline-no-vendor.xml
7a3408
@@ -1,7 +1,7 @@
7a3408
 <cpuTest>
7a3408
 <cpu>
7a3408
   <arch>ppc64</arch>
7a3408
-  <model>POWER7_v2.3</model>
7a3408
+  <model>POWER7</model>
7a3408
   <topology sockets='2' cores='4' threads='1'/>
7a3408
 </cpu>
7a3408
 </cpuTest>
7a3408
diff --git a/tests/cputestdata/ppc64-exact.xml b/tests/cputestdata/ppc64-exact.xml
7a3408
deleted file mode 100644
7a3408
index c84f16a..0000000
7a3408
--- a/tests/cputestdata/ppc64-exact.xml
7a3408
+++ /dev/null
7a3408
@@ -1,3 +0,0 @@
7a3408
-<cpu match='exact'>
7a3408
-  <model>POWER8_v1.0</model>
7a3408
-</cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-guest-exact.xml b/tests/cputestdata/ppc64-guest-exact.xml
7a3408
new file mode 100644
7a3408
index 0000000..f416a59
7a3408
--- /dev/null
7a3408
+++ b/tests/cputestdata/ppc64-guest-exact.xml
7a3408
@@ -0,0 +1,3 @@
7a3408
+<cpu match='exact'>
7a3408
+  <model>POWER8</model>
7a3408
+</cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-guest-nofallback.xml b/tests/cputestdata/ppc64-guest-nofallback.xml
7a3408
index 42026b4..070f006 100644
7a3408
--- a/tests/cputestdata/ppc64-guest-nofallback.xml
7a3408
+++ b/tests/cputestdata/ppc64-guest-nofallback.xml
7a3408
@@ -1,4 +1,3 @@
7a3408
 <cpu match='exact'>
7a3408
-  <model fallback='forbid'>POWER7_v2.1</model>
7a3408
-  <topology sockets='2' cores='4' threads='1'/>
7a3408
+  <model fallback='forbid'>POWER8</model>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-guest-strict.xml b/tests/cputestdata/ppc64-guest-strict.xml
7a3408
new file mode 100644
7a3408
index 0000000..217dfc7
7a3408
--- /dev/null
7a3408
+++ b/tests/cputestdata/ppc64-guest-strict.xml
7a3408
@@ -0,0 +1,3 @@
7a3408
+<cpu match='strict'>
7a3408
+  <model>POWER7</model>
7a3408
+</cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-guest.xml b/tests/cputestdata/ppc64-guest.xml
7a3408
index 9e91501..a60c59f 100644
7a3408
--- a/tests/cputestdata/ppc64-guest.xml
7a3408
+++ b/tests/cputestdata/ppc64-guest.xml
7a3408
@@ -1,4 +1,3 @@
7a3408
 <cpu match='exact'>
7a3408
-  <model>POWER7_v2.3</model>
7a3408
-  <topology sockets='2' cores='4' threads='1'/>
7a3408
+  <model fallback='allow'>POWER7</model>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
7a3408
index 3e55f68..3548c0e 100644
7a3408
--- a/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
7a3408
+++ b/tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
7a3408
@@ -1,5 +1,5 @@
7a3408
 <cpu mode='custom' match='exact'>
7a3408
   <arch>ppc64</arch>
7a3408
-  <model fallback='allow'>POWER7_v2.3</model>
7a3408
+  <model fallback='allow'>POWER7</model>
7a3408
   <vendor>IBM</vendor>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-host.xml b/tests/cputestdata/ppc64-host.xml
7a3408
index 39cb741..0ac5c4e 100644
7a3408
--- a/tests/cputestdata/ppc64-host.xml
7a3408
+++ b/tests/cputestdata/ppc64-host.xml
7a3408
@@ -1,6 +1,6 @@
7a3408
 <cpu>
7a3408
   <arch>ppc64</arch>
7a3408
-  <model>POWER7_v2.3</model>
7a3408
+  <model>POWER7</model>
7a3408
   <vendor>IBM</vendor>
7a3408
   <topology sockets='1' cores='64' threads='1'/>
7a3408
 </cpu>
7a3408
diff --git a/tests/cputestdata/ppc64-strict.xml b/tests/cputestdata/ppc64-strict.xml
7a3408
deleted file mode 100644
7a3408
index e91c6e7..0000000
7a3408
--- a/tests/cputestdata/ppc64-strict.xml
7a3408
+++ /dev/null
7a3408
@@ -1,3 +0,0 @@
7a3408
-<cpu match='exact'>
7a3408
-  <model>POWER7_v2.3</model>
7a3408
-</cpu>
7a3408
-- 
7a3408
2.5.0
7a3408