X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Ftests%2Fqemu-iotests%2F128;h=0976a18133f4887d77d1900053eb3eccbb622b7c;hb=437fd90c0250dee670290f9b714253671a990160;hp=e2a0f2f8904b9420e1c5942a594231e5e7859dc8;hpb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;p=kvmfornfv.git diff --git a/qemu/tests/qemu-iotests/128 b/qemu/tests/qemu-iotests/128 index e2a0f2f89..0976a1813 100755 --- a/qemu/tests/qemu-iotests/128 +++ b/qemu/tests/qemu-iotests/128 @@ -25,12 +25,16 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ status=1 # failure is the default! devname="eiodev$$" sudo="" +_sudo_qemu_io_wrapper() +{ + (exec $sudo "$QEMU_IO_PROG" $QEMU_IO_OPTIONS "$@") +} + _setup_eiodev() { # This test should either be run as root or with passwordless sudo @@ -76,7 +80,9 @@ TEST_IMG="/dev/mapper/$devname" echo echo "== reading from error device ==" # Opening image should succeed but the read operation should fail -$sudo $QEMU_IO --format "$IMGFMT" --nocache -c "read 0 65536" "$TEST_IMG" | _filter_qemu_io +_sudo_qemu_io_wrapper --format "$IMGFMT" --nocache \ + -c "read 0 65536" "$TEST_IMG" \ + | _filter_qemu_io # success, all done echo "*** done"