Re: [libvirt PATCH] tests: poison $HOME and $XDG_RUNTIME_DIR env variables

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

 



On 5/4/20 4:39 PM, Daniel P. Berrangé wrote:
To attempt to catch unit tests which accidentally create files in $HOME,
or $XDG_RUNTIME_DIR, poison these env vars by pointing them to
directories which don't exist. This should give easier to debug test
failures. For example:

$ VIR_TEST_DEBUG=1 ./qemuhotplugtest
Could not initialize HostdevManager - operation failed: Failed to create state dir '/bad-test-used-env-xdg-runtime-dir/libvirt/hostdevmgr'

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
  tests/testutils.c | 3 +++
  1 file changed, 3 insertions(+)


Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal





[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