From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad8Lg-0004Qv-Ju for qemu-devel@nongnu.org; Mon, 07 Mar 2016 22:30:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ad8Lf-000850-OW for qemu-devel@nongnu.org; Mon, 07 Mar 2016 22:30:16 -0500 Message-ID: <56DE47AB.80706@cn.fujitsu.com> Date: Tue, 8 Mar 2016 11:31:55 +0800 From: Changlong Xie MIME-Version: 1.0 References: <1454645888-28826-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1454645888-28826-9-git-send-email-xiecl.fnst@cn.fujitsu.com> <20160304175339.GG9130@stefanha-x1.localdomain> In-Reply-To: <20160304175339.GG9130@stefanha-x1.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Fam Zheng , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , qemu devel , "Michael R. Hines" , Max Reitz , Gonglei , Stefan Hajnoczi , Paolo Bonzini , "Dr. David Alan Gilbert" On 03/05/2016 01:53 AM, Stefan Hajnoczi wrote: > On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: >> +static void secondary_do_checkpoint(BDRVReplicationState *s, Error **errp) >> +{ >> + Error *local_err = NULL; >> + int ret; >> + >> + if (!s->secondary_disk->bs->job) { >> + error_setg(errp, "Backup job was cancelled unexpectedly"); >> + return; >> + } > > Do you have test cases for the replication driver? > > This error code path seems like something that should be exercised to > make sure it works. > > Basic start/checkpoint/stop and checks that the active/secondary/hidden > disks contain the expected data are also important. > > Probably the easiest way to do this would be a file called > tests/test-replication.c that calls start/checkpoint/stop and read/write > functions directly instead of running a guest. Will do that in next version. Thanks -Xie >