]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Don't use canonical paths in virstoragetest
authorAndrea Bolognani <abologna@redhat.com>
Tue, 12 Mar 2019 16:21:37 +0000 (17:21 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 3 Apr 2019 07:46:51 +0000 (09:46 +0200)
commit35d76db2b7a477abb520cdd920bce2ce5fb820c9
tree27e449d6dd806740903fef70f8f342dc75b861cb
parente398f5d47a713f0d32c49291386b1bf5f3eb6107
tests: Don't use canonical paths in virstoragetest

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@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
tests/virstoragetest.c