Re: [PATCH] qemuxml2argvtest: Adapt to ethernet automatic tap creation

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

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]