From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwreF-0004CW-2S for qemu-devel@nongnu.org; Wed, 19 Oct 2016 10:15:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwre9-0002td-BL for qemu-devel@nongnu.org; Wed, 19 Oct 2016 10:15:15 -0400 Date: Wed, 19 Oct 2016 16:15:00 +0200 From: Kevin Wolf Message-ID: <20161019141500.GF5336@noname.redhat.com> References: <1476786145-19162-1-git-send-email-kwolf@redhat.com> <1476786145-19162-5-git-send-email-kwolf@redhat.com> <64e87e2e-951c-4b5f-248c-bcfb495f2cca@redhat.com> <0f942da9-d245-a590-dd6b-968a644e805b@redhat.com> <20161019073707.GC5336@noname.redhat.com> <860e4d4a-f295-b3ba-a599-edb93cc79897@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <860e4d4a-f295-b3ba-a599-edb93cc79897@redhat.com> 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: John Snow Cc: Eric Blake , qemu-block@nongnu.org, mreitz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com Am 19.10.2016 um 15:47 hat John Snow geschrieben: > > > On 10/19/2016 03:37 AM, Kevin Wolf wrote: > >Am 18.10.2016 um 21:53 hat Eric Blake geschrieben: > >>On 10/18/2016 02:45 PM, John Snow wrote: > >>> > >>> > >>>On 10/18/2016 06:22 AM, Kevin Wolf wrote: > >>>>This tests the different supported methods to create floppy drives and > >>>>how they interact. > >>>> > >> > >>>>+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. > > > >No, obviously I can't reproduce, otherwise I wouldn't have written the > >test case like this. It passes just fine for me on RHEL 7. > > > > Wasn't sure if it was something that popped up more recently or not. > Obviously it worked at some point. > > I'm on Fedora 24, using bash 4.3.42-7.fc24 and grep 2.25-1.fc24. > > >Just to clarify, it's grep that doesn't terminate, or qemu? Also, what > >do you mean by the "bash framework"? > > > > It seems like it's the grep invocation; I don't see any QEMU > processes in `ps`, the only thing I can find is the grep invocation. > (Why would grep hang if qemu has exited?) I haven't seen it myself, but from your description this sounds more like a grep bug to me, honestly. > By the 'bash framework' I meant the shell related infrastructure for > iotests. I'm more familiar with the python parts. If you mean the functions for spwaning a qemu instance in the background and then controlling it from the script, this isn't even using it. I'm just piping some static data into a monitor on stdio and waiting for the qemu process to exit. Essentially just something like this: echo -e "info qtree\nquit" | qemu-system-x86_64 -monitor stdio | grep ... Kevin