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(a)redhat.com>
---
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