This tests the different supported methods to create floppy drives and
how they interact.
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/172 | 242 +++++++++
tests/qemu-iotests/172.out | 1205 ++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/group | 1 +
3 files changed, 1448 insertions(+)
create mode 100755 tests/qemu-iotests/172
create mode 100644 tests/qemu-iotests/172.out
diff --git a/tests/qemu-iotests/172 b/tests/qemu-iotests/172
new file mode 100755
index 0000000..8bb6443
--- /dev/null
+++ b/tests/qemu-iotests/172
@@ -0,0 +1,242 @@
+#!/bin/bash
+#
+# Test floppy configuration
+#
+# Copyright (C) 2016 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
address@hidden
+
+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 qcow2
+_supported_proto file
+_supported_os Linux
+
+if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then
+ _notrun "Requires a PC machine"
+fi
+
+function do_run_qemu()
+{
+ (
+ if ! test -t 0; then
+ while read cmd; do
+ echo $cmd
+ done
+ fi
+ echo quit
+ ) | $QEMU -nographic -monitor stdio -serial none "$@"
+ echo
+}
+
+function check_floppy_qtree()
+{
+ echo
+ echo Testing: "$@" | _filter_testdir
+
+ # QEMU_OPTIONS contains -nodefaults, we don't want that here because the
+ # defaults are part of what should be checked here
+ echo "info qtree" |
+ QEMU_OPTIONS="" do_run_qemu "$@" | _filter_win32 |
+ grep -zo '[[:cntrl:]]\( *\)dev: isa-fdc.*\([[:cntrl:]]\1 .*\)*[[:cntrl:]]
*dev:'