Re: [libvirt PATCH] tests: Mock virGetUserRuntimeDirectory() for qemuhotplug

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

 



On Fri, May 01, 2020 at 03:22:22PM +0200, Andrea Bolognani wrote:
> On Fri, 2020-05-01 at 14:09 +0100, Daniel P. Berrangé wrote:
> > On Fri, May 01, 2020 at 02:30:16PM +0200, Andrea Bolognani wrote:
> > > Not mocking this function results in files being created in the
> > > user's home directory when running the test and in the build
> > > failing altogether inside a constrained environment such as the
> > > one used by pbuilder:
> > 
> > What's pbuilder ?
> 
> It's a tool used in Debian to verify that packages can be built
> successfully in a minimal environment that only contains the build
> dependencies that have been explicitly declared and where access to
> the network and the filesystem outside of the working directory is
> forbidden.
> 
> I think the equivalent in the Fedora world is mock, but I haven't
> used the latter in person so I might be off-base :)
> 
> > I wonder if we can make it so that in our
> > containers $HOME points to a non-writable directory such that
> > we can see this failure (and others) in our GitLab CI ?
> 
> Yeah, I was thinking the same, and it definitely sounds like a good
> idea.

Turns out this can be done very nicely even outside of CI:

  https://www.redhat.com/archives/libvir-list/2020-May/msg00058.html

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|





[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]

  Powered by Linux