From patchwork Thu Jul 29 03:38:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amos Kong X-Patchwork-Id: 114975 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6T3cDIW009336 for ; Thu, 29 Jul 2010 03:38:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014Ab0G2DiL (ORCPT ); Wed, 28 Jul 2010 23:38:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734Ab0G2DiL (ORCPT ); Wed, 28 Jul 2010 23:38:11 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6T3c9JT028098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Jul 2010 23:38:09 -0400 Received: from [127.0.1.1] (dhcp-91-133.nay.redhat.com [10.66.91.133]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6T3c5rW002977; Wed, 28 Jul 2010 23:38:06 -0400 Subject: [PATCH] KVM Test: time_drift_with_stop: Wait a few seconds after the continue To: lmr@redhat.com From: Amos Kong Cc: autotest@test.kernel.org, kvm@vger.kernel.org Date: Thu, 29 Jul 2010 11:38:05 +0800 Message-ID: <20100729033804.2865.46115.stgit@z> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 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]); Thu, 29 Jul 2010 03:38:43 +0000 (UTC) diff --git a/client/tests/kvm/tests/timedrift_with_stop.py b/client/tests/kvm/tests/timedrift_with_stop.py index fe98571..3473276 100644 --- a/client/tests/kvm/tests/timedrift_with_stop.py +++ b/client/tests/kvm/tests/timedrift_with_stop.py @@ -20,6 +20,7 @@ def run_timedrift_with_stop(test, params, env): @param env: Dictionary with the test environment. """ login_timeout = int(params.get("login_timeout", 360)) + sleep_time = int(params.get("sleep_time", 30)) vm = kvm_test_utils.get_living_vm(env, params.get("main_vm")) session = kvm_test_utils.wait_for_login(vm, timeout=login_timeout) @@ -54,6 +55,10 @@ def run_timedrift_with_stop(test, params, env): time.sleep(stop_time) vm.monitor.cmd("cont") + # Sleep for a while to wait the interrupt to be reinjected + logging.info("Waiting for the interrupt to be reinjected ...") + time.sleep(sleep_time) + # Get time after current iteration (ht1_, gt1_) = kvm_test_utils.get_time(session, time_command, time_filter_re, time_format)