[libvirt] [PATCH 1/9] virmacmaptest: depend on yajl for 'empty' test

Ján Tomko jtomko at redhat.com
Wed Mar 28 23:09:50 UTC 2018


While an empty array is formatted with two newlines with yajl,
jansson does not put any newlines between the brackets.

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

diff --git a/tests/virmacmaptest.c b/tests/virmacmaptest.c
index 6e3e9984d..e0cf8f91a 100644
--- a/tests/virmacmaptest.c
+++ b/tests/virmacmaptest.c
@@ -205,8 +205,11 @@ mymain(void)
     DO_TEST_BASIC("simple2", "f24", "aa:bb:cc:dd:ee:ff", "a1:b2:c3:d4:e5:f6");
     DO_TEST_BASIC("simple2", "f25", "00:11:22:33:44:55", "aa:bb:cc:00:11:22");
 
+#if WITH_YAJL
+    /* other JSON libraries might format an empty array differently */
     DO_TEST_FLUSH_PROLOGUE;
     DO_TEST_FLUSH_EPILOGUE("empty");
+#endif
 
     DO_TEST_FLUSH_PROLOGUE;
     DO_TEST_FLUSH("f24", "aa:bb:cc:dd:ee:ff");
-- 
2.16.1




More information about the libvir-list mailing list