[libvirt] [PATCH 2/3] tests: Only use privileged mode if Qemu user and group exists

Eric Blake eblake at redhat.com
Mon Apr 7 22:40:24 UTC 2014


On 04/07/2014 02:02 AM, Guido Günther wrote:
> When building packages in a clean chroot the QEMU_USER and QEMU_GROUP
> don't exist making VirQemuDriverConfigNew fail with privileged=true.
> 
> Avoid that by not requiring priviliged mode and skipping tests that need

s/priviliged/privileged/

> it.
> ---
>  tests/qemuxml2argvtest.c | 24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)

Seems like this is what avoids the fail pointed out in 1/3.  It still
feels fishy that our testsuite is that dependent on the system (ideally,
we'd provide a way to mock things up so that creating the config file
NEVER fails when run from the testsuite, even if the uid doesn't exist -
because we shouldn't be probing the live system, only our mockups).  I'd
wait for a second opinion on whether this patch is papering over a
bigger problem of depending on the current system state, or whether it
is an acceptable way to avoid the issue without investing the effort to
tackle at the uid lookup level.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140407/2715ebd1/attachment-0001.sig>


More information about the libvir-list mailing list