From: Yolkfull Chow Subject: [PATCH] Little bug fix in pci_hotplug.py Date: Tue, 13 Oct 2009 17:13:23 +0800 Message-ID: <1255425203-7980-1-git-send-email-yzhou@redhat.com> Cc: Yolkfull Chow To: kvm@vger.kernel.org, autotest@test.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45077 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbZJMJNy (ORCPT ); Tue, 13 Oct 2009 05:13:54 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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