[libvirt] [PATCH] tests: Avoid writing into $HOME during virsh-snapshot

Eric Blake eblake at redhat.com
Thu Mar 28 13:48:22 UTC 2019


On 3/28/19 6:53 AM, Andrea Bolognani wrote:
> On Thu, 2019-03-28 at 10:13 +0100, Andrea Bolognani wrote:
>> On Wed, 2019-03-27 at 13:47 -0500, Eric Blake wrote:
>>> +  export XDG_CONFIG_HOME="$test_dir_/.config"
>>> +  export XDG_CACHE_HOME="$test_dir_/.cache"
>>> +  export XDG_RUNTIME_HOME="XDG_CACHE_HOME"
>>
>> Aren't you missing the $ in front of XDG_CACHE_HOME here?  The same
>> was actually true of the original incarnation of the code, too.
> 
> Wait, I actually spotted two more issues with this patch.
> 
> First of all, you'll want to add
> 
>   /tests/.cache/
>   /tests/.config/
> 
> to .gitignore;

Or update to use something other than $test_dir_ that actually gets
cleaned up on a per-test basis, so that .gitignore won't see it in the
first place.

> moreover, with this patch applied distcheck will
> fail with
> 
>   ERROR: files left in build directory after distclean:
>   ./tests/.cache/libvirt/virsh/history
>   ./tests/.config/libvirt/libvirt.conf
>   make[1]: *** [Makefile:2414: distcleancheck] Error 1
> 
> so that will have to be addressed as well.

Good catch; I'll be sure to test distcheck on my v2.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

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


More information about the libvir-list mailing list