From patchwork Tue Sep 29 20:04:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 50591 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8TK8GI8029642 for ; Tue, 29 Sep 2009 20:08:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753738AbZI2UIG (ORCPT ); Tue, 29 Sep 2009 16:08:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753151AbZI2UIG (ORCPT ); Tue, 29 Sep 2009 16:08:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15162 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbZI2UID (ORCPT ); Tue, 29 Sep 2009 16:08:03 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8TK86xv001143; Tue, 29 Sep 2009 16:08:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8TK86Pf031887; Tue, 29 Sep 2009 16:08:06 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n8TK80NY003847; Tue, 29 Sep 2009 16:08:04 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 4/6] KVM test: step file tests: add parameter timeout_multiplier Date: Tue, 29 Sep 2009 22:04:25 +0200 Message-Id: <1254254667-19385-4-git-send-email-mgoldish@redhat.com> In-Reply-To: <1254254667-19385-3-git-send-email-mgoldish@redhat.com> References: <1254254667-19385-1-git-send-email-mgoldish@redhat.com> <1254254667-19385-2-git-send-email-mgoldish@redhat.com> <1254254667-19385-3-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/control b/client/tests/kvm/control index 72658f1..491870a 100644 --- a/client/tests/kvm/control +++ b/client/tests/kvm/control @@ -140,6 +140,7 @@ filename = os.path.join(pwd, "kvm_tests.cfg") cfg = kvm_config.config(filename) # If desirable, make changes to the test configuration here. For example: +# cfg.parse_string("install|setup: timeout_multiplier = 2") # cfg.parse_string("only fc8_quick") # cfg.parse_string("display = sdl") diff --git a/client/tests/kvm/control.parallel b/client/tests/kvm/control.parallel index cf268ea..fac0176 100644 --- a/client/tests/kvm/control.parallel +++ b/client/tests/kvm/control.parallel @@ -136,6 +136,7 @@ filename = os.path.join(pwd, "kvm_tests.cfg") cfg = kvm_config.config(filename) # If desirable, make changes to the test configuration here. For example: +# cfg.parse_string("install|setup: timeout_multiplier = 2") # cfg.parse_string("only fc8_quick") # cfg.parse_string("display = sdl") diff --git a/client/tests/kvm/tests/steps.py b/client/tests/kvm/tests/steps.py index 8bc85f2..d0b7dbd 100644 --- a/client/tests/kvm/tests/steps.py +++ b/client/tests/kvm/tests/steps.py @@ -33,6 +33,21 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, cmd, dx, dy, x1, y1, md5sum, timeout = words[:7] dx, dy, x1, y1, timeout = map(int, [dx, dy, x1, y1, timeout]) + scrdump_filename = os.path.join(debug_dir, "scrdump.ppm") + cropped_scrdump_filename = os.path.join(debug_dir, "cropped_scrdump.ppm") + expected_scrdump_filename = os.path.join(debug_dir, "scrdump_expected.ppm") + expected_cropped_scrdump_filename = os.path.join(debug_dir, + "cropped_scrdump_expected.ppm") + comparison_filename = os.path.join(debug_dir, "comparison.ppm") + + # Multiply timeout by the timeout multiplier + timeout_multiplier = params.get("timeout_multiplier") + if timeout_multiplier: + timeout_multiplier = float(timeout_multiplier) + else: + timeout_multiplier = 1.0 + timeout *= timeout_multiplier + # Timeout/5 is the time it took stepmaker to complete this step. # Divide that number by 10 to poll 10 times, just in case # current machine is stronger then the "stepmaker machine". @@ -41,13 +56,6 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, if sleep_duration < 1.0: sleep_duration = 1.0 if sleep_duration > 10.0: sleep_duration = 10.0 - scrdump_filename = os.path.join(debug_dir, "scrdump.ppm") - cropped_scrdump_filename = os.path.join(debug_dir, "cropped_scrdump.ppm") - expected_scrdump_filename = os.path.join(debug_dir, "scrdump_expected.ppm") - expected_cropped_scrdump_filename = os.path.join(debug_dir, - "cropped_scrdump_expected.ppm") - comparison_filename = os.path.join(debug_dir, "comparison.ppm") - fail_if_stuck_for = params.get("fail_if_stuck_for") if fail_if_stuck_for: fail_if_stuck_for = float(fail_if_stuck_for)