mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
Remove redundant usage of WITH_YAJL
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án Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1100931f8d
commit
20071c9f99
@ -2104,11 +2104,6 @@ qemuDomainRebootMonitor(virQEMUDriverPtr driver,
|
||||
if (virDomainObjCheckActive(vm) < 0)
|
||||
goto endjob;
|
||||
|
||||
#if !WITH_YAJL
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("ACPI reboot is not supported without the JSON monitor"));
|
||||
goto endjob;
|
||||
#endif
|
||||
qemuDomainSetFakeReboot(driver, vm, isReboot);
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
ret = qemuMonitorSystemPowerdown(priv->mon);
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "cpu/cpu_map.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#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;
|
||||
};
|
||||
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
#if WITH_QEMU
|
||||
static virQEMUDriver driver;
|
||||
#endif
|
||||
|
||||
@ -465,7 +465,7 @@ typedef enum {
|
||||
JSON_MODELS_REQUIRED,
|
||||
} cpuTestCPUIDJson;
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#else /* if WITH_QEMU && WITH_YAJL */
|
||||
#else /* if WITH_QEMU */
|
||||
|
||||
static int
|
||||
cpuTestGetCPUModels(const struct data *data,
|
||||
@ -871,7 +871,7 @@ cpuTestUpdateLive(const void *arg)
|
||||
}
|
||||
|
||||
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
#if WITH_QEMU
|
||||
static int
|
||||
cpuTestJSONCPUID(const void *arg)
|
||||
{
|
||||
@ -970,7 +970,7 @@ mymain(void)
|
||||
virDomainCapsCPUModelsPtr ppc_models = NULL;
|
||||
int ret = 0;
|
||||
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
#if WITH_QEMU
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@ -1057,7 +1057,7 @@ mymain(void)
|
||||
host "/" cpu " (" #models ")", \
|
||||
host, cpu, models, 0, result)
|
||||
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
#if WITH_QEMU
|
||||
# define DO_TEST_JSON(arch, host, json) \
|
||||
do { \
|
||||
if (json == JSON_MODELS) { \
|
||||
@ -1271,7 +1271,7 @@ mymain(void)
|
||||
DO_TEST_CPUID(VIR_ARCH_X86_64, "Ice-Lake-Server", JSON_MODELS);
|
||||
|
||||
cleanup:
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
#if WITH_QEMU
|
||||
qemuTestDriverFree(&driver);
|
||||
#endif
|
||||
|
||||
|
@ -1426,11 +1426,6 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
|
||||
#include "testutils.h"
|
||||
|
||||
#if WITH_YAJL
|
||||
#include "testutilsqemu.h"
|
||||
#include "testutilsqemuschema.h"
|
||||
#include "virstoragefile.h"
|
||||
@ -952,12 +950,4 @@ mymain(void)
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
#else
|
||||
static int
|
||||
mymain(void)
|
||||
{
|
||||
return EXIT_AM_SKIP;
|
||||
}
|
||||
#endif
|
||||
|
||||
VIR_TEST_MAIN(mymain)
|
||||
|
@ -212,11 +212,6 @@ mymain(void)
|
||||
{
|
||||
testQemuData data;
|
||||
|
||||
#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
|
||||
virEventRegisterDefaultImpl();
|
||||
|
||||
if (testQemuDataInit(&data) < 0)
|
||||
|
@ -201,11 +201,6 @@ mymain(void)
|
||||
{
|
||||
testQemuData data;
|
||||
|
||||
#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
|
||||
virEventRegisterDefaultImpl();
|
||||
|
||||
if (testQemuDataInit(&data) < 0)
|
||||
|
@ -76,11 +76,6 @@ mymain(void)
|
||||
int ret = 0;
|
||||
testQemuCommandBuildObjectFromJSONData data1;
|
||||
|
||||
#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
|
||||
virTestCounterReset("testQemuCommandBuildFromJSON");
|
||||
|
||||
#define DO_TEST_COMMAND_FROM_JSON(PROPS, ARRAYFUNC, EXPECT) \
|
||||
|
@ -599,11 +599,6 @@ mymain(void)
|
||||
|
||||
setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, 1);
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -201,11 +201,6 @@ mymain(void)
|
||||
virQEMUDriver driver;
|
||||
int ret = 0;
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -2991,11 +2991,6 @@ mymain(void)
|
||||
virJSONValuePtr metaschema = NULL;
|
||||
char *metaschemastr = NULL;
|
||||
|
||||
#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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user