From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcFsT-0000Lm-Pe for qemu-devel@nongnu.org; Wed, 16 Sep 2015 12:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcFsP-0002O0-Oq for qemu-devel@nongnu.org; Wed, 16 Sep 2015 12:48:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcFsP-0002Ns-J3 for qemu-devel@nongnu.org; Wed, 16 Sep 2015 12:48:09 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B755532C43F for ; Wed, 16 Sep 2015 16:48:08 +0000 (UTC) References: <20150915060349.GK14016@ad.nay.redhat.com> <55F82C6C.3080508@redhat.com> From: Max Reitz Message-ID: <55F99D43.8060300@redhat.com> Date: Wed, 16 Sep 2015 18:48:03 +0200 MIME-Version: 1.0 In-Reply-To: <55F82C6C.3080508@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5DII5whROS8cVs2b0q7RKkx9cbMv1v2HQ" Subject: Re: [Qemu-devel] iotests failure of 128 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Fam Zheng , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5DII5whROS8cVs2b0q7RKkx9cbMv1v2HQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 15.09.2015 16:34, Eric Blake wrote: > On 09/15/2015 12:03 AM, Fam Zheng wrote: >> Since commit 934659c460d46c948cf348822fda1d38556ed9a4 (iotests: Do not= suppress >> segfaults in bash tests), sudo in 128 complains about unknown command >> "_qemu_io_wrapper", but I don't know how to fix that. Any idea? >=20 > Ugg. That's because _qemu_io_wrapper is a shell function, but sudo can'= t > directly invoke shell functions. >=20 > It passes on systems where $sudo expands to '' because the test is bein= g > run as root. >=20 > I think that test will have to be rewritten to use raw invocation > (untested): >=20 > $sudo "$QEMU_IO_PROG" $QEMU_IO_OPTIONS --format "$IMGFMT" --nocache -c > "read 0 65536" "$TEST_IMG" > out 2> err >=20 > and then manually feed "out" through _filter_qemu_io and replay "err" > (since you can no longer take advantage of the '(subshell)|pipeline' > trick added by 934659c to force bash to display core dumps). It's ugly, but maybe QEMU_IO_OPTIONS=3D"-n \"$QEMU_IO_PROG\" $QEMU_IO_OPTIONS" \ QEMU_IO_PROG=3Dsudo \ _qemu_io_wrapper --format "$IMGFMT" ... would do the trick. But it's probably too ugly. So maybe the best solution would be to copy the wrapper function to 128, but with it using $sudo there. Max --5DII5whROS8cVs2b0q7RKkx9cbMv1v2HQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV+Z1DAAoJEDuxQgLoOKytFD4H+wVFPi26VthnuW8rKdVyNk7y QJdVQWKF/guhSJelOVqUcMUsSOOZUEywkCFcdr+YjpmcQTcWPxGfLwNX5JHB+69Q WBOWBkB/N9HJ7fIoKIrZaB0xhRAkqUFqxN3LsrdbqzA3NknO+agxhPmu3+/Qj1ST VnHh2C2nXk0RQBhizDyAG9cs+FmloWFsFElg9tAXgrT0IHlE+kTw/WJe5Sahk8lQ U00dRTigWw7nhV8PSBzRMuLueX68Q5YW9aXT9UP9vuoGjJmW5QLkRythG8wqY/dE 2BBjeCApE7SACF4/iLKth1Z/cTHIrIu82WECwT7W9RZFb5GPoRMVUYpYZVH2ov8= =aQO4 -----END PGP SIGNATURE----- --5DII5whROS8cVs2b0q7RKkx9cbMv1v2HQ--