From nobody Fri May 3 18:05:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576171385; cv=none; d=zohomail.com; s=zohoarc; b=MFf8F9HK+YQFJ1v3FQ1ujyApo7/zKmtLao+Ci8IIx5mef+1+4zOINoHrHkHduSJ17gOgBW6bPzkSRGAiWygjA2T7wU6B5Sjd4dufliOzbqlE+m8vj9lCNrXOThZTiQvxXl6QsjnYIgsZQM0v8WU8egTASZPCu99Vvvb+wKAM0E0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576171385; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Vri1rS7t6wHpvXMQBOBO//bK7pOZgZD9Xj67pKM6mKw=; b=mAiZsq/Xoh630UnJCkuaAErv8fCcFFW1tW+0IQiMCL1W3kZbF3b537wh7nZ4nvIauD3WyZ65B/xKKkcRDU00jrOjJQgPdbCjil0TzDSSpnv9qNRdAU4d7NukDNI0Mg1tqiylQDTSYNVVcpPvcw3hTPkGma1PmYmYrLDULgslttw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1576171385983125.50625191565086; Thu, 12 Dec 2019 09:23:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-_YoRnMuRMq2PJsT0hb1_pA-1; Thu, 12 Dec 2019 12:23:02 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B69891222; Thu, 12 Dec 2019 17:22:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5411E1C94B; Thu, 12 Dec 2019 17:22:56 +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 DAB6918034EA; Thu, 12 Dec 2019 17:22:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBCHMsXC011393 for ; Thu, 12 Dec 2019 12:22:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id C51445C21B; Thu, 12 Dec 2019 17:22:54 +0000 (UTC) Received: from icr.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E1A85C1C3 for ; Thu, 12 Dec 2019 17:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576171384; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Vri1rS7t6wHpvXMQBOBO//bK7pOZgZD9Xj67pKM6mKw=; b=jKL7qtlW6m5MAvbj275JFs33vdGL6XBQIR3Fm0BUcSAUYhzZZwoy6rzYRNS5t8hx9w8vcz jWAsZvn7DGpSBUA316Xd301Bt3stnDjDKBGKrljeEvX7KR599eDX0rdW75MrL8m/9S6dOT NWha3JJQaaSyLiQvGrpyLvhvewGmQY8= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 12 Dec 2019 18:22:48 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] Remove redundant usage of WITH_YAJL 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: _YoRnMuRMq2PJsT0hb1_pA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) As of commit 2a00ef6e71f30241f9ca6288da984d75f3cef957 which was released in v5.2.0, we require YAJL to build the QEMU driver. Remove the checks from code that requires the QEMU driver or checks that also check for WITH_QEMU. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 5 ----- tests/cputest.c | 16 +++++++------- tests/qemuagenttest.c | 5 ----- tests/qemublocktest.c | 42 ++++++++++++++----------------------- tests/qemumigparamstest.c | 5 ----- tests/qemumonitorjsontest.c | 5 ----- 6 files changed, 24 insertions(+), 54 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e65150f42b..66c58d190f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2104,11 +2104,6 @@ qemuDomainRebootMonitor(virQEMUDriverPtr driver, if (virDomainObjCheckActive(vm) < 0) goto endjob; =20 -#if !WITH_YAJL - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("ACPI reboot is not supported without the JSON monito= r")); - goto endjob; -#endif qemuDomainSetFakeReboot(driver, vm, isReboot); qemuDomainObjEnterMonitor(driver, vm); ret =3D qemuMonitorSystemPowerdown(priv->mon); diff --git a/tests/cputest.c b/tests/cputest.c index fd86344ea4..f57516838b 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -36,7 +36,7 @@ #include "cpu/cpu_map.h" #include "virstring.h" =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU # include "testutilsqemu.h" # include "qemumonitortestutils.h" # define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW @@ -62,7 +62,7 @@ struct data { int result; }; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU static virQEMUDriver driver; #endif =20 @@ -465,7 +465,7 @@ typedef enum { JSON_MODELS_REQUIRED, } cpuTestCPUIDJson; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU static virQEMUCapsPtr cpuTestMakeQEMUCaps(const struct data *data) { @@ -547,7 +547,7 @@ cpuTestGetCPUModels(const struct data *data, return 0; } =20 -#else /* if WITH_QEMU && WITH_YAJL */ +#else /* if WITH_QEMU */ =20 static int cpuTestGetCPUModels(const struct data *data, @@ -871,7 +871,7 @@ cpuTestUpdateLive(const void *arg) } =20 =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU static int cpuTestJSONCPUID(const void *arg) { @@ -970,7 +970,7 @@ mymain(void) virDomainCapsCPUModelsPtr ppc_models =3D NULL; int ret =3D 0; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 @@ -1057,7 +1057,7 @@ mymain(void) host "/" cpu " (" #models ")", \ host, cpu, models, 0, result) =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU # define DO_TEST_JSON(arch, host, json) \ do { \ if (json =3D=3D JSON_MODELS) { \ @@ -1270,7 +1270,7 @@ mymain(void) DO_TEST_CPUID(VIR_ARCH_X86_64, "Ice-Lake-Server", JSON_MODELS); =20 cleanup: -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU qemuTestDriverFree(&driver); #endif =20 diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index d8824b8f09..644dc9d08b 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -1426,11 +1426,6 @@ mymain(void) { int ret =3D 0; =20 -#if !WITH_YAJL - fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); - return EXIT_AM_SKIP; -#endif - if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 2c170548ec..c9335774b9 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -18,22 +18,20 @@ =20 =20 #include "testutils.h" +#include "testutilsqemu.h" +#include "testutilsqemuschema.h" +#include "virstoragefile.h" +#include "virstring.h" +#include "virlog.h" +#include "qemu/qemu_block.h" +#include "qemu/qemu_qapi.h" =20 -#if WITH_YAJL -# include "testutilsqemu.h" -# include "testutilsqemuschema.h" -# include "virstoragefile.h" -# include "virstring.h" -# include "virlog.h" -# include "qemu/qemu_block.h" -# include "qemu/qemu_qapi.h" +#include "qemu/qemu_command.h" =20 -# include "qemu/qemu_command.h" +#define LIBVIRT_SNAPSHOT_CONF_PRIV_H_ALLOW +#include "conf/snapshot_conf_priv.h" =20 -# define LIBVIRT_SNAPSHOT_CONF_PRIV_H_ALLOW -# include "conf/snapshot_conf_priv.h" - -# define VIR_FROM_THIS VIR_FROM_NONE +#define VIR_FROM_THIS VIR_FROM_NONE =20 VIR_LOG_INIT("tests.storagetest"); =20 @@ -523,7 +521,7 @@ mymain(void) =20 virTestCounterReset("qemu storage source xml->json->xml "); =20 -# define TEST_JSON_FORMAT(tpe, xmlstr) \ +#define TEST_JSON_FORMAT(tpe, xmlstr) \ do { \ xmljsonxmldata.type =3D tpe; \ xmljsonxmldata.xml =3D xmlstr; \ @@ -532,7 +530,7 @@ mymain(void) ret =3D -1; \ } while (0) =20 -# define TEST_JSON_FORMAT_NET(xmlstr) \ +#define TEST_JSON_FORMAT_NET(xmlstr) \ TEST_JSON_FORMAT(VIR_STORAGE_TYPE_NETWORK, xmlstr) =20 TEST_JSON_FORMAT(VIR_STORAGE_TYPE_FILE, "\n"); @@ -588,7 +586,7 @@ mymain(void) " \n" "\n"); =20 -# define TEST_DISK_TO_JSON_FULL(nme, fl) \ +#define TEST_DISK_TO_JSON_FULL(nme, fl) \ do { \ diskxmljsondata.name =3D nme; \ diskxmljsondata.props =3D NULL; \ @@ -611,7 +609,7 @@ mymain(void) testQemuDiskXMLToPropsClear(&diskxmljsondata); \ } while (0) =20 -# define TEST_DISK_TO_JSON(nme) TEST_DISK_TO_JSON_FULL(nme, false) +#define TEST_DISK_TO_JSON(nme) TEST_DISK_TO_JSON_FULL(nme, false) =20 if (!(diskxmljsondata.schema =3D testQEMUSchemaLoad())) { ret =3D -1; @@ -667,7 +665,7 @@ mymain(void) TEST_DISK_TO_JSON("block-raw-noopts"); TEST_DISK_TO_JSON("block-raw-reservations"); =20 -# define TEST_IMAGE_CREATE(testname, testbacking) \ +#define TEST_IMAGE_CREATE(testname, testbacking) \ do { \ imagecreatedata.name =3D testname; \ imagecreatedata.backingname =3D testbacking; \ @@ -711,12 +709,4 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -#else -static int -mymain(void) -{ - return EXIT_AM_SKIP; -} -#endif - VIR_TEST_MAIN(mymain) diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c index b36aa60302..954cd1c578 100644 --- a/tests/qemumigparamstest.c +++ b/tests/qemumigparamstest.c @@ -201,11 +201,6 @@ mymain(void) virQEMUDriver driver; int ret =3D 0; =20 -#if !WITH_YAJL - fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); - return EXIT_AM_SKIP; -#endif - if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 4f3bfad1d7..21b029390c 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2991,11 +2991,6 @@ mymain(void) virJSONValuePtr metaschema =3D NULL; char *metaschemastr =3D NULL; =20 -#if !WITH_YAJL - fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); - return EXIT_AM_SKIP; -#endif - if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list