[PATCH 07/14] cputest: Don't use preferred model with forbidden fallback

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

 



Using a preferred model for guest CPUs with forbidden fallback masks a
bug in the code. It would just happily use another CPU model supported
by a hypervisor even though it is explicitly forbidden in the CPU XML.

This patch temporarily changes the expected result to -2, which is used
when the result XML file cannot be found (but it was supposed not to be
found since the tested API should have failed). The result will be
switched back to -1 few commits later when the original bug gets fixed.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/cputest.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/cputest.c b/tests/cputest.c
index 16be61b..7496156 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -798,16 +798,14 @@ mymain(void)
     DO_TEST_GUESTDATA("x86", "host", "guest", model486, NULL, 0);
     DO_TEST_GUESTDATA("x86", "host", "guest", models, NULL, 0);
     DO_TEST_GUESTDATA("x86", "host", "guest", nomodel, NULL, -1);
-    DO_TEST_GUESTDATA("x86", "host", "guest-nofallback", models, "Penryn", -1);
+    DO_TEST_GUESTDATA("x86", "host", "guest-nofallback", models, NULL, /*-1*/ -2);
     DO_TEST_GUESTDATA("x86", "host", "host+host-model", models, "Penryn", 0);
-    DO_TEST_GUESTDATA("x86", "host", "host+host-model-nofallback",
-                      models, "Penryn", -1);
+    DO_TEST_GUESTDATA("x86", "host", "host+host-model-nofallback", models, NULL, /*-1*/ -2);
     DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell",
                       haswell, "Haswell", 0);
     DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX",
                       haswell, "Haswell-noTSX", 0);
-    DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX-nofallback",
-                      haswell, "Haswell-noTSX", -1);
+    DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX-nofallback", haswell, NULL, /*-1*/ -2);
     DO_TEST_GUESTDATA("x86", "host-Haswell-noTSX", "Haswell-noTSX",
                       NULL, "Haswell-noTSX", 0);
 
-- 
2.10.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]