All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	Denis Lunev <den@virtuozzo.com>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] nbd/server: fix NBD_CMD_CACHE
Date: Thu, 4 Oct 2018 09:29:09 -0500	[thread overview]
Message-ID: <bbf2ffe2-048a-ab0b-9a7d-eff754b783dc@redhat.com> (raw)
In-Reply-To: <20181004130225.GE6009@localhost.localdomain>

On 10/4/18 8:02 AM, Kevin Wolf wrote:
> Am 03.10.2018 um 17:10 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> 03.10.2018 17:57, Eric Blake wrote:
>>> On 10/3/18 9:47 AM, Vladimir Sementsov-Ogievskiy wrote:
>>>> We should not go to structured-read branch on CACHE command, fix that.
>>>>
>>>> Bug intoroduced in bc37b06a5cde24 "nbd/server: introduce NBD_CMD_CACHE"
>>>
>>> s/intoroduced/introduced/
>>>
>>>> with the whole feature and affects 3.0.0 release.
>>>
>>> Ouch. It's because I don't have an NBD client that can issue the
>>> command, so the server side got released without sufficient testing.
>>> Is there some way we could enhance qemu-io as NBD client to issue such
>>> a command?
>>
>> may be, just add qemu-io command, like x-debug-nbd-cmd, which will just
>> send any nbd command? and prints all server replies? Then we'll be able
>> to write any unit tests on nbd-server. It's not the first time the
>> problem arise..
> 
> Shouldn't it be easy to write a simple NBD client in Python and then use
> that for test cases? I don't see why this needs to be in qemu-io, and
> testing illegal requests is certainly easier with a custom client.

Indeed, and we already have tests/qemu-iotests/nbd-fault-injector.py 
which implements a custom server (unfortunately, it has not been updated 
to use newstyle yet!), as a reference for implementing a similar custom 
client.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

      reply	other threads:[~2018-10-04 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 14:47 [Qemu-devel] [PATCH] nbd/server: fix NBD_CMD_CACHE Vladimir Sementsov-Ogievskiy
2018-10-03 14:57 ` Eric Blake
2018-10-03 15:10   ` Vladimir Sementsov-Ogievskiy
2018-10-04 13:02     ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2018-10-04 14:29       ` Eric Blake [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=bbf2ffe2-048a-ab0b-9a7d-eff754b783dc@redhat.com \
    --to=eblake@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.