From patchwork Fri Dec 3 13:13:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Zupka X-Patchwork-Id: 377861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB3DDI5P011765 for ; Fri, 3 Dec 2010 13:13:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754800Ab0LCNNK (ORCPT ); Fri, 3 Dec 2010 08:13:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4863 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605Ab0LCNNJ (ORCPT ); Fri, 3 Dec 2010 08:13:09 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB3DD8QR027863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 3 Dec 2010 08:13:08 -0500 Received: from jzupka.local.com (dhcp-27-100.brq.redhat.com [10.34.27.100]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB3DD6Pw014005; Fri, 3 Dec 2010 08:13:06 -0500 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=BDupka?= To: kvm-autotest@redhat.com, kvm@vger.kernel.org, autotest@test.kernel.org, lmr@redhat.com, ldoktor@redhat.com, akong@redhat.com Cc: jzupka@redhat.com Subject: [KVM-Autotest][PATCH][virtio-console] Correcting timeout interruption of virtio_console test. Date: Fri, 3 Dec 2010 14:13:09 +0100 Message-Id: <1291381989-16585-1-git-send-email-jzupka@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Dec 2010 13:13:19 +0000 (UTC) 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)