From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org, mreitz@redhat.com, qemu-devel@nongnu.org,
armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives
Date: Wed, 19 Oct 2016 09:37:07 +0200 [thread overview]
Message-ID: <20161019073707.GC5336@noname.redhat.com> (raw)
In-Reply-To: <0f942da9-d245-a590-dd6b-968a644e805b@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
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.
Just to clarify, it's grep that doesn't terminate, or qemu? Also, what
do you mean by the "bash framework"?
> Is 'grep -z' even portable to BSD, or is it just a GNU extension? Would
> it be better to run the output through tr to convert things to a saner
> subset of characters before then grepping a text file?
Is qemu-iotests even supposed to run on BSD? All our test cases specify
"_supported_os Linux". (And I don't think this means Linux kernel with
BSD userland :-))
Anyway, the tr thing you mean would be translating all newlines into
something else (which is hopefully otherwise unused), then grep, then
translate back?
What this line is supposed to do (if it wasn't obvious) is extracting
the full information for a single device from 'info qtree'. I don't
really mind how it's done, but multiline operation seems to be something
that isn't trivial with most tools... I think I've done multiline sed
before, so maybe that would be another option.
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-10-19 7:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 10:22 [Qemu-devel] [PATCH v3 0/4] fdc: Use separate qdev device for drives Kevin Wolf
2016-10-18 10:22 ` [Qemu-devel] [PATCH v3 1/4] fdc: Add a floppy qbus Kevin Wolf
2016-10-18 10:22 ` [Qemu-devel] [PATCH v3 2/4] fdc: Add a floppy drive qdev Kevin Wolf
2016-10-18 10:22 ` [Qemu-devel] [PATCH v3 3/4] fdc: Move qdev properties to FloppyDrive Kevin Wolf
2016-10-18 10:22 ` [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives Kevin Wolf
2016-10-18 19:45 ` John Snow
2016-10-18 19:53 ` Eric Blake
2016-10-19 7:37 ` Kevin Wolf [this message]
2016-10-19 13:47 ` John Snow
2016-10-19 14:15 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161019073707.GC5336@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).