'qemu-kvm -device ?' print output to stderr. So have to udpate the
code to make it works.

Signed-off-by: Feng Yang <[email protected]>
---
 virttest/kvm_vm.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/virttest/kvm_vm.py b/virttest/kvm_vm.py
index 05159a5..cb2207e 100644
--- a/virttest/kvm_vm.py
+++ b/virttest/kvm_vm.py
@@ -677,11 +677,11 @@ class VM(virt_vm.BaseVM):
 
         def add_pcidevice(help_text, host, params=None):
             assign_param = []
-            device_help = utils.system_output("%s -device \\?" % qemu_binary)
+            device_help = utils.system_output("%s -device \\? 2>&1" % 
qemu_binary)
             cmd = "  -pcidevice "
             if bool(re.search("pci-assign", device_help, re.M)):
                 cmd = " -device pci-assign,"
-            help_cmd = "%s -device pci-assign,\\?" % qemu_binary
+            help_cmd = "%s -device pci-assign,\\? 2>&1" % qemu_binary
             pcidevice_help = utils.system_output(help_cmd)
             cmd += "host=%s" % host
             cmd += ",id=id_%s" % host
-- 
1.7.1

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to