From patchwork Wed Nov 20 07:44:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 292671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3FF1D2C00C3 for ; Wed, 20 Nov 2013 18:45:21 +1100 (EST) Received: from localhost ([::1]:53229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj2TO-0005C2-Ih for incoming@patchwork.ozlabs.org; Wed, 20 Nov 2013 02:45:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj2Sk-0005BY-8Y for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vj2Se-0006gN-TX for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj2Se-0006gE-Kt for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:32 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAK7iUb6018901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Nov 2013 02:44:30 -0500 Received: from ad.nay.redhat.com ([10.66.6.190]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAK7iJV4015563; Wed, 20 Nov 2013 02:44:27 -0500 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 20 Nov 2013 15:44:13 +0800 Message-Id: <1384933457-26953-3-git-send-email-famz@redhat.com> In-Reply-To: <1384933457-26953-1-git-send-email-famz@redhat.com> References: <1384933457-26953-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, WenchaoXia , stefanha@redhat.com Subject: [Qemu-devel] [PATCH v3 2/6] qemu-iotests: Honour cache mode in iotests.py X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will allow overriding cache mode from the "-c mode" option. Signed-off-by: Fam Zheng --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index fb10ff4..c84a1a5 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -37,6 +37,7 @@ qemu_args = os.environ.get('QEMU', 'qemu').strip().split(' ') imgfmt = os.environ.get('IMGFMT', 'raw') imgproto = os.environ.get('IMGPROTO', 'file') test_dir = os.environ.get('TEST_DIR', '/var/tmp') +cachemode = os.environ.get('CACHEMODE') socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper') @@ -96,7 +97,7 @@ class VM(object): '''Add a virtio-blk drive to the VM''' options = ['if=virtio', 'format=%s' % imgfmt, - 'cache=none', + 'cache=%s' % cachemode, 'file=%s' % path, 'id=drive%d' % self._num_drives] if opts: