[libvirt] [PATCHv5 09/19] tests: virstoragetest: Don't test relative start of backing chains

Eric Blake eblake at redhat.com
Tue Jun 24 21:05:30 UTC 2014


On 06/19/2014 07:59 AM, Peter Krempa wrote:
> libvirt always uses an absolute path to address the top image of an
> image chain. Our storage test tests also the relative path which won't
> ever be used. Additionally it makes the test more complicated.

It covers some interesting corner cases that matter to qemu; but I agree
that we won't ever use them locally, and that pruning our code may make
it easier to maintain (whereas the user can start qemu-img in any
directory of their choice, we are always running libvirtd in / and so
relative names don't work, and we really do always start with an
absolute name).

I think having the relative tests helped us avoid what might otherwise
have been some nasty regressions in all our refactoring, but now that we
have stabilized on something that is working, I agree with the decision
to prune it.

> ---
>  tests/virstoragetest.c | 79 +++++++++++++-------------------------------------
>  1 file changed, 20 insertions(+), 59 deletions(-)
> 

> -#define TEST_CHAIN(id, relstart, absstart, format, chain1, flags1,   \
> -                   chain2, flags2, chain3, flags3, chain4, flags4)   \
> +#define TEST_CHAIN(id, path, format, chain1, flags1, chain2, flags2) \
>      do {                                                             \
> -        TEST_ONE_CHAIN(#id "a", relstart, format, flags1,            \
> +        TEST_ONE_CHAIN(#id "a", path, format, flags1 | ABS_START,    \
>                         VIR_FLATTEN_1(chain1));                       \
> -        TEST_ONE_CHAIN(#id "b", relstart, format, flags2,            \
> +        TEST_ONE_CHAIN(#id "b", path, format, flags2 | ABS_START,    \
>                         VIR_FLATTEN_1(chain2));                       \

Do we even still need ABS_START? But if not, do that as a separate
cleanup; this patch is already big enough.

ACK.

-- 
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/20140624/81b070b6/attachment-0001.sig>


More information about the libvir-list mailing list