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

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]