From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=BDupka?= Subject: [PATCH] Correcting timeout interruption of virtio_console test. Date: Fri, 3 Dec 2010 14:10:09 +0100 Message-ID: <1291381809-16450-1-git-send-email-jzupka@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-autotest@redhat.com, kvm@vger.kernel.org, autotest@test.kernel.org, lmr@redhat.com, ldoktor@redhat.com, akong@redhat.com Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Catch new exception from kvm_suprocess to avoid killing of tests. --- client/tests/kvm/tests/virtio_console.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py index d8d2143..d083783 100644 --- a/client/tests/kvm/tests/virtio_console.py +++ b/client/tests/kvm/tests/virtio_console.py @@ -468,9 +468,13 @@ def run_virtio_console(test, params, env): logging.debug("Executing '%s' on virtio_guest.py loop, vm: %s," + "timeout: %s", command, vm[0].name, timeout) vm[1].sendline(command) - (match, data) = vm[1].read_until_last_line_matches(["PASS:", - "FAIL:[Failed to execute]"], - timeout) + try: + (match, data) = vm[1].read_until_last_line_matches(["PASS:", + "FAIL:"], + timeout) + except (kvm_subprocess.ExpectTimeoutError): + match = None + data = None return (match, data) -- 1.7.3.2