From: Kevin Wolf <kwolf@redhat.com>
To: Nicholas Thomas <nick@bytemark.co.uk>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tests: allow qemu-iotests to be run against nbd backend
Date: Fri, 02 Nov 2012 10:10:48 +0100 [thread overview]
Message-ID: <50938E18.5000106@redhat.com> (raw)
In-Reply-To: <1351769408.16343.335.camel@eboracum.office.bytemark.co.uk>
Am 01.11.2012 12:30, schrieb Nicholas Thomas:
> On Wed, 2012-10-31 at 17:44 +0100, Kevin Wolf wrote:
>> Am 31.10.2012 15:33, schrieb Paolo Bonzini:
>>> Il 31/10/2012 15:01, nick@bytemark.co.uk ha scritto:
>>>> From: Nick Thomas <nick@bytemark.co.uk>
>>>>
>>>> To do this, we start a qemu-nbd process at _make_test_img and kill
>>>> it in _cleanup_test_img. $TEST_IMG is changed to point at the TCP
>>>> server.
>>>>
>>>> Signed-off-by: Nick Thomas <nick@bytemark.co.uk>
>>>> ---
>>>> tests/qemu-iotests/common | 7 +++++--
>>>> tests/qemu-iotests/common.config | 8 +++++++-
>>>> tests/qemu-iotests/common.rc | 23 ++++++++++++++++++++++-
>>>> 3 files changed, 34 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
>>>> index 1f6fdf5..09dfdf1 100644
>>>> --- a/tests/qemu-iotests/common
>>>> +++ b/tests/qemu-iotests/common
>>>> @@ -136,6 +136,7 @@ check options
>>>> -vmdk test vmdk
>>>> -rbd test rbd
>>>> -sheepdog test sheepdog
>>>> + -nbd test nbd
>>>> -xdiff graphical mode diff
>>>> -nocache use O_DIRECT on backing file
>>>> -misalign misalign memory allocations
>>>> @@ -197,12 +198,14 @@ testlist options
>>>> IMGPROTO=rbd
>>>> xpand=false
>>>> ;;
>>>> -
>>>> -sheepdog)
>>>> IMGPROTO=sheepdog
>>>> xpand=false
>>>> ;;
>>>> -
>>>> + -nbd)
>>>> + IMGPROTO=nbd
>>>> + xpand=false
>>>> + ;;
>>>> -nocache)
>>>> QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS --nocache"
>>>> xpand=false
>>>> diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
>>>> index df082e7..5383e4d 100644
>>>> --- a/tests/qemu-iotests/common.config
>>>> +++ b/tests/qemu-iotests/common.config
>>>> @@ -102,9 +102,15 @@ if [ -z "$QEMU_IO_PROG" ]; then
>>>> fi
>>>> [ "$QEMU_IO_PROG" = "" ] && _fatal "qemu-io not found"
>>>>
>>>> +if [ -z "$QEMU_NBD_PROG" ]; then
>>>> + export QEMU_NBD_PROG="`set_prog_path qemu-nbd`"
>>>> +fi
>>>> +[ "$QEMU_IO_PROG" = "" ] && _fatal "qemu-io not found"
>>
>> I think you intended to check $QEMU_NBD_PROG.
>
> Good catch, thanks.
>
>> It would be nice to require it only if we're really using NBD, is this
>> already known at this place?
>
> $IMGPROTO is how we'd discriminate, and that's set in
> qemu-iotests/common, which is sourced after qemu-iotests/common.config,
> at least by qemu-iotests/check.
>
> There's actually a similar set of tests in common (where we *do* have
> $IMGPROTO), so maybe the ones in common.config are unnecessary, and can
> be removed?
Hm, yes, I think so.
And when you touch common to add a qemu-nbd check, you can fix the
message for qemu-io, too:
[ "$QEMU_IO" = "" ] && _fatal "qemu-img not found"
Kevin
prev parent reply other threads:[~2012-11-02 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 14:01 [Qemu-devel] [PATCH] tests: allow qemu-iotests to be run against nbd backend nick
2012-10-31 14:33 ` Paolo Bonzini
2012-10-31 16:44 ` Kevin Wolf
2012-11-01 11:30 ` Nicholas Thomas
2012-11-02 9:10 ` Kevin Wolf [this message]
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=50938E18.5000106@redhat.com \
--to=kwolf@redhat.com \
--cc=nick@bytemark.co.uk \
--cc=pbonzini@redhat.com \
--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).