[libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*
Andrea Bolognani
abologna at redhat.com
Thu Apr 11 13:18:13 UTC 2019
On Thu, 2019-04-11 at 14:15 +0200, Ján Tomko wrote:
> On Thu, Apr 11, 2019 at 12:44:16PM +0200, Andrea Bolognani wrote:
> > On Mon, 2019-04-01 at 12:47 -0400, Cole Robinson wrote:
> > > if (virAsprintf(&info->outfile,
> > > - "%s/qemuxml2xmloutdata/%s-%s.xml",
> > > + "%s/qemuxml2xmloutdata/%s-%s%s.xml",
>
> I'd definitely put another minus between these suffixes (also, I'd like
> to see them in use).
Looking at xml2argv, and as I suggested the implementation should be
the same in xml2xml, we have
# define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \
DO_TEST_INTERNAL(name, "." arch "-" ver, \
ARG_CAPS_ARCH, arch, \
ARG_CAPS_VER, ver, \
__VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
# define DO_TEST_CAPS_LATEST(name) \
DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
so when you use
DO_TEST_CAPS_LATEST("virtio-transitional");
'suffix' will be ".x86_64-latest" and the resulting filename
will be
qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml
If you had a similar test for WHEN_ACTIVE only, then you'd get
qemuxml2xmloutdata/virtio-transitional-active.x86_64-latest.xml
It doesn't look to me like any extra separators are necessary.
[...]
> > None of the above is really connected to whether or not we should
> > use 'suffix' as I suggested earlier: we should definitely format it,
> > even if it causes test suite churn. Not only that: you should also
> > make sure...
>
> The reason for the suffix in xml2argv is to allow the CAPS_LATEST tests
> to coexist with the ones with enumerated capabilities.
>
> But it also contains the architecture, so even if -latest would be the
> prevailing case, I'd rather format it anyway.
Looks like we agree then :)
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list