[libvirt] [PATCH] tests: Don't use canonical paths in virstoragetest
Michal Privoznik
mprivozn at redhat.com
Fri Mar 29 12:40:12 UTC 2019
On 3/22/19 1:21 PM, Andrea Bolognani wrote:
> The layout of my home directory is somewhat peculiar: I store
> all git repositories in ~/src/upstream, but since I spend
> almost all of my time hacking on libvirt, I also have a
> convenience symlink ~/src/libvirt -> ~/src/upstream/libvirt
> that I use to access that specific git repository.
>
> The above setup has served me well for years; however, ever
> since commit ca1471622dd9 dropped our own custom definitions
> for abs_{,top_}{src,build}dir and started using the ones
> provided by autotools, virstoragetest has started reliably
> failing with errors such as
>
> 2) Storage backing chain 2 ...
> Offset 0
> Expect [chain member: 0
> path:/home/abologna/src/upstream/libvirt/tests/virstoragedata/raw
> backingStoreRaw: <null>
> capacity: 0
> encryption: 0
> relPath:<null>
> type:1
> format:1
> protocol:none
> hostname:<null>
> ]
> Actual [chain member: 0
> path:/home/abologna/src/libvirt/tests/virstoragedata/raw
> backingStoreRaw: <null>
> capacity: 0
> encryption: 0
> relPath:<null>
> type:1
> format:1
> protocol:none
> hostname:<null>
> ]
> ... FAILED
>
> Using abolute paths instead of canonical ones in the tests makes
> the problem go away.
>
> Note that all tests that are specifically designed to test path
> canonicalization via TEST_PATH_CANONICALIZE() were passing even
> before this patch and are not touched by it.
>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>
> I'm far from being confident this is the correct approach, but
> I've grown annoyed enough by the constant 'make check' failures
> that I figured I'd at least get the discussion going :)
>
> tests/virstoragetest.c | 50 +++++++++---------------------------------
> 1 file changed, 10 insertions(+), 40 deletions(-)
ACK and safe for freeze.
Michal
More information about the libvir-list
mailing list