Commit 8dff69b9 authored by Aarushi Mehta's avatar Aarushi Mehta Committed by Stefan Hajnoczi
Browse files

tests/qemu-iotests: use AIOMODE with various tests



Signed-off-by: default avatarAarushi Mehta <mehta.aaru20@gmail.com>
Acked-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200120141858.587874-16-stefanha@redhat.com
Message-Id: <20200120141858.587874-16-stefanha@redhat.com>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 7156ca48
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ echo block-backup
echo

qemu_comm_method="monitor"
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},aio=${AIOMODE},id=disk
h=$QEMU_HANDLE
if [ "${VALGRIND_QEMU}" == "y" ]; then
    QEMU_COMM_TIMEOUT=7
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ nbd_snapshot_img="nbd:unix:$nbd_unix_socket"
converted_image=$TEST_IMG.converted

# Use -f raw instead of -f $IMGFMT for the NBD connection
QEMU_IO_NBD="$QEMU_IO -f raw --cache=$CACHEMODE"
QEMU_IO_NBD="$QEMU_IO -f raw --cache=$CACHEMODE --aio=$AIOMODE"

echo
echo "== preparing image =="
+2 −2
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ $QEMU_IO -c 'write -P 42 0 512' -c 'write -P 23 512 512' \

$QEMU_IMG convert -f raw -O $IMGFMT "$TEST_IMG.base" "$TEST_IMG"

$QEMU_IO_PROG --cache $CACHEMODE \
$QEMU_IO_PROG --cache $CACHEMODE --aio $AIOMODE \
         -c 'read -P 42 0 512' -c 'read -P 23 512 512' \
         -c 'read -P 66 1024 512' "json:{
    \"driver\": \"$IMGFMT\",
@@ -111,7 +111,7 @@ $QEMU_IO -c 'write -P 42 0x38000 512' "$TEST_IMG" | _filter_qemu_io

# The "image.filename" part tests whether "a": { "b": "c" } and "a.b": "c" do
# the same (which they should).
$QEMU_IO_PROG --cache $CACHEMODE \
$QEMU_IO_PROG --cache $CACHEMODE --aio $AIOMODE  \
     -c 'read -P 42 0x38000 512' "json:{
    \"driver\": \"$IMGFMT\",
    \"file\": {
+2 −2
Original line number Diff line number Diff line
@@ -60,13 +60,13 @@ echo === Starting QEMU VM1 ===
echo

qemu_comm_method="monitor"
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},aio=${AIOMODE},id=disk
h1=$QEMU_HANDLE

echo
echo === Starting QEMU VM2 ===
echo
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk \
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},aio=${AIOMODE},id=disk \
             -incoming "exec: cat '${MIG_FIFO}'"
h2=$QEMU_HANDLE

+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ run_qemu()
    local qmp_format="$3"
    local qmp_event="$4"

    _launch_qemu -drive file="${source_img}",format=raw,cache=${CACHEMODE},id=src
    _launch_qemu -drive file="${source_img}",format=raw,cache=${CACHEMODE},aio=${AIOMODE},id=src
    _send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'qmp_capabilities' }" "return"

    _send_qemu_cmd $QEMU_HANDLE \
Loading