On Wed, Mar 23, 2016 at 04:35:58PM +0100, Michal Privoznik wrote: > After 9c17d665fdc5 the tap device for ethernet network type is > automatically precreated before spawning qemu. Problem is, the > qemuxml2argvtest wasn't updated and thus is failing. Because of > all the APIs that new code is calling, I had to mock a lot. Also, > since the tap FDs are labeled separately from the rest of the > devices/files I had to enable NOP security driver for the test > too. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > > There are only 2 problems with this patch. All of them are in > virNetDevTapCreate mock implementation: > 1) new tap device has constant name. Even within one domain > 2) new tap FDs are constant. Even within one domain > > I'm unable to come with better approach though. Having a static variable that > is incremented each time the mock is called would not fly as it will give > different results when combined with VIR_TEST_RANGE. > Therefore I assume we are good so far with these two limitations. Yeah, I think this isn't a big deal within scope of unit tests - they're not trying to validate semantic correctness, so returning fix name & fd is fine ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list