From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1KJ-00025l-B8 for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VR1KD-0006XY-QO for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:53:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1KD-0006XN-Hs for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:53:21 -0400 Message-ID: <524AE1DD.7070606@redhat.com> Date: Tue, 01 Oct 2013 08:53:17 -0600 From: Eric Blake MIME-Version: 1.0 References: <1380154568-5339-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1380154568-5339-5-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1380154568-5339-5-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VgLn3bPohvawSIs53NIOoD7IxFQki6reE" Subject: Re: [Qemu-devel] [PATCH V3 4/7] qemu-iotests: add 058 internal snapshot export with qemu-nbd case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VgLn3bPohvawSIs53NIOoD7IxFQki6reE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/25/2013 06:16 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > +_export_nbd_snapshot() > +{ > + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG= -l $1 &" Uggh. Why do you need an eval here? Especially given that there was recently a patch to properly quote $TEST_IMG in case the tests are run inside a directory whose absolute name included a space. What's wrong with just directly: $QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port "$TEST_IMG" -l $1 $ > + NBD_SNAPSHOT_PID=3D$! > + sleep 1 > +} > + > +_export_nbd_snapshot1() > +{ > + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG= -L snapshot.name=3D$1 &" Likewise; and given my complaint on 2-3/7, it would be nicer to support this with only one option name spelling. > +_cleanup() > +{ > + if [ -n "$NBD_SNAPSHOT_PID" ]; then > + kill $NBD_SNAPSHOT_PID > + fi > + _cleanup_test_img Kill the TAB, fix the indentation. > +} > +trap "_cleanup; exit \$status" 0 1 2 3 15 > + > +# get standard environment, filters and checks > +. ./common.rc > +. ./common.filter > +. ./common.pattern > + > +# Any format supporting intenal snapshots s/intenal/internal/ > +_supported_fmt qcow2 > +_supported_proto generic > +_supported_os Linux Is this test truly Linux-only? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VgLn3bPohvawSIs53NIOoD7IxFQki6reE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSSuHdAAoJEKeha0olJ0NqbO4H/05OiDnrKcwybWJIPJx+5ViT Whf+ca8O5eZSEh54TfHFOMYKPrX7BxyVu2Wsap3vRU7B6qkaOCHVOoG02vG7yFfg 4jZAoly1TnyMrPsOxn5IcMG0lHoYAAVMPVmgiBe5xXTgsXF1qfU5JWAbMKzxyXsh rqyAwTvEOw06zzvKSsPaHUt3F+iAuaW8r7KaKMFKH+ZMMvTrglIbNUU3uh053Ghh JLo4LVzFr8lBFP+shz4K4o48N6Yfu8JjoJBHdHhHw6TbedY8zP2YjBdzphYZFWUa eLVw70f/VsH3mDuDozxjrm1jlGVrsyW+OrqLXlRkU7ykTKZga93lQ8HviQiOqw4= =w7Ol -----END PGP SIGNATURE----- --VgLn3bPohvawSIs53NIOoD7IxFQki6reE--