]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: trivial change to mdevctl test macro
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 30 Mar 2021 16:05:59 +0000 (11:05 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Wed, 7 Apr 2021 20:05:19 +0000 (15:05 -0500)
In order to be able to pass a string as user data to the test function,
change the DO_TEST_FULL() macro to expect a pointer and pass it directly
to virTestRun(). Previously we expected the caller to pass a struct
variable and then passed the address of that to virTestRun().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
tests/nodedevmdevctltest.c

index 650e46a29f6fca6224c0a662ebd9b72f7b763f9c..32a7afa2de30ba03dd1bc5206336b31325a21f24 100644 (file)
@@ -265,13 +265,13 @@ mymain(void)
     }
 
 #define DO_TEST_FULL(desc, func, info) \
-    if (virTestRun(desc, func, &info) < 0) \
+    if (virTestRun(desc, func, info) < 0) \
         ret = -1;
 
 #define DO_TEST_START_FULL(virt_type, create, filename) \
     do { \
         struct startTestInfo info = { virt_type, create, filename }; \
-        DO_TEST_FULL("mdevctl start " filename, testMdevctlStartHelper, info); \
+        DO_TEST_FULL("mdevctl start " filename, testMdevctlStartHelper, &info); \
        } \
     while (0)