From patchwork Tue May 2 16:35:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 757748 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wHS6S4BkDz9s4s for ; Wed, 3 May 2017 02:53:36 +1000 (AEST) Received: from localhost ([::1]:60207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5b3O-0001Su-2w for incoming@patchwork.ozlabs.org; Tue, 02 May 2017 12:53:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5anv-0004aq-C8 for qemu-devel@nongnu.org; Tue, 02 May 2017 12:37:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5ans-0000q6-6W for qemu-devel@nongnu.org; Tue, 02 May 2017 12:37:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43034) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5anq-0000n6-1T; Tue, 02 May 2017 12:37:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E647C11C827; Tue, 2 May 2017 16:37:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E647C11C827 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=famz@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E647C11C827 Received: from lemon.redhat.com (ovpn-8-41.pek2.redhat.com [10.72.8.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6A5D173A8; Tue, 2 May 2017 16:37:24 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 3 May 2017 00:35:52 +0800 Message-Id: <20170502163558.7611-18-famz@redhat.com> In-Reply-To: <20170502163558.7611-1-famz@redhat.com> References: <20170502163558.7611-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 02 May 2017 16:37:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v17 17/23] tests: Disable image lock in test-replication X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , famz@redhat.com, qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The COLO block replication architecture requires one disk to be shared between primary and secondary, in the test both processes use posix file protocol (instead of over NBD) so it is affected by image locking. Disable the lock. Signed-off-by: Fam Zheng --- tests/test-replication.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 3016c6f..cebeb79 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -179,7 +179,8 @@ static BlockBackend *start_primary(void) char *cmdline; cmdline = g_strdup_printf("driver=replication,mode=primary,node-name=xxx," - "file.driver=qcow2,file.file.filename=%s" + "file.driver=qcow2,file.file.filename=%s," + "file.file.locking=off" , p_local_disk); opts = qemu_opts_parse_noisily(&qemu_drive_opts, cmdline, false); g_free(cmdline); @@ -310,7 +311,9 @@ static BlockBackend *start_secondary(void) Error *local_err = NULL; /* add s_local_disk and forge S_LOCAL_DISK_ID */ - cmdline = g_strdup_printf("file.filename=%s,driver=qcow2", s_local_disk); + cmdline = g_strdup_printf("file.filename=%s,driver=qcow2," + "file.locking=off", + s_local_disk); opts = qemu_opts_parse_noisily(&qemu_drive_opts, cmdline, false); g_free(cmdline); @@ -331,8 +334,10 @@ static BlockBackend *start_secondary(void) /* add S_(ACTIVE/HIDDEN)_DISK and forge S_ID */ cmdline = g_strdup_printf("driver=replication,mode=secondary,top-id=%s," "file.driver=qcow2,file.file.filename=%s," + "file.file.locking=off," "file.backing.driver=qcow2," "file.backing.file.filename=%s," + "file.backing.file.locking=off," "file.backing.backing=%s" , S_ID, s_active_disk, s_hidden_disk , S_LOCAL_DISK_ID);