From nobody Mon Feb 9 06:02:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1680183626; cv=none; d=zohomail.com; s=zohoarc; b=OBbKVIpKyMJlPsZ13xJah1mUq+vxPURQ0U+B06eFVDAPMQt32+4Ja0M2kiIR9Rsu/snbB5hktAM/9DrJF53Oh8MPp0cnUKphs8KFX/iLWo32+gyNkeKKQ1s20LvewL3OSVDC9h5LjPq6RlwGA6TQuwfuHVFHp2taI8LnNbNEqEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680183626; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0gZo86PWJ6Mtln/SaGW6fWvT7qFYseaqOHHQvIsymvM=; b=Mjjn3k7jf2CAJ7+cz243KZm7xqGEe9l38CA3XGbt7Nj1W5rLRxCdmiHLMamH34sEL8UjTbVuERlTcqfiJQKAM2vMdGpzWgY+AAk2RP1Z7Ev9jBHb3SLu/djMX6lS77W6MaJrh8umEDTISGhhZFMcujNxntfj7IEVs751ZM3NpoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1680183626398710.858091231917; Thu, 30 Mar 2023 06:40:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-KELz1tJPOXuQmS08sxt3vQ-1; Thu, 30 Mar 2023 09:40:23 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B22D85C075; Thu, 30 Mar 2023 13:40:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 338CE14171BF; Thu, 30 Mar 2023 13:40:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 72C271949755; Thu, 30 Mar 2023 13:38:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D151B1946597 for ; Thu, 30 Mar 2023 13:38:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CCC0A2166B34; Thu, 30 Mar 2023 13:38:46 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1752F2166B33 for ; Thu, 30 Mar 2023 13:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680183625; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0gZo86PWJ6Mtln/SaGW6fWvT7qFYseaqOHHQvIsymvM=; b=FWBaVox7eYntRBhu9tkjbkORQdxABVbpHaXqeIMPdN5nAF2Ju2GSMlWsldcfH+dpVNLGCl tsklYZoktWFjZMZZWa0kTxE83ZjGo4ZEUPof8KkSxZBZjz1woDj+TPbTKaF3K84cskaJjH gDMx3SA+HyMrjh5UxYRxsDUphANtNtM= X-MC-Unique: KELz1tJPOXuQmS08sxt3vQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 20/31] qemuhotplugtest: Use real 'latest' capabilities for hotplug testing Date: Thu, 30 Mar 2023 15:38:14 +0200 Message-Id: <059907f691f30cf7810f7622ea7b403ef3e32293.1680182808.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1680183628537100001 Content-Type: text/plain; charset="utf-8" Rather than test with synthetic capabilities which might get outdated reuse testQemuGetRealCaps to fetch latest capabilities and use those. Signed-off-by: Peter Krempa --- tests/qemuhotplugtest.c | 231 +++++++++--------- .../ppc64-modern-bulk-result-conf.xml | 5 +- .../ppc64-modern-bulk-result-live.xml | 5 +- .../ppc64-modern-individual-result-conf.xml | 5 +- .../ppc64-modern-individual-result-live.xml | 5 +- .../x86-modern-bulk-result-conf.xml | 5 +- .../x86-modern-bulk-result-live.xml | 5 +- .../x86-modern-individual-add-result-conf.xml | 5 +- .../x86-modern-individual-add-result-live.xml | 5 +- .../qemuhotplug-base-ccw-live+ccw-virtio.xml | 13 +- ...with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 13 +- ...otplug-base-ccw-live-with-2-ccw-virtio.xml | 13 +- ...-with-ccw-virtio+ccw-virtio-2-explicit.xml | 13 +- ...-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 13 +- ...uhotplug-base-ccw-live-with-ccw-virtio.xml | 13 +- .../qemuhotplug-base-ccw-live.xml | 13 +- .../qemuhotplug-base-live+cdrom-scsi.xml | 5 +- .../qemuhotplug-base-live+cdrom-usb.xml | 5 +- ...uhotplug-base-live+disk-scsi-multipath.xml | 5 +- ...+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 5 +- .../qemuhotplug-base-live+disk-scsi.xml | 5 +- .../qemuhotplug-base-live+disk-usb.xml | 5 +- .../qemuhotplug-base-live+disk-virtio.xml | 5 +- .../qemuhotplug-base-live+guestfwd.xml | 5 +- .../qemuhotplug-base-live+hostdev-pci.xml | 5 +- .../qemuhotplug-base-live+interface-vdpa.xml | 5 +- ...qemuhotplug-base-live+ivshmem-doorbell.xml | 5 +- .../qemuhotplug-base-live+ivshmem-plain.xml | 5 +- .../qemuhotplug-base-live+qemu-agent.xml | 5 +- ...uhotplug-base-live+watchdog-user-alias.xml | 5 +- .../qemuhotplug-base-live+watchdog.xml | 5 +- .../qemuhotplug-base-live.xml | 5 +- ...hotplug-base-with-scsi-controller-live.xml | 5 +- ...thout-scsi-controller-live+disk-scsi-2.xml | 5 +- ...g-console-compat-2-live+console-virtio.xml | 5 +- .../qemuhotplug-console-compat-2-live.xml | 5 +- ...uhotplug-pseries-base-live+hostdev-pci.xml | 5 +- .../qemuhotplug-pseries-base-live.xml | 5 +- 38 files changed, 299 insertions(+), 173 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 186958cd57..9c8407c5ef 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -53,12 +53,22 @@ struct qemuHotplugTestData { bool keep; virDomainObj *vm; bool deviceDeletedEvent; + const char *arch; + GHashTable *capsLatestFiles; + GHashTable *capsCache; + GHashTable *schemaCache; }; static int qemuHotplugCreateObjects(virDomainXMLOption *xmlopt, virDomainObj **vm, - const char *domxml) + const char *domxml, + const char *arch, + GHashTable *capsLatestFiles, + GHashTable *capsCache, + GHashTable *schemaCache, + GHashTable **schema) + { qemuDomainObjPrivate *priv =3D NULL; const unsigned int parseFlags =3D 0; @@ -68,28 +78,10 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt, priv =3D (*vm)->privateData; - priv->qemuCaps =3D virQEMUCapsNew(); - - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_LSI); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_QXL); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_VGA); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S3); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S4); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VNC); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PR_MANAGER_HELPER); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_BLOCK); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_KBD); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_NETDEV_VHOST_VDPA); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SET_ACTION); + if (!(priv->qemuCaps =3D testQemuGetRealCaps(arch, "latest", "", + capsLatestFiles, capsCache, + schemaCache, schema))) + return -1; if (qemuTestCapsCacheInsert(driver.qemuCapsCache, priv->qemuCaps) < 0) return -1; @@ -347,7 +339,10 @@ testQemuHotplug(const void *data) goto cleanup; } } else { - if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml) < 0) + if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml, + test->arch, test->capsLatestFiles, + test->capsCache, test->schemaCache, + NULL) < 0) goto cleanup; } @@ -478,7 +473,10 @@ struct testQemuHotplugCpuParams { bool state; bool modern; bool fail; - GHashTable *schema; + const char *arch; + GHashTable *capsLatestFiles; + GHashTable *capsCache; + GHashTable *schemaCache; }; @@ -488,6 +486,7 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugC= puParams *params) qemuDomainObjPrivate *priv =3D NULL; g_autofree char *prefix =3D NULL; struct testQemuHotplugCpuData *data =3D NULL; + GHashTable *schema =3D NULL; prefix =3D g_strdup_printf("%s/qemuhotplugtestcpus/%s", abs_srcdir, pa= rams->test); @@ -503,7 +502,9 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugC= puParams *params) if (virTestLoadFile(data->file_xml_dom, &data->xml_dom) < 0) goto error; - if (qemuHotplugCreateObjects(driver.xmlopt, &data->vm, data->xml_dom) = < 0) + if (qemuHotplugCreateObjects(driver.xmlopt, &data->vm, data->xml_dom, + params->arch, params->capsLatestFiles, + params->capsCache, params->schemaCache, &= schema) < 0) goto error; /* create vm->newDef */ @@ -517,7 +518,7 @@ testQemuHotplugCpuPrepare(const struct testQemuHotplugC= puParams *params) virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); if (!(data->mon =3D qemuMonitorTestNewFromFileFull(data->file_json_mon= itor, - &driver, data->vm, pa= rams->schema))) + &driver, data->vm, sc= hema))) goto error; if (params->fail) @@ -645,11 +646,17 @@ testQemuHotplugCpuIndividual(const void *opaque) static int mymain(void) { - g_autoptr(GHashTable) qmpschema =3D NULL; int ret =3D 0; - struct qemuHotplugTestData data =3D {0}; - struct testQemuHotplugCpuParams cpudata; g_autoptr(virQEMUDriverConfig) cfg =3D NULL; + g_autoptr(GHashTable) capsLatestFiles =3D testQemuGetLatestCaps(); + g_autoptr(GHashTable) capsCache =3D virHashNew(virObjectUnref); + g_autoptr(GHashTable) schemaCache =3D virHashNew((GDestroyNotify) g_ha= sh_table_unref); + struct qemuHotplugTestData data =3D { .capsLatestFiles =3D capsLatestF= iles, + .capsCache =3D capsCache, + .schemaCache =3D schemaCache }; + struct testQemuHotplugCpuParams cpudata =3D { .capsLatestFiles =3D cap= sLatestFiles, + .capsCache =3D capsCache, + .schemaCache =3D schemaCac= he }; if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; @@ -661,13 +668,6 @@ mymain(void) if (!(driver.domainEventState =3D virObjectEventStateNew())) return EXIT_FAILURE; - if (!(qmpschema =3D testQEMUSchemaLoadLatest("x86_64"))) { - VIR_TEST_VERBOSE("failed to load qapi schema\n"); - return EXIT_FAILURE; - } - - cpudata.schema =3D qmpschema; - driver.lockManager =3D virLockManagerPluginNew("nop", "qemu", driver.config->configBase= Dir, 0); @@ -682,10 +682,11 @@ mymain(void) } -#define DO_TEST(file, ACTION, dev, fail_, keep_, ...) \ +#define DO_TEST(archname, file, ACTION, dev, fail_, keep_, ...) \ do { \ const char *my_mon[] =3D { __VA_ARGS__, NULL}; \ const char *name =3D file " " #ACTION " " dev; \ + data.arch =3D archname; \ data.action =3D ACTION; \ data.domain_filename =3D file; \ data.device_filename =3D dev; \ @@ -696,14 +697,14 @@ mymain(void) ret =3D -1; \ } while (0) -#define DO_TEST_ATTACH(file, dev, fail, keep, ...) \ - DO_TEST(file, ATTACH, dev, fail, keep, __VA_ARGS__) +#define DO_TEST_ATTACH(arch, file, dev, fail, keep, ...) \ + DO_TEST(arch, file, ATTACH, dev, fail, keep, __VA_ARGS__) -#define DO_TEST_DETACH(file, dev, fail, keep, ...) \ - DO_TEST(file, DETACH, dev, fail, keep, __VA_ARGS__) +#define DO_TEST_DETACH(arch, file, dev, fail, keep, ...) \ + DO_TEST(arch, file, DETACH, dev, fail, keep, __VA_ARGS__) -#define DO_TEST_UPDATE(file, dev, fail, keep, ...) \ - DO_TEST(file, UPDATE, dev, fail, keep, __VA_ARGS__) +#define DO_TEST_UPDATE(arch, file, dev, fail, keep, ...) \ + DO_TEST(arch, file, UPDATE, dev, fail, keep, __VA_ARGS__) #define QMP_OK "{\"return\": {}}" @@ -722,60 +723,60 @@ mymain(void) "}\r\n" cfg->spiceTLS =3D true; - DO_TEST_UPDATE("graphics-spice", "graphics-spice-nochange", false, fal= se, NULL); - DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-nocha= nge", false, false, + DO_TEST_UPDATE("x86_64", "graphics-spice", "graphics-spice-nochange", = false, false, NULL); + DO_TEST_UPDATE("x86_64", "graphics-spice-timeout", "graphics-spice-tim= eout-nochange", false, false, "set_password", QMP_OK, "expire_password", QMP_OK); - DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-passw= ord", false, false, + DO_TEST_UPDATE("x86_64", "graphics-spice-timeout", "graphics-spice-tim= eout-password", false, false, "set_password", QMP_OK, "expire_password", QMP_OK); - DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false,= NULL); - DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen= -network-password", false, false, + DO_TEST_UPDATE("x86_64", "graphics-spice", "graphics-spice-listen", tr= ue, false, NULL); + DO_TEST_UPDATE("x86_64", "graphics-spice-listen-network", "graphics-sp= ice-listen-network-password", false, false, "set_password", QMP_OK, "expire_password", QMP_OK); cfg->spiceTLS =3D false; /* Strange huh? Currently, only graphics can be updated :-P */ - DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL); + DO_TEST_UPDATE("x86_64", "disk-cdrom", "disk-cdrom-nochange", true, fa= lse, NULL); - DO_TEST_ATTACH("console-compat-2-live", "console-virtio", false, true, + DO_TEST_ATTACH("x86_64", "console-compat-2-live", "console-virtio", fa= lse, true, "chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}= }", "device_add", QMP_OK); - DO_TEST_DETACH("console-compat-2-live", "console-virtio", false, false, + DO_TEST_DETACH("x86_64", "console-compat-2-live", "console-virtio", fa= lse, false, "device_del", QMP_DEVICE_DELETED("console1") QMP_OK, "chardev-remove", QMP_OK, "query-fdsets", "{\"return\":= []}"); - DO_TEST_ATTACH("base-live", "disk-virtio", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "disk-virtio", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "disk-virtio", true, true, + DO_TEST_DETACH("x86_64", "base-live", "disk-virtio", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "disk-virtio", false, false, + DO_TEST_DETACH("x86_64", "base-live", "disk-virtio", false, false, "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-live", "disk-usb", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "disk-usb", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "disk-usb", true, true, + DO_TEST_DETACH("x86_64", "base-live", "disk-usb", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "disk-usb", false, false, + DO_TEST_DETACH("x86_64", "base-live", "disk-usb", false, false, "device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-live", "disk-scsi", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "disk-scsi", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "disk-scsi", true, true, + DO_TEST_DETACH("x86_64", "base-live", "disk-scsi", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "disk-scsi", false, false, + DO_TEST_DETACH("x86_64", "base-live", "disk-scsi", false, false, "device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-without-scsi-controller-live", "disk-scsi-2", fal= se, true, + DO_TEST_ATTACH("x86_64", "base-without-scsi-controller-live", "disk-sc= si-2", false, true, /* Four controllers added */ "device_add", QMP_OK, "device_add", QMP_OK, @@ -784,109 +785,109 @@ mymain(void) "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", true, = true, + DO_TEST_DETACH("x86_64", "base-with-scsi-controller-live", "disk-scsi-= 2", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false,= false, + DO_TEST_DETACH("x86_64", "base-with-scsi-controller-live", "disk-scsi-= 2", false, false, "device_del", QMP_DEVICE_DELETED("scsi3-0-6") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-live", "disk-scsi-multipath", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "disk-scsi-multipath", false, tr= ue, "object-add", QMP_OK, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "disk-scsi-multipath", true, true, + DO_TEST_DETACH("x86_64", "base-live", "disk-scsi-multipath", true, tru= e, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "disk-scsi-multipath", false, false, + DO_TEST_DETACH("x86_64", "base-live", "disk-scsi-multipath", false, fa= lse, "device_del", QMP_DEVICE_DELETED("scsi0-0-0-0") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK, "object-del", QMP_OK); - DO_TEST_ATTACH("base-live", "qemu-agent", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "qemu-agent", false, true, "getfd", QMP_OK, "chardev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "qemu-agent-detach", false, false, + DO_TEST_DETACH("x86_64", "base-live", "qemu-agent-detach", false, fals= e, "device_del", QMP_DEVICE_DELETED("channel0") QMP_OK, "chardev-remove", QMP_OK, "query-fdsets", "{\"return\":= []}"); - DO_TEST_ATTACH("base-ccw-live", "ccw-virtio", false, true, + DO_TEST_ATTACH("s390x", "base-ccw-live", "ccw-virtio", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-ccw-live", "ccw-virtio", false, false, + DO_TEST_DETACH("s390x", "base-ccw-live", "ccw-virtio", false, false, "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false,= true, + DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2= ", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false,= false, + DO_TEST_DETACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2= ", false, false, "device_del", QMP_DEVICE_DELETED("virtio-disk0") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit= ", false, true, + DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2= -explicit", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit= ", false, false, + DO_TEST_DETACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2= -explicit", false, false, "device_del", QMP_DEVICE_DELETED("virtio-disk0") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); /* Attach a second device, then detach the first one. Then attach the = first one again. */ - DO_TEST_ATTACH("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit= ", false, true, + DO_TEST_ATTACH("s390x", "base-ccw-live-with-ccw-virtio", "ccw-virtio-2= -explicit", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-explic= it", false, true, + DO_TEST_DETACH("s390x", "base-ccw-live-with-2-ccw-virtio", "ccw-virtio= -1-explicit", false, true, "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK= ); - DO_TEST_ATTACH("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-revers= e", false, false, + DO_TEST_ATTACH("s390x", "base-ccw-live-with-2-ccw-virtio", "ccw-virtio= -1-reverse", false, false, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_ATTACH("base-live", "ivshmem-plain", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "ivshmem-plain", false, true, "object-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_ATTACH("base-live", "ivshmem-doorbell", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "ivshmem-doorbell", false, true, "chardev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live+ivshmem-plain", "ivshmem-doorbell-detach", f= alse, true, + DO_TEST_DETACH("x86_64", "base-live+ivshmem-plain", "ivshmem-doorbell-= detach", false, true, "device_del", QMP_DEVICE_DELETED("shmem1") QMP_OK, "chardev-remove", QMP_OK); - DO_TEST_DETACH("base-live", "ivshmem-plain-detach", false, false, + DO_TEST_DETACH("x86_64", "base-live", "ivshmem-plain-detach", false, f= alse, "device_del", QMP_DEVICE_DELETED("shmem0") QMP_OK, "object-del", QMP_OK); - DO_TEST_ATTACH("base-live+disk-scsi-wwn", + DO_TEST_ATTACH("x86_64", "base-live+disk-scsi-wwn", "disk-scsi-duplicate-wwn", false, false, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_ATTACH("base-live", "hostdev-pci", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "hostdev-pci", false, true, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "hostdev-pci", false, false, + DO_TEST_DETACH("x86_64", "base-live", "hostdev-pci", false, false, "device_del", QMP_DEVICE_DELETED("hostdev0") QMP_OK); - DO_TEST_ATTACH("pseries-base-live", "hostdev-pci", false, true, + DO_TEST_ATTACH("ppc64", "pseries-base-live", "hostdev-pci", false, tru= e, "device_add", QMP_OK); - DO_TEST_DETACH("pseries-base-live", "hostdev-pci", false, false, + DO_TEST_DETACH("ppc64", "pseries-base-live", "hostdev-pci", false, fal= se, "device_del", QMP_DEVICE_DELETED("hostdev0") QMP_OK); - DO_TEST_ATTACH("base-live", "interface-vdpa", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "interface-vdpa", false, true, "query-fdsets", "{\"return\":[{\"fdset-id\":99999}]}", "add-fd", "{ \"return\": { \"fdset-id\": 1, \"fd\": 95 = }}", "netdev_add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "interface-vdpa", false, false, + DO_TEST_DETACH("x86_64", "base-live", "interface-vdpa", false, false, "device_del", QMP_DEVICE_DELETED("net0") QMP_OK, "netdev_del", QMP_OK, "query-fdsets", @@ -894,50 +895,51 @@ mymain(void) "remove-fd", QMP_OK ); - DO_TEST_ATTACH("base-live", "watchdog", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "watchdog", false, true, "set-action", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "watchdog-full", false, false, + DO_TEST_DETACH("x86_64", "base-live", "watchdog-full", false, false, "device_del", QMP_DEVICE_DELETED("watchdog0") QMP_OK); - DO_TEST_ATTACH("base-live", "watchdog-user-alias", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "watchdog-user-alias", false, tr= ue, "set-action", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "watchdog-user-alias-full", false, false, + DO_TEST_DETACH("x86_64", "base-live", "watchdog-user-alias-full", fals= e, false, "device_del", QMP_DEVICE_DELETED("ua-UserWatchdog") QMP= _OK); - DO_TEST_ATTACH("base-live", "guestfwd", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "guestfwd", false, true, "getfd", QMP_OK, "chardev-add", QMP_OK, "netdev_add", QMP_OK); - DO_TEST_DETACH("base-live", "guestfwd", false, false, + DO_TEST_DETACH("x86_64", "base-live", "guestfwd", false, false, "netdev_del", QMP_OK); - DO_TEST_ATTACH("base-live", "cdrom-usb", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "cdrom-usb", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "cdrom-usb", true, true, + DO_TEST_DETACH("x86_64", "base-live", "cdrom-usb", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "cdrom-usb", false, false, + DO_TEST_DETACH("x86_64", "base-live", "cdrom-usb", false, false, "device_del", QMP_DEVICE_DELETED("usb-disk4") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); - DO_TEST_ATTACH("base-live", "cdrom-scsi", false, true, + DO_TEST_ATTACH("x86_64", "base-live", "cdrom-scsi", false, true, "blockdev-add", QMP_OK, "blockdev-add", QMP_OK, "device_add", QMP_OK); - DO_TEST_DETACH("base-live", "cdrom-scsi", true, true, + DO_TEST_DETACH("x86_64", "base-live", "cdrom-scsi", true, true, "device_del", QMP_OK); - DO_TEST_DETACH("base-live", "cdrom-scsi", false, false, + DO_TEST_DETACH("x86_64", "base-live", "cdrom-scsi", false, false, "device_del", QMP_DEVICE_DELETED("scsi0-0-0-4") QMP_OK, "blockdev-del", QMP_OK, "blockdev-del", QMP_OK); -#define DO_TEST_CPU_GROUP(prefix, vcpus, modernhp, expectfail) \ +#define DO_TEST_CPU_GROUP(archname, prefix, vcpus, modernhp, expectfail) \ do { \ cpudata.test =3D prefix; \ + cpudata.arch =3D archname; \ cpudata.newcpus =3D vcpus; \ cpudata.modern =3D modernhp; \ cpudata.fail =3D expectfail; \ @@ -946,15 +948,16 @@ mymain(void) ret =3D -1; \ } while (0) - DO_TEST_CPU_GROUP("x86-modern-bulk", 7, true, false); - DO_TEST_CPU_GROUP("ppc64-modern-bulk", 24, true, false); - DO_TEST_CPU_GROUP("ppc64-modern-bulk", 15, true, true); - DO_TEST_CPU_GROUP("ppc64-modern-bulk", 23, true, true); - DO_TEST_CPU_GROUP("ppc64-modern-bulk", 25, true, true); + DO_TEST_CPU_GROUP("x86_64", "x86-modern-bulk", 7, true, false); + DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 24, true, false); + DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 15, true, true); + DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 23, true, true); + DO_TEST_CPU_GROUP("ppc64", "ppc64-modern-bulk", 25, true, true); -#define DO_TEST_CPU_INDIVIDUAL(prefix, mapstr, statefl, modernhp, expectfa= il) \ +#define DO_TEST_CPU_INDIVIDUAL(archname, prefix, mapstr, statefl, modernhp= , expectfail) \ do { \ cpudata.test =3D prefix; \ + cpudata.arch =3D archname; \ cpudata.cpumap =3D mapstr; \ cpudata.state =3D statefl; \ cpudata.modern =3D modernhp; \ @@ -964,13 +967,13 @@ mymain(void) ret =3D -1; \ } while (0) - DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "7", true, true, f= alse); - DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "6,7", true, true,= true); - DO_TEST_CPU_INDIVIDUAL("x86-modern-individual-add", "7", false, true, = true); + DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", tru= e, true, false); + DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "6,7", t= rue, true, true); + DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", fal= se, true, true); - DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "16-23", true, true,= false); - DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "16-22", true, true,= true); - DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "17", true, true, tr= ue); + DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-23", tr= ue, true, false); + DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-22", tr= ue, true, true); + DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "17", true,= true, true); qemuTestDriverFree(&driver); virObjectUnref(data.vm); diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml b/= tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml index a7ada18bf3..afb2c85bc2 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml @@ -42,7 +42,8 @@ hvm - + + qemu64 @@ -51,7 +52,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/= tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml index 3932fd9b55..d86247d70c 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml @@ -42,7 +42,8 @@ hvm - + + qemu64 @@ -51,7 +52,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.= xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml index f3a1efeede..e8d30f7ddd 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml @@ -42,7 +42,8 @@ hvm - + + qemu64 @@ -51,7 +52,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.= xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml index 6d64ead3d0..afc500657c 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml @@ -42,7 +42,8 @@ hvm - + + qemu64 @@ -51,7 +52,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml b/te= sts/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml index 87eb19ebd8..8d52ffedb4 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml @@ -18,7 +18,8 @@ hvm - + + qemu64 @@ -27,7 +28,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/te= sts/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml index 251634e266..f416397e33 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml @@ -18,7 +18,8 @@ hvm - + + qemu64 @@ -27,7 +28,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-con= f.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml index 140892aaf8..0bd2af8e43 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml @@ -18,7 +18,8 @@ hvm - + + qemu64 @@ -27,7 +28,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-liv= e.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml index 45196ba1d1..b31e6ebe55 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml @@ -18,7 +18,8 @@ hvm - + + qemu64 @@ -27,7 +28,7 @@ destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-vir= tio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio= .xml index 4036adde89..798a7ab732 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml @@ -13,6 +13,7 @@ + destroy restart @@ -31,18 +32,24 @@ -
+
+ +
-
+
+ +
-
+
+ +