summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/128
diff options
context:
space:
mode:
authorYonghee Han <onstudy@samsung.com>2016-07-27 16:42:54 +0900
committerYonghee Han <onstudy@samsung.com>2016-07-27 00:56:08 -0700
commita03c4728275d119af5f66c4a69e8d9d5a1730031 (patch)
tree2b4ed9542884bf8b947076c55c4ef1814217cb69 /tests/qemu-iotests/128
parent3158f4a51894e46ecb593bffbfd12824e1d6534a (diff)
downloadqemu-a03c4728275d119af5f66c4a69e8d9d5a1730031.tar.gz
qemu-a03c4728275d119af5f66c4a69e8d9d5a1730031.tar.bz2
qemu-a03c4728275d119af5f66c4a69e8d9d5a1730031.zip
Imported Upstream version 2.5.1.1upstream/2.5.1.1
Change-Id: Ie290b0e68882590d8a64fab165a943940b7c98ed
Diffstat (limited to 'tests/qemu-iotests/128')
-rwxr-xr-xtests/qemu-iotests/1289
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128
index e2a0f2f89..3d8107d2a 100755
--- a/tests/qemu-iotests/128
+++ b/tests/qemu-iotests/128
@@ -31,6 +31,11 @@ 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 +81,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"