Skip to content

Commit

Permalink
iotests: rewrite 192 to use _launch_qemu to fix LUKS support
Browse files Browse the repository at this point in the history
The LUKS driver requires extra args to QEMU to setup passwords.
The _launch_qemu function takes care of this, so convert the
test to use this function and use correct -drive syntax

Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Tested-by: Fam Zheng <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
  • Loading branch information
berrange authored and ebblake committed Sep 5, 2017
1 parent b07d1c2 commit 0127b79
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions tests/qemu-iotests/192
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.qemu

_supported_fmt generic
_supported_proto file
Expand All @@ -49,13 +50,21 @@ fi
size=64M
_make_test_img $size

{
echo "nbd_server_start unix:$TEST_DIR/nbd"
echo "nbd_server_add -w drive0"
echo "q"
} | $QEMU -nodefaults -display none -monitor stdio \
-drive format=$IMGFMT,file=$TEST_IMG,if=ide,id=drive0 \
-incoming defer 2>&1 | _filter_testdir | _filter_qemu | _filter_hmp
if test "$IMGOPTSSYNTAX" = "true"
then
DRIVE_ARG=if=ide,id=drive0,$TEST_IMG
else
DRIVE_ARG=if=ide,id=drive0,format=$IMGFMT,file=$TEST_IMG
fi

qemu_comm_method="monitor"
_launch_qemu -drive $DRIVE_ARG -incoming defer
h=$QEMU_HANDLE
QEMU_COMM_TIMEOUT=1

_send_qemu_cmd $h "nbd_server_start unix:$TEST_DIR/nbd" "(qemu)"
_send_qemu_cmd $h "nbd_server_add -w drive0" "(qemu)"
_send_qemu_cmd $h "q" "(qemu)"

# success, all done
echo "*** done"
Expand Down

0 comments on commit 0127b79

Please sign in to comment.