diff mbox series

[10/21] tests: qemuxml2argv: remove DO_TEST_PARSE_FLAGS_ERROR

Message ID 94c3d1c16de33499139b507becba68d904646f90.1552574299.git.crobinso@redhat.com
State Accepted
Commit d68c9068c977044561e9c417e38c69e0e92bd60f
Headers show
Series tests: qemuxml2argv: support optional arguments | expand

Commit Message

Cole Robinson March 14, 2019, 2:44 p.m. UTC
It only has one caller. Just use DO_TEST_FULL

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 tests/qemuxml2argvtest.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

-- 
2.20.1

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

Comments

Andrea Bolognani March 19, 2019, 1:24 p.m. UTC | #1
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +    DO_TEST_FULL("missing-machine",

> +                 ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,

> +                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,

> +                 ARG_QEMU_CAPS, NONE);


Technically speaking you should be able to leave ARG_QEMU_CAPS out
here, but it's okay if you prefer to leave it in.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>


-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Cole Robinson March 21, 2019, 4:52 p.m. UTC | #2
On 3/19/19 9:24 AM, Andrea Bolognani wrote:
> On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:

> [...]

>> +    DO_TEST_FULL("missing-machine",

>> +                 ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,

>> +                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,

>> +                 ARG_QEMU_CAPS, NONE);

> 

> Technically speaking you should be able to leave ARG_QEMU_CAPS out

> here, but it's okay if you prefer to leave it in.

> 

> Reviewed-by: Andrea Bolognani <abologna@redhat.com>

> 


The other DO_TEST_FULL instances still have it explicitly listed, so I
left it in for this one too

Thanks,
Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 070f7f0a05..1ce8bade48 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -876,12 +876,6 @@  mymain(void)
                  ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \
                  ARG_QEMU_CAPS, __VA_ARGS__)
 
-# define DO_TEST_PARSE_FLAGS_ERROR(name, parseFlags, ...) \
-    DO_TEST_FULL(name, \
-                 ARG_PARSEFLAGS, parseFlags, \
-                 ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \
-                 ARG_QEMU_CAPS, __VA_ARGS__)
-
 # define NONE QEMU_CAPS_LAST
 
     /* Unset or set all envvars here that are copied in qemudBuildCommandLine
@@ -2887,9 +2881,10 @@  mymain(void)
     /* VM XML has invalid arch/ostype/virttype combo, but the SKIP flag
      * will avoid the error. Still, we expect qemu driver to complain about
      * missing machine error, and not crash */
-    DO_TEST_PARSE_FLAGS_ERROR("missing-machine",
-                              VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,
-                              NONE);
+    DO_TEST_FULL("missing-machine",
+                 ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,
+                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,
+                 ARG_QEMU_CAPS, NONE);
 
     DO_TEST("name-escape",
             QEMU_CAPS_NAME_DEBUG_THREADS,