* [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required
@ 2015-05-19 10:46 Fam Zheng
2015-05-19 15:57 ` Stefan Hajnoczi
2015-05-26 11:59 ` Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2015-05-19 10:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, stefanha, qemu-block
If passwordless "sudo" works, use it in the qemu-io cmd.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/128 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128
index 249a865..e2a0f2f 100755
--- a/tests/qemu-iotests/128
+++ b/tests/qemu-iotests/128
@@ -29,6 +29,7 @@ tmp=/tmp/$$
status=1 # failure is the default!
devname="eiodev$$"
+sudo=""
_setup_eiodev()
{
@@ -37,6 +38,7 @@ _setup_eiodev()
echo "0 $((1024 * 1024 * 1024 / 512)) error" | \
$cmd dmsetup create "$devname" 2>/dev/null
if [ "$?" -eq 0 ]; then
+ sudo="$cmd"
return
fi
done
@@ -74,7 +76,7 @@ TEST_IMG="/dev/mapper/$devname"
echo
echo "== reading from error device =="
# Opening image should succeed but the read operation should fail
-$QEMU_IO --format "$IMGFMT" --nocache -c "read 0 65536" "$TEST_IMG" | _filter_qemu_io
+$sudo $QEMU_IO --format "$IMGFMT" --nocache -c "read 0 65536" "$TEST_IMG" | _filter_qemu_io
# success, all done
echo "*** done"
--
2.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required
2015-05-19 10:46 [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required Fam Zheng
@ 2015-05-19 15:57 ` Stefan Hajnoczi
2015-05-26 11:59 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2015-05-19 15:57 UTC (permalink / raw)
To: Fam Zheng; +Cc: Kevin Wolf, qemu-devel, qemu-block
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
On Tue, May 19, 2015 at 10:46:13AM +0000, Fam Zheng wrote:
> If passwordless "sudo" works, use it in the qemu-io cmd.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/qemu-iotests/128 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Oops, I'm in the group 'disk' on my workstation so I never noticed that
the user running the test may not have permission to access the block
device.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required
2015-05-19 10:46 [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required Fam Zheng
2015-05-19 15:57 ` Stefan Hajnoczi
@ 2015-05-26 11:59 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2015-05-26 11:59 UTC (permalink / raw)
To: Fam Zheng; +Cc: stefanha, qemu-devel, qemu-block
Am 19.05.2015 um 12:46 hat Fam Zheng geschrieben:
> If passwordless "sudo" works, use it in the qemu-io cmd.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-26 11:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 10:46 [Qemu-devel] [PATCH] qemu-iotests: Fix 128 if sudo required Fam Zheng
2015-05-19 15:57 ` Stefan Hajnoczi
2015-05-26 11:59 ` Kevin Wolf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.