From patchwork Wed Aug 5 12:32:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 39357 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 n75CRTOw023421 for ; Wed, 5 Aug 2009 12:27:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933662AbZHEM10 (ORCPT ); Wed, 5 Aug 2009 08:27:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933610AbZHEM10 (ORCPT ); Wed, 5 Aug 2009 08:27:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50676 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933520AbZHEM10 (ORCPT ); Wed, 5 Aug 2009 08:27:26 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n75CRQXM028056; Wed, 5 Aug 2009 08:27:26 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n75CRPnm030258; Wed, 5 Aug 2009 08:27:26 -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 n75CRKWX012455; Wed, 5 Aug 2009 08:27:23 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 2/2] KVM test: timedrift test: close shell session before failing the test Date: Wed, 5 Aug 2009 15:32:05 +0300 Message-Id: <85f1057877cb0af31e96654b04235da7911dc997.1249475102.git.mgoldish@redhat.com> In-Reply-To: <869aae2abe70587a0fe36dacfbb7d50b74f3b1c7.1249475102.git.mgoldish@redhat.com> References: <869aae2abe70587a0fe36dacfbb7d50b74f3b1c7.1249475102.git.mgoldish@redhat.com> In-Reply-To: <869aae2abe70587a0fe36dacfbb7d50b74f3b1c7.1249475102.git.mgoldish@redhat.com> References: <869aae2abe70587a0fe36dacfbb7d50b74f3b1c7.1249475102.git.mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Currently the shell session is sometimes not closed because the error.TestFail exception is raised before the session has a chance to close. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_tests.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 67cf713..d146929 100644 --- a/client/tests/kvm/kvm_tests.py +++ b/client/tests/kvm/kvm_tests.py @@ -757,11 +757,11 @@ def run_timedrift(test, params, env): logging.info("Total guest duration including rest: %.2f" % guest_delta_total) logging.info("Total drift after rest: %.2f%%" % drift_total) + session.close() + # Fail the test if necessary if drift > drift_threshold: raise error.TestFail("Time drift too large: %.2f%%" % drift) if drift > drift_threshold_after_rest: raise error.TestFail("Time drift too large after rest period: %.2f%%" % drift_total) - - session.close()