Received: from eggs.gnu.org ([2001:4830:134:3::10]:51657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwaKd-0002xw-9W for qemu-devel@nongnu.org; Tue, 18 Oct 2016 15:45:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwaKb-0007C2-V9 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 15:45:50 -0400 References: <1476786145-19162-1-git-send-email-kwolf@redhat.com> <1476786145-19162-5-git-send-email-kwolf@redhat.com> From: John Snow Message-ID: <64e87e2e-951c-4b5f-248c-bcfb495f2cca@redhat.com> Date: Tue, 18 Oct 2016 15:45:39 -0400 MIME-Version: 1.0 In-Reply-To: <1476786145-19162-5-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, mreitz@redhat.com 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 > --- > 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 . > +# > + > +# creator > +owner=kwolf@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 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:' 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. ...Sorry! --js