Re: [PATCH 4/9] tests: only run startup XML tests if requested

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

 



On 09/09/2018 04:10 AM, Ján Tomko wrote:
> Use the recently introduced flag as a witness.
> This reduces the apparent number of test cases
> to the real number of test cases.
> 
> Note that this does not suffer from the same problem
> as commit 70255fa was fixing, because the condition
> for running virTestRun does not depend on results
> of previous tests.
> 
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  tests/qemuxml2argvtest.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 4d16dc58c1..54eede5b38 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -479,6 +479,8 @@ testCompareXMLToStartupXML(const void *data)
>  static int
>  testCheckExclusiveFlags(int testFlags ATTRIBUTE_UNUSED)

testFlags are no long unused, are they ;-)

>  {
> +    TEST_EXCLUSIVE_FLAGS(FLAG_STEAL_VM, FLAG_EXPECT_FAILURE);
> +    TEST_EXCLUSIVE_FLAGS(FLAG_STEAL_VM, FLAG_EXPECT_PARSE_ERROR);

Again, I vote for VIR_EXCLUSIVE_FLAGS*().

>      return 0;
>  }
>  
> @@ -846,7 +848,8 @@ mymain(void)
>          if (virTestRun("QEMU XML-2-ARGV " name, \
>                         testCompareXMLToArgv, &info) < 0) \
>              ret = -1; \
> -        if (virTestRun("QEMU XML-2-startup-XML " name, \
> +        if (((flags) & FLAG_STEAL_VM) && \
> +            virTestRun("QEMU XML-2-startup-XML " name, \
>                         testCompareXMLToStartupXML, &info) < 0) \
>              ret = -1; \
>          virObjectUnref(info.qemuCaps); \
> 

Michal

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

  Powered by Linux