[libvirt] [PATCH v3 3/5] test: Introduce testing of virStorageUtilGlusterExtractPoolSources

Andrea Bolognani abologna at redhat.com
Tue Apr 4 14:07:27 UTC 2017


On Tue, 2017-04-04 at 14:20 +0200, Peter Krempa wrote:
[...]
> +struct testGlusterLookupParseData {

Now that the test function has been renamed, the data
struct should be renamed to match as well.

> +    const char *srcxml;
> +    const char *dstxml;
> +    int type;

This should be virStoragePoolType rather than int.

[...]
> +#define DO_TEST_GLUSTER_EXTRACT_POOL_SOURCES_FULL(testname, sffx, pooltype)    \
> +    do {                                                                       \
> +        struct testGlusterLookupParseData data;                                \
> +        data.srcxml = abs_srcdir "/virstorageutildata/"                        \
> +                      "gluster-parse-" testname "-src.xml";                    \
> +        data.dstxml = abs_srcdir "/virstorageutildata/"                        \
> +                      "gluster-parse-" testname "-" sffx ".xml";               \
> +        data.type = pooltype;                                                  \
> +        if (virTestRun("gluster lookup " sffx " " testname,                    \
> +                       testGlusterExtractPoolSources, &data) < 0)              \
> +            ret = -1;                                                          \
> +    } while (0)

Input file name and verbose test output are still
inconsistent between each other, with the name of the test
function and with the name of the test macro.

FWIW I think "gluster-parse" is descriptive enough and has
the advantage of being short, but I don't particularly care
what name you pick as long as you stick with it in earnest
afterwards :)


ACK with that fixed.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list