From patchwork Wed Mar 24 08:38:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 87836 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 o2O8dkeq020180 for ; Wed, 24 Mar 2010 08:39:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755229Ab0CXIjo (ORCPT ); Wed, 24 Mar 2010 04:39:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53707 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755145Ab0CXIjn (ORCPT ); Wed, 24 Mar 2010 04:39:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2O8dg55012257 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Mar 2010 04:39:42 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2O8dfFe022956; Wed, 24 Mar 2010 04:39:41 -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 o2O8ddTh029719; Wed, 24 Mar 2010 04:39:40 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH] KVM test: timedrift: open load sessions before taking initial time Date: Wed, 24 Mar 2010 10:38:38 +0200 Message-Id: <1269419918-16101-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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]); Wed, 24 Mar 2010 08:39:46 +0000 (UTC) diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py index 194f09c..9cb7489 100644 --- a/client/tests/kvm/tests/timedrift.py +++ b/client/tests/kvm/tests/timedrift.py @@ -82,15 +82,8 @@ def run_timedrift(test, params, env): # Set the VM's CPU affinity prev_affinity = set_cpu_affinity(vm.get_pid(), cpu_mask) - # Get time before load - # (ht stands for host time, gt stands for guest time) - (ht0, gt0) = kvm_test_utils.get_time(session, - time_command, - time_filter_re, - time_format) - try: - # Run some load on the guest + # Open shell sessions with the guest logging.info("Starting load on guest...") for i in range(guest_load_instances): load_session = vm.remote_login() @@ -99,6 +92,15 @@ def run_timedrift(test, params, env): load_session.set_output_prefix("(guest load %d) " % i) load_session.set_output_func(logging.debug) guest_load_sessions.append(load_session) + + # Get time before load + # (ht stands for host time, gt stands for guest time) + (ht0, gt0) = kvm_test_utils.get_time(session, + time_command, + time_filter_re, + time_format) + + # Run some load on the guest for load_session in guest_load_sessions: load_session.sendline(guest_load_command)