iotests: Add non-shared storage migration case 192
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170815130740.31229-5-famz@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
5f7772c4d0
commit
dd7fdaad65
63
tests/qemu-iotests/192
Executable file
63
tests/qemu-iotests/192
Executable file
@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Test NBD export with -incoming (non-shared storage migration use case from
|
||||||
|
# libvirt)
|
||||||
|
#
|
||||||
|
# Copyright (C) 2017 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
# creator
|
||||||
|
owner=famz@redhat.com
|
||||||
|
|
||||||
|
seq=`basename $0`
|
||||||
|
echo "QA output created by $seq"
|
||||||
|
|
||||||
|
here=`pwd`
|
||||||
|
status=1 # failure is the default!
|
||||||
|
|
||||||
|
_cleanup()
|
||||||
|
{
|
||||||
|
_cleanup_test_img
|
||||||
|
}
|
||||||
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
|
# get standard environment, filters and checks
|
||||||
|
. ./common.rc
|
||||||
|
. ./common.filter
|
||||||
|
|
||||||
|
_supported_fmt generic
|
||||||
|
_supported_proto file
|
||||||
|
_supported_os Linux
|
||||||
|
|
||||||
|
if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then
|
||||||
|
_notrun "Requires a PC machine"
|
||||||
|
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
|
||||||
|
|
||||||
|
# success, all done
|
||||||
|
echo "*** done"
|
||||||
|
rm -f $seq.full
|
||||||
|
status=0
|
7
tests/qemu-iotests/192.out
Normal file
7
tests/qemu-iotests/192.out
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
QA output created by 192
|
||||||
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
||||||
|
QEMU X.Y.Z monitor - type 'help' for more information
|
||||||
|
(qemu) nbd_server_start unix:TEST_DIR/nbd
|
||||||
|
(qemu) nbd_server_add -w drive0
|
||||||
|
(qemu) q
|
||||||
|
*** done
|
@ -186,3 +186,4 @@
|
|||||||
188 rw auto quick
|
188 rw auto quick
|
||||||
189 rw auto
|
189 rw auto
|
||||||
190 rw auto quick
|
190 rw auto quick
|
||||||
|
192 rw auto quick
|
||||||
|
Loading…
Reference in New Issue
Block a user