From nobody Sun Feb 8 07:47:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531925159295445.4036520969763; Wed, 18 Jul 2018 07:45:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9EDA630832E9; Wed, 18 Jul 2018 14:45:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 449C15C8AA; Wed, 18 Jul 2018 14:45:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8B1AF3FC9D; Wed, 18 Jul 2018 14:45:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6IEiprM028048 for ; Wed, 18 Jul 2018 10:44:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 942A82027047; Wed, 18 Jul 2018 14:44:51 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35D672026D69 for ; Wed, 18 Jul 2018 14:44:51 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 18 Jul 2018 16:44:40 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv4 15/15] m4: Introduce STABLE_ORDERING_JANSSON X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 18 Jul 2018 14:45:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Add a second check for Jansson >=3D 2.8, which includes fixes to preserve ordering of object keys. Use this constant to guard tests that depend on stable ordering. Signed-off-by: J=C3=A1n Tomko --- m4/virt-jansson.m4 | 3 +++ tests/qemublocktest.c | 5 +++++ tests/qemucapabilitiestest.c | 5 +++++ tests/qemucommandutiltest.c | 5 +++++ tests/qemuhotplugtest.c | 5 +++++ tests/qemumigparamstest.c | 5 +++++ tests/qemumonitorjsontest.c | 5 +++++ tests/virjsontest.c | 5 +++++ tests/virmacmaptest.c | 5 +++++ tests/virnetdaemontest.c | 5 +++++ 10 files changed, 48 insertions(+) diff --git a/m4/virt-jansson.m4 b/m4/virt-jansson.m4 index 206d6a5ced..ab4c020f62 100644 --- a/m4/virt-jansson.m4 +++ b/m4/virt-jansson.m4 @@ -22,6 +22,9 @@ AC_DEFUN([LIBVIRT_ARG_JANSSON],[ AC_DEFUN([LIBVIRT_CHECK_JANSSON],[ dnl Jansson http://www.digip.org/jansson/ LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5]) + dnl Older versions of Jansson did not preserve the order of object keys + dnl use this check to guard the tests that are sensitive to this + LIBVIRT_CHECK_PKG([STABLE_ORDERING_JANSSON], [jansson], [2.8], [true]) ]) =20 AC_DEFUN([LIBVIRT_RESULT_JANSSON],[ diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 9a387cf063..d22b4b754e 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -337,6 +337,11 @@ mymain(void) char *capslatest_x86_64 =3D NULL; virQEMUCapsPtr caps_x86_64 =3D NULL; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 641ec4f597..28f903a88c 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -141,6 +141,11 @@ mymain(void) int ret =3D 0; testQemuData data; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index 8e57a1b79d..9b13dde63f 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -76,6 +76,11 @@ mymain(void) int ret =3D 0; testQemuCommandBuildObjectFromJSONData data1; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index c7bc69ab32..674ba92b27 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -589,6 +589,11 @@ mymain(void) struct qemuHotplugTestData data =3D {0}; struct testQemuHotplugCpuParams cpudata; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c index b8af68211b..5e12430991 100644 --- a/tests/qemumigparamstest.c +++ b/tests/qemumigparamstest.c @@ -203,6 +203,11 @@ mymain(void) virQEMUDriver driver; int ret =3D 0; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index c11615f7ac..1826c4f297 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2863,6 +2863,11 @@ mymain(void) virJSONValuePtr metaschema =3D NULL; char *metaschemastr =3D NULL; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/virjsontest.c b/tests/virjsontest.c index d42413d11d..d352d370fd 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -479,6 +479,11 @@ mymain(void) { int ret =3D 0; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #define DO_TEST_FULL(name, cmd, doc, expect, pass) \ do { \ struct testInfo info =3D { doc, expect, pass }; \ diff --git a/tests/virmacmaptest.c b/tests/virmacmaptest.c index 6e3e9984d1..420531dcdb 100644 --- a/tests/virmacmaptest.c +++ b/tests/virmacmaptest.c @@ -157,6 +157,11 @@ mymain(void) int ret =3D 0; virMacMapPtr mgr =3D NULL; =20 +#if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +#endif + #define DO_TEST_BASIC(f, d, ...) \ do { \ const char * const m[] =3D {__VA_ARGS__, NULL }; \ diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index cbc961dbaf..277fb06385 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -375,6 +375,11 @@ mymain(void) int ret =3D 0; const char *server_names[] =3D { "testServer0", "testServer1" }; =20 +# if !WITH_STABLE_ORDERING_JANSSON + fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); + return EXIT_AM_SKIP; +# endif + if (virInitialize() < 0 || virEventRegisterDefaultImpl() < 0) { virDispatchError(NULL); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list