From patchwork Tue Jan 18 23:45:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 487831 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0INk7Da027987 for ; Tue, 18 Jan 2011 23:46:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040Ab1ARXqD (ORCPT ); Tue, 18 Jan 2011 18:46:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39300 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099Ab1ARXqB (ORCPT ); Tue, 18 Jan 2011 18:46:01 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0INk0Pn018278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Jan 2011 18:46:00 -0500 Received: from freedom.redhat.com (vpn-9-4.rdu.redhat.com [10.11.9.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0INjsX5014783; Tue, 18 Jan 2011 18:45:58 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH 2/3] KVM test: Modify enospc test to not require scripts/check_image.py Date: Tue, 18 Jan 2011 21:45:52 -0200 Message-Id: <1295394353-11688-3-git-send-email-lmr@redhat.com> In-Reply-To: <1295394353-11688-1-git-send-email-lmr@redhat.com> References: <1295394353-11688-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 18 Jan 2011 23:46:07 +0000 (UTC) diff --git a/client/tests/kvm/tests/enospc.py b/client/tests/kvm/tests/enospc.py index 2d8b628..4dd694f 100644 --- a/client/tests/kvm/tests/enospc.py +++ b/client/tests/kvm/tests/enospc.py @@ -1,7 +1,7 @@ import logging, commands, time, os, re from autotest_lib.client.common_lib import error from autotest_lib.client.bin import utils -import kvm_test_utils +import kvm_test_utils, kvm_vm def run_enospc(test, params, env): @@ -46,11 +46,11 @@ def run_enospc(test, params, env): if "paused" in status: pause_n += 1 logging.info("Checking all images in use by the VM") - script_path = os.path.join(test.bindir, "scripts/check_image.py") - try: - cmd_result = utils.run('python %s' % script_path) - except error.CmdError, e: - logging.debug(e.result_obj.stdout) + for image_name in vm.params.objects("images"): + image_params = vm.params.object_params(image_name) + # Just to make sure the image check won't throw exceptions + image_params["check_image_critical"] = 'no' + kvm_vm.check_image(image_params, test.bindir) logging.info("Guest paused, extending Logical Volume size") try: cmd_result = utils.run("lvextend -L +200M /dev/vgtest/lvtest")