[libvirt] [PATCH 1/5] virjsontest: store name in testInfo

Ján Tomko posted 5 patches 7 years, 5 months ago
[libvirt] [PATCH 1/5] virjsontest: store name in testInfo
Posted by Ján Tomko 7 years, 5 months ago
Give the testing function access to the test name instead of only
passing it to virTestRun.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 tests/virjsontest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/virjsontest.c b/tests/virjsontest.c
index d42413d11d..779bf441bd 100644
--- a/tests/virjsontest.c
+++ b/tests/virjsontest.c
@@ -12,6 +12,7 @@
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 struct testInfo {
+    const char *name;
     const char *doc;
     const char *expect;
     bool pass;
@@ -481,7 +482,7 @@ mymain(void)
 
 #define DO_TEST_FULL(name, cmd, doc, expect, pass) \
     do { \
-        struct testInfo info = { doc, expect, pass }; \
+        struct testInfo info = { name, doc, expect, pass }; \
         if (virTestRun(name, testJSON ## cmd, &info) < 0) \
             ret = -1; \
     } while (0)
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/5] virjsontest: store name in testInfo
Posted by Daniel P. Berrangé 7 years, 5 months ago
On Tue, Aug 28, 2018 at 12:22:51PM +0200, Ján Tomko wrote:
> Give the testing function access to the test name instead of only
> passing it to virTestRun.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  tests/virjsontest.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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