From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] iotests failure of 128
Date: Wed, 16 Sep 2015 18:48:03 +0200 [thread overview]
Message-ID: <55F99D43.8060300@redhat.com> (raw)
In-Reply-To: <55F82C6C.3080508@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
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?
>
> Ugg. That's because _qemu_io_wrapper is a shell function, but sudo can't
> directly invoke shell functions.
>
> It passes on systems where $sudo expands to '' because the test is being
> run as root.
>
> I think that test will have to be rewritten to use raw invocation
> (untested):
>
> $sudo "$QEMU_IO_PROG" $QEMU_IO_OPTIONS --format "$IMGFMT" --nocache -c
> "read 0 65536" "$TEST_IMG" > out 2> err
>
> 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="-n \"$QEMU_IO_PROG\" $QEMU_IO_OPTIONS" \
QEMU_IO_PROG=sudo \
_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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-09-16 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 6:03 [Qemu-devel] iotests failure of 128 Fam Zheng
2015-09-15 14:34 ` Eric Blake
2015-09-16 16:48 ` Max Reitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F99D43.8060300@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).