[PATCH] qemuxml2argvtest: Fix tests failing on none x86 host CPUs

Boris Fiuczynski posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20230914131555.14927-1-fiuczy@linux.ibm.com
tests/qemuxml2argvtest.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] qemuxml2argvtest: Fix tests failing on none x86 host CPUs
Posted by Boris Fiuczynski 1 year, 1 month ago
Since commit 54257ed51b51 on S390x qemuxml2argvtest fails with the following errors:

144) QEMU XML-2-ARGV cpu-kvmclock.x86_64-latest                        ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
FAILED

2023-09-14 13:01:23.883+0000: 4113077: info : libvirt version: 9.8.0
2023-09-14 13:01:23.883+0000: 4113077: info : hostname: a46lp61.lnxne.boe
2023-09-14 13:01:23.883+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor

1059) QEMU XML-2-ARGV cpu-check-partial.x86_64-latest                   ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
FAILED

2023-09-14 13:01:23.885+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor

1064) QEMU XML-2-ARGV cpu-check-default-partial2.x86_64-latest          ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
FAILED

2023-09-14 13:01:23.885+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor

3 tests failed.

Fixes: 54257ed51b5132032cedb7e1e7b8c34b9ae52115
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
---
 tests/qemuxml2argvtest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 0dd10f1fab..c3f05e83b9 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1035,7 +1035,7 @@ mymain(void)
     DO_TEST_CAPS_VER("clock-hpet-off", "7.2.0");
     DO_TEST_CAPS_LATEST("clock-hpet-off");
     DO_TEST_CAPS_LATEST("clock-catchup");
-    DO_TEST_CAPS_LATEST("cpu-kvmclock");
+    DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-kvmclock", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL);
     DO_TEST_CAPS_LATEST("cpu-host-kvmclock");
     DO_TEST_CAPS_LATEST("kvmclock");
     DO_TEST_CAPS_LATEST("clock-timer-hyperv-rtc");
@@ -2201,13 +2201,13 @@ mymain(void)
     DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage");
 
     DO_TEST_CAPS_LATEST("cpu-check-none");
-    DO_TEST_CAPS_LATEST("cpu-check-partial");
+    DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-check-partial", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL);
     DO_TEST_CAPS_LATEST("cpu-check-full");
     DO_TEST_CAPS_LATEST("cpu-check-default-none");
     DO_TEST_CAPS_LATEST("cpu-check-default-none2");
     /* this test case uses 'cpu="host-model"', run it with Haswell host cpu to prevent test case churn */
     DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-check-default-partial", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL);
-    DO_TEST_CAPS_LATEST("cpu-check-default-partial2");
+    DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-check-default-partial2", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL);
 
     DO_TEST_CAPS_LATEST("cpu-cache-disable");
     /* this test case uses 'cpu="host-model"', run it with Haswell host cpu to prevent test case churn */
-- 
2.41.0
Re: [PATCH] qemuxml2argvtest: Fix tests failing on none x86 host CPUs
Posted by Michal Prívozník 1 year, 1 month ago
On 9/14/23 15:15, Boris Fiuczynski wrote:
> Since commit 54257ed51b51 on S390x qemuxml2argvtest fails with the following errors:
> 
> 144) QEMU XML-2-ARGV cpu-kvmclock.x86_64-latest                        ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> FAILED
> 
> 2023-09-14 13:01:23.883+0000: 4113077: info : libvirt version: 9.8.0
> 2023-09-14 13:01:23.883+0000: 4113077: info : hostname: a46lp61.lnxne.boe
> 2023-09-14 13:01:23.883+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> 
> 1059) QEMU XML-2-ARGV cpu-check-partial.x86_64-latest                   ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> FAILED
> 
> 2023-09-14 13:01:23.885+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> 
> 1064) QEMU XML-2-ARGV cpu-check-default-partial2.x86_64-latest          ... libvirt: CPU Driver error : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> FAILED
> 
> 2023-09-14 13:01:23.885+0000: 4113077: error : virCPUx86Compare:1954 : the CPU is incompatible with host CPU: Host CPU does not provide required features: monitor
> 
> 3 tests failed.
> 
> Fixes: 54257ed51b5132032cedb7e1e7b8c34b9ae52115
> Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
> ---
>  tests/qemuxml2argvtest.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed.

Michal