On 10/18/2016 06:22 AM, Kevin Wolf wrote:
This tests the different supported methods to create floppy drives and
how they interact.
Signed-off-by: Kevin Wolf <kw...@redhat.com>
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
@@ -0,0 +1,242 @@
+# 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/>.
+echo "QA output created by $seq"
+status=1 # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+# get standard environment, filters and checks
+if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then
+ _notrun "Requires a PC machine"
+ if ! test -t 0; then
+ while read cmd; do
+ echo $cmd
+ echo quit
+ ) | $QEMU -nographic -monitor stdio -serial none "$@"
+ 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:]]
This grep invocation doesn't appear to actually terminate with the '-z'
option here. Not sure why, I haven't looked into the bash framework
much, hopefully it's not too hard for you to reproduce and correct.