From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuBCa-0005cO-W0 for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuBCZ-0006P7-5f for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:41:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuBCY-0006Ow-Tq for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:41:11 -0400 Message-ID: <50108413.6070103@redhat.com> Date: Wed, 25 Jul 2012 17:41:07 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343218884-14980-1-git-send-email-stefanha@linux.vnet.ibm.com> <1343218884-14980-8-git-send-email-stefanha@linux.vnet.ibm.com> <501032EA.8050307@redhat.com> <20120725224510.GB4786@stefanha-thinkpad.localdomain> In-Reply-To: <20120725224510.GB4786@stefanha-thinkpad.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig34B069D0D63EE5F20665CA33" Subject: Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Khoa Huynh , Anthony Liguori , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig34B069D0D63EE5F20665CA33 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/25/2012 04:45 PM, Stefan Hajnoczi wrote: >> Since you are assuming bash (and even if you were to assume POSIX >> /bin/sh)... >> >>> + >>> +seq=3D`basename $0` >> >> I prefer $() over ``. >> >>> +echo "QA output created by $seq" >>> + >>> +here=3D`pwd` >> >> POSIX (and therefore bash) guarantees that $PWD is sane, and faster to= >> access than $(pwd). >> >>> +tmp=3D/tmp/$$ >> >> That's not very secure. It may be worth using bash's $RANDOM, or usin= g >> mkstemp(1). >> >> Beyond that, the series seemed reasonable to me. >=20 > All qemu-iotests scripts do these things in the same way and I'd like > for them to be consistent. Good argument. >=20 > If we make these changes they should be applied to all qemu-iotests > scripts. I agree with your points but also think the value in making > the change now is small. Indeed - what you have is technically correct, even if not the most efficient. Any such cleanups should, as you say, be a separate patch globally applied to the qemu-iotests, and not this test in isolation. >=20 > Do you want to send a patch that fixes these issues in qemu-iotests? Up to you; or read another way, it bothered me enough to comment, but not enough to write the patch myself, so I'm fine living with status quo if it doesn't bother anyone else either. Old-school techniques aren't wrong, per se, just inefficient; and while the insecure temp file name could be exploited, people running the testsuite tend to be on personal platforms rather than enterprise systems, and the cost of exploiting a testsuite is not as severe as the cost of exploiting an installed script.= --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig34B069D0D63EE5F20665CA33 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQEIQTAAoJEKeha0olJ0Nq+JkIAKom8VetVFUz2Wu+jCM2imYn emHqtAui8BYsnCRLYv+3hi2fAjfn/jwLniUwzugJTQdOvfzmKdDFGtrNOFnDd7yf kEO9uB4z//ZhmkTd9pUw59sseRxboZRJGjgqZcRBhqIQwdPO/heplq8zT19eDzp7 7Eeh9o3WUueLLYO05a5fO+ZFAurCiKDFJZGqYQFBXLsfZLqXLTf8UABCg3kmRMic 6wp7VDOnnQ4Sfe9QAVcmKPbNbrWzmN3Z6FfVvD3w33m+mUMWzyHfGTy/tXAZU1Mr sI4tVksoFh2WGoyjmcwnsw8k6KG5EX8n2s22Fxcwh6CKfjaBJxmS0vvSnSuEuHU= =Tqqr -----END PGP SIGNATURE----- --------------enig34B069D0D63EE5F20665CA33--