[PATCH] Little bug fix in pci_hotplug.py

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

 



If command executed timeout, the return value of status could be None,
which is missed in judge statement:

if s:
   ...

Thanks Jason Wang for pointing this out.

Signed-off-by: Yolkfull Chow <yzhou@xxxxxxxxxx>
---
 client/tests/kvm/tests/pci_hotplug.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/tests/pci_hotplug.py b/client/tests/kvm/tests/pci_hotplug.py
index 01d9447..3ad9ea2 100644
--- a/client/tests/kvm/tests/pci_hotplug.py
+++ b/client/tests/kvm/tests/pci_hotplug.py
@@ -83,7 +83,7 @@ def run_pci_hotplug(test, params, env):
 
     # Test the newly added device
     s, o = session.get_command_status_output(params.get("pci_test_cmd"))
-    if s:
+    if s != 0:
         raise error.TestFail("Check for %s device failed after PCI hotplug. "
                              "Output: %s" % (test_type, o))
 
-- 
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux