From patchwork Mon Jun 21 10:07:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Yang X-Patchwork-Id: 107165 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5LA7mlb001898 for ; Mon, 21 Jun 2010 10:07:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932074Ab0FUKHq (ORCPT ); Mon, 21 Jun 2010 06:07:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15296 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753767Ab0FUKHp (ORCPT ); Mon, 21 Jun 2010 06:07:45 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5LA7iqG024577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Jun 2010 06:07:44 -0400 Received: from localhost.localdomain (dhcp-91-72.nay.redhat.com [10.66.91.72]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5LA7faq014043; Mon, 21 Jun 2010 06:07:42 -0400 From: Feng Yang To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Feng Yang Subject: [PATCH] KVM Test: Fix invalid literal bug in ioquit Date: Mon, 21 Jun 2010 18:07:41 +0800 Message-Id: <1277114861-21737-1-git-send-email-fyang@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 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 (demeter.kernel.org [140.211.167.41]); Mon, 21 Jun 2010 10:07:48 +0000 (UTC) diff --git a/client/tests/kvm/tests/ioquit.py b/client/tests/kvm/tests/ioquit.py index 389a867..8126139 100644 --- a/client/tests/kvm/tests/ioquit.py +++ b/client/tests/kvm/tests/ioquit.py @@ -23,13 +23,13 @@ def run_ioquit(test, params, env): (s, o) = session.get_command_status_output(bg_cmd, timeout=60) check_cmd = params.get("check_cmd") (s, o) = session2.get_command_status_output(check_cmd, timeout=60) - if int(o) <= 0: + if s: raise error.TestError("Fail to add IO workload for Guest OS") logging.info("Sleep for a while") time.sleep(random.randrange(30,100)) - (s, o) = session2.get_command_status_output(check_cmd, timeout=300) - if int(o) <= 0: + (s, o) = session2.get_command_status_output(check_cmd, timeout=60) + if s: logging.info("IO workload finished before the VM was killed") logging.info("Kill the virtual machine") vm.process.close() diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample index ce88235..0fd5543 100644 --- a/client/tests/kvm/tests_base.cfg.sample +++ b/client/tests/kvm/tests_base.cfg.sample @@ -411,7 +411,7 @@ variants: - ioquit: type = ioquit background_cmd = "for i in 1 2 3 4; do (nohup dd if=/dev/urandom of=/tmp/file bs=102400 count=10000000 &) done" - check_cmd = ps -a |grep dd |wc -l + check_cmd = ps -a |grep dd login_timeout = 360 - qemu_img: