[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drive
Re: [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives
Tue, 18 Oct 2016 15:45:39 -0400
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
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 <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
@@ -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.