qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v1 1/7] contrib/vhost-user-blk: add option to simulate di


From: Marc-André Lureau
Subject: Re: [RFC PATCH v1 1/7] contrib/vhost-user-blk: add option to simulate disconnect on init
Date: Fri, 24 Apr 2020 12:17:54 +0200

Hi

On Fri, Apr 24, 2020 at 4:32 AM Raphael Norwitz
<address@hidden> wrote:
>
> I’m not opposed to adding this kind of debugging functionality to the
> vhost-user-blk sample. It could be helpful to easily test these cases
> in the future.
>
> That said, I'm not sure how others will feel about adding these kind
> of debugging capabilities to libvhost-user. Marc-Andre, thoughts?

Maybe we should only enable this code if LIBVHOST_USER_DEBUG is set?

And to make logging silent by default, we shouldn't print them unless
VHOST_USER_DEBUG env is set?

>
> If we go this route I would prefer to add the debugging options to the
> vhost-user-blk sample in a separate patch.
>
> On Thu, Apr 23, 2020 at 09:39:32PM +0300, Dima Stepanov wrote:
> >
> > Add "--simulate-disconnect-stage" option for the testing purposes.
> > This option can be used to test the vhost-user reconnect functionality:
> >   ./vhost-user-blk ... --simulate-disconnect-stage=<CASENUM>
> > In this case the daemon will "crash" in the middle of the VHOST comands
> > communication. Case nums are as follows:
> >   1 - make assert in the handler of the SET_VRING_CALL command
> >   2 - make assert in the handler of the SET_VRING_NUM command
> > Main purpose is to test QEMU reconnect functionality. Such fail
> > injection should not lead to QEMU crash and should be handled
> > successfully.
> > Also update the "GOptionEntry entries" definition with the final NULL
> > item according to API.
> >
> > Signed-off-by: Dima Stepanov <address@hidden>
> > ---
> >  contrib/libvhost-user/libvhost-user.c   | 30 ++++++++++++++++++++++++++++++
> >  contrib/libvhost-user/libvhost-user.h   | 13 +++++++++++++
> >  contrib/vhost-user-blk/vhost-user-blk.c | 14 +++++++++++++-
> >  3 files changed, 56 insertions(+), 1 deletion(-)
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]