Instead of strictly requiring cpu_model_flags to start with ",", add the
comma if necessary.

The commit that changed the code to always require commas broke most of
the "qemu_cpu" test cases. This should make them work again.

Cc: Xiaoqing Wei <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
---
 virttest/qemu_vm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
index b9ba362..453a33c 100644
--- a/virttest/qemu_vm.py
+++ b/virttest/qemu_vm.py
@@ -1164,6 +1164,8 @@ class VM(virt_vm.BaseVM):
                 if vendor_id:
                     cmd += ",vendor=\"%s\"" % vendor_id
                 if flags:
+                    if not flags.startswith(","):
+                        cmd += ","
                     cmd += "%s" % flags
                 if family is not None:
                     cmd += ",family=%s" % family
-- 
1.8.3.1

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to