[Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

Frediano Ziglio fziglio at redhat.com
Wed Feb 1 11:00:21 UTC 2017


> 
> On Tue, Jan 31, 2017 at 12:25:00PM -0500, Frediano Ziglio wrote:
> > > 
> > > On Tue, Jan 31, 2017 at 05:04:46PM +0000, Frediano Ziglio wrote:
> > > > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194
> > > 
> > > Maybe it does reproduce it, maybe not...
> > > 
> > > If you want a similar backtrace, this is enough:
> > > 
> > > int main(void)
> > > {
> > >     SpiceCoreInterface *core = basic_event_loop_init();
> > >     Test *test = test_new(core);
> > > 
> > >     vmc_instances[0].base.sif = &vmc_interface.base;
> > >     spice_server_add_interface(test->server, &vmc_instances[0].base);
> > > 
> > >     spice_server_remove_interface(&vmc_instances[0].base);
> > >     spice_server_remove_interface(&vmc_instances[0].base);
> > > 
> > >     return 0;
> > > }
> > > 
> > > Christophe
> > > 
> > 
> > But this code surely don't reproduce the bug.
> 
> This crashes with a backtrace similar to the one in the bug if that's
> what you mean by "don't reproduce the bug".
> 

Code above reproduce the stack trace but there is not apparent
Qemu patch that leaves to a double interface removal.

> > And we don't know if the old reproduce the bug as the information
> > provided in the bug are not enough so we can't technically reproduce
> > the bug unless somebody provide more information.
> 
> Yes, that was my point.
> 
> > 
> > Maybe a more reasonable:
> > 
> > "This attempts to reproduce
> > https://bugzilla.redhat.com/show_bug.cgi?id=1411194
> > and some other issues adding/removing vdagent device.
> > The exact reproduction of the above bug is impossible as the information
> > provided are not enough."
> 
> Yep, for example. Thinking of it, I'd also add double removal of an
> interface.
> 
> Christophe
> 

I think one of the issue here is the behaviour of "st" field in the
various instances. I think some description should be required.

I could try with (I suppose should go into spice-core.h with
possibly references)

/* The "st" field in the various instance structures is supposed
 * to be handled as opaque field and not touched by the user
 * beside initialization.
 * At initialization should set to NULL.
 */

Also I would state in spice-server.h

/* All functions returning int, if not differently documented,
 * are returning 0 on success or a value <0 for failure.
 */


Yes, a double remove attempt can be tested.

As this test would then test interface adding/remove why not
calling test-interface (removing the vdagent) ?

Frediano


More information about the Spice-devel mailing list