qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] iotests failure of 128
@ 2015-09-15  6:03 Fam Zheng
  2015-09-15 14:34 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Fam Zheng @ 2015-09-15  6:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha, mreitz

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?

128         - output mismatch (see 128.out.bad)
--- /home/fam/qemu/tests/qemu-iotests/128.out   2015-09-15 11:08:07.407819420 +0800
+++ 128.out.bad 2015-09-15 13:58:56.547396610 +0800
@@ -1,5 +1,5 @@
 QA output created by 128
 
 == reading from error device ==
-read failed: Input/output error
+sudo: _qemu_io_wrapper: command not found
 *** done
Failures: 128
Failed 1 of 1 tests

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] iotests failure of 128
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2015-09-15 14:34 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: kwolf, stefanha, mreitz

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

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).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] iotests failure of 128
  2015-09-15 14:34 ` Eric Blake
@ 2015-09-16 16:48   ` Max Reitz
  0 siblings, 0 replies; 3+ messages in thread
From: Max Reitz @ 2015-09-16 16:48 UTC (permalink / raw)
  To: Eric Blake, Fam Zheng, qemu-devel; +Cc: kwolf, stefanha

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-16 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).