Skip to contentSkip to conversation

Little bug fix in pci_hotplug.py

PATCH Applied Yolkfull Chow 2 participants 2 messages Oct 13, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Little bug fix in pci_hotplug.py

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.

---
 client/tests/kvm/tests/pci_hotplug.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/tests/pci_hotplug.py +1 -1
index 01d9447..3ad9ea2 100644
@@ -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))
 
Signature · 1 line
1.6.2.5
#1 lore raw

Applied, thanks!

Quoted 34 lines · Yolkfull Chow

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.

---
 client/tests/kvm/tests/pci_hotplug.py |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/tests/pci_hotplug.py +1 -1
index 01d9447..3ad9ea2 100644
@@ -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

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Signature · 1 line
Lucas