From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo2ZW-0000ro-GY for qemu-devel@nongnu.org; Tue, 03 Dec 2013 21:52:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vo2ZN-0004zD-Cc for qemu-devel@nongnu.org; Tue, 03 Dec 2013 21:52:18 -0500 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:37722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo2ZM-0004z4-Q1 for qemu-devel@nongnu.org; Tue, 03 Dec 2013 21:52:09 -0500 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Dec 2013 08:22:06 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 490521258053 for ; Wed, 4 Dec 2013 08:23:08 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rB42q0g558130464 for ; Wed, 4 Dec 2013 08:22:00 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rB42q3ks021715 for ; Wed, 4 Dec 2013 08:22:04 +0530 Message-ID: <529E98D3.7070002@linux.vnet.ibm.com> Date: Wed, 04 Dec 2013 10:52:03 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1385094432-1655-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1385094432-1655-4-git-send-email-xiawenc@linux.vnet.ibm.com> <20131203134523.GC24604@stefanha-thinkpad.muc.redhat.com> In-Reply-To: <20131203134523.GC24604@stefanha-thinkpad.muc.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V6 3/6] qemu-iotests: add 058 internal snapshot export with qemu-nbd case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 于 2013/12/3 21:45, Stefan Hajnoczi 写道: > On Fri, Nov 22, 2013 at 12:27:09PM +0800, Wenchao Xia wrote: >> +nbd_snapshot_port=10850 >> +nbd_snapshot_img="nbd:127.0.0.1:$nbd_snapshot_port" >> + >> +_export_nbd_snapshot() >> +{ >> + $QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port "$TEST_IMG" -l $1 & > > Please use a UNIX domain socket so that multiple qemu-iotests instances > can run on the same host in parallel. The socket should be in the > scratch directory just like the temporary image files. > >> + NBD_SNAPSHOT_PID=$! >> + sleep 1 > > qemu-nbd might not start within 1 second on a heavily loaded host. > > To make this test case reliable please use a loop (e.g. wait for UNIX > domain socket to appear for up to 30 seconds). > > If you feel qemu-nbd doesn't offer a good interface for reliable > startup, feel free to extend it. Test cases must be reliable and > ideally shouldn't waste time sleeping. > I will improve this case.