[libvirt PATCH 0/5] gitlab: expand the CI job coverage (RESEND)
by Daniel P. Berrangé
There are two main goals with this series
- Introduce a minimal job building the website and publishing
an artifact which can be deployed onto libvirt.org
- Expanding CI jobs to get coverage closer to Travis/Jenkins
Previous posting lost last two mails due to transient SMTP problem
Daniel P. Berrangé (5):
gitlab: use CI for building website contents
gitlab: reduce number of cross-build CI jobs
gitlab: group jobs into stages
gitlab: add several native CI jobs
gitlab: rename the cross build jobs
.gitlab-ci.yml | 105 +++++++++++++++++++++++++++++++++++--------------
1 file changed, 75 insertions(+), 30 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH v1 0/4] Prevent ppc64 guest launch with broken features
by Daniel Henrique Barboza
Hi,
This work was intended to fix a bug with APIC-EOI setting
only (patch 1). I decided to take a closer look and ended up
handling more cases.
I consider the first 3 patches to be straightforward: those
are conditions that QEMU will complain about and I'm simply
refusing to launch while giving a better error message than
the one QEMU provides.
Patch 4 is more debatable. <hyperv><hyperv/> declaration in
the XML is benign, but any of the 14 features being declared
will cause QEMU errors. Instead of putting more code (i.e.
a switch with 14 features in the middle of the code) to
prevent any of those features to be enabled, I made a call
to simply refuse to launch with any <hyperv> setting in
the XML. This is not because I have a beef with Windows
or MS or anything. This is about making an educated guess that
it's highly unlikable that anyone is running ppc64 guests
with <hyperv> declared in the XML, and it's not worth all
the code to support it. But I'm all ears to hear otherwise.
After this series, these are the features that aren't supported by
ppc64 but can be declared in a ppc64 guest without resulting
in a failed launch:
<features>
<acpi/>
<apic/> (without 'eoi' setting)
<pae/>
<hap state='on|off'/>
<viridian/>
</features>
Daniel Henrique Barboza (4):
qemu_domain.c: do not launch ppc64 guests with APIC-EOI setting
qemu_domain.c: do not launch ppc64 guests with 'pvspinlock' setting
qemu_domain.c: do not launch ppc64 guests with 'pmu' setting
qemu_domain.c: do not launch ppc64 guests with Hyperv settings
src/qemu/qemu_domain.c | 49 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 45 insertions(+), 4 deletions(-)
--
2.25.1
4 years, 8 months
[PATCH] qemu_monitor_text.c: Use g_autofree
by Seeteena Thoufeek
Signed-off-by: Seeteena Thoufeek <s1seetee(a)linux.vnet.ibm.com>
---
src/qemu/qemu_monitor_text.c | 85 ++++++++++++++++----------------------------
1 file changed, 30 insertions(+), 55 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 9135a11..5a890af 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -36,27 +36,26 @@ VIR_LOG_INIT("qemu.qemu_monitor_text");
int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
const char *drivestr)
{
- char *cmd = NULL;
- char *reply = NULL;
- int ret = -1;
+ g_autofree char *cmd = NULL;
+ g_autofree char *reply = NULL;
/* 'dummy' here is just a placeholder since there is no PCI
* address required when attaching drives to a controller */
cmd = g_strdup_printf("drive_add dummy %s", drivestr);
if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0)
- goto cleanup;
+ return -1;
if (strstr(reply, "unknown command:")) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("drive hotplug is not supported"));
- goto cleanup;
+ return -1;
}
if (strstr(reply, "could not open disk image")) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("open disk image file failed"));
- goto cleanup;
+ return -1;
}
if (strstr(reply, "Could not open")) {
@@ -66,48 +65,41 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
reply);
- goto cleanup;
+ return -1;
}
if (strstr(reply, "Image is not in")) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Incorrect disk format"));
- goto cleanup;
+ return -1;
}
if (strstr(reply, "IOMMU") ||
strstr(reply, "VFIO")) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
reply);
- goto cleanup;
+ return -1;
}
- ret = 0;
-
- cleanup:
- VIR_FREE(cmd);
- VIR_FREE(reply);
- return ret;
+ return 0;
}
int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
const char *drivestr)
{
- char *cmd = NULL;
- char *reply = NULL;
- int ret = -1;
+ g_autofree char *cmd = NULL;
+ g_autofree char *reply = NULL;
cmd = g_strdup_printf("drive_del %s", drivestr);
if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0)
- goto cleanup;
+ return -1;
if (strstr(reply, "unknown command:")) {
VIR_ERROR(_("deleting drive is not supported. "
"This may leak data if disk is reassigned"));
- ret = 1;
- goto cleanup;
+ return 1;
/* (qemu) drive_del wark
* Device 'wark' not found */
@@ -117,15 +109,10 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
} else if (STRNEQ(reply, "")) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("deleting %s drive failed: %s"), drivestr, reply);
- goto cleanup;
+ return -1;
}
- ret = 0;
-
- cleanup:
- VIR_FREE(cmd);
- VIR_FREE(reply);
- return ret;
+ return 0;
}
int
@@ -159,28 +146,27 @@ qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon,
int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
{
- char *cmd = NULL;
- char *reply = NULL;
- int ret = -1;
+ g_autofree char *cmd = NULL;
+ g_autofree char *reply = NULL;
cmd = g_strdup_printf("loadvm \"%s\"", name);
if (qemuMonitorJSONHumanCommand(mon, cmd, &reply))
- goto cleanup;
+ return -1;
if (strstr(reply, "No block device supports snapshots")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("this domain does not have a device to load snapshots"));
- goto cleanup;
+ return -1;
} else if (strstr(reply, "Could not find snapshot")) {
virReportError(VIR_ERR_OPERATION_INVALID,
_("the snapshot '%s' does not exist, and was not loaded"),
name);
- goto cleanup;
+ return -1;
} else if (strstr(reply, "Snapshots not supported on device")) {
virReportError(VIR_ERR_OPERATION_INVALID,
_("Failed to load snapshot: %s"), reply);
- goto cleanup;
+ return -1;
} else if (strstr(reply, "Could not open VM state file") ||
strstr(reply, "Error: ") ||
(strstr(reply, "Error") &&
@@ -188,46 +174,35 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
strstr(reply, "while activating snapshot on")))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Failed to load snapshot: %s"), reply);
- goto cleanup;
+ return -1;
}
- ret = 0;
-
- cleanup:
- VIR_FREE(cmd);
- VIR_FREE(reply);
- return ret;
+ return 0;
}
int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name)
{
- char *cmd = NULL;
- char *reply = NULL;
- int ret = -1;
+ g_autofree char *cmd = NULL;
+ g_autofree char *reply = NULL;
cmd = g_strdup_printf("delvm \"%s\"", name);
if (qemuMonitorJSONHumanCommand(mon, cmd, &reply))
- goto cleanup;
+ return -1;
if (strstr(reply, "No block device supports snapshots")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("this domain does not have a device to delete snapshots"));
- goto cleanup;
+ return -1;
} else if (strstr(reply, "Snapshots not supported on device")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", reply);
- goto cleanup;
+ return -1;
} else if (strstr(reply, "Error: ") ||
(strstr(reply, "Error") &&
strstr(reply, "while deleting snapshot"))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Failed to delete snapshot: %s"), reply);
- goto cleanup;
+ return -1;
}
- ret = 0;
-
- cleanup:
- VIR_FREE(cmd);
- VIR_FREE(reply);
- return ret;
+ return 0;
}
--
1.8.3.1
4 years, 8 months
[PATCH] commandtest: Fix test28 error detection
by Michal Privoznik
As a part of c799d150d5e9dae I've introduced a test case that
tests whether passing error object between processes works. The
test spawns a child which reports a system error, parent process
then reads the error and compares with expected output. Problem
with this approach is that error message contains stringified
errno which is not portable. FreeBSD has generally different
messages than Linux. Therefore, use g_strerror() to do the errno
to string translation for us.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/commandtest.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/commandtest.c b/tests/commandtest.c
index f4a2c67c05..d5092b7dd0 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -1272,6 +1272,7 @@ test28(const void *unused G_GNUC_UNUSED)
/* Not strictly a virCommand test, but this is the easiest place
* to test this lower-level interface. */
virErrorPtr err;
+ g_autofree char *msg = g_strdup_printf("some error message: %s", g_strerror(ENODATA));
if (virProcessRunInFork(test28Callback, NULL) != -1) {
fprintf(stderr, "virProcessRunInFork did not fail\n");
@@ -1285,10 +1286,10 @@ test28(const void *unused G_GNUC_UNUSED)
if (!(err->code == VIR_ERR_SYSTEM_ERROR &&
err->domain == 0 &&
- STREQ(err->message, "some error message: No data available") &&
+ STREQ(err->message, msg) &&
err->level == VIR_ERR_ERROR &&
STREQ(err->str1, "%s") &&
- STREQ(err->str2, "some error message: No data available") &&
+ STREQ(err->str2, msg) &&
err->int1 == ENODATA &&
err->int2 == -1)) {
fprintf(stderr, "Unexpected error object\n");
--
2.24.1
4 years, 8 months
[PATCH 0/6] Couple of qemu NS improvements
by Michal Privoznik
The most important patch is 6/6 which relies on 5/6. The rest is just a
few small nits I've noticed and had stuck on my local branch.
Michal Prívozník (6):
qemuDomainCreateDeviceRecursive: Report error if mkdir() fails
qemuDomainBuildNamespace: Try harder to remove temp directories
qemuDomainBuildNamespace: Make @devPath const
virfile: Handle directories in virFileBindMountDevice()
virprocess: Passthru error from virProcessRunInForkHelper
security: Try harder to run transactions
build-aux/syntax-check.mk | 2 +-
src/qemu/qemu_domain.c | 13 +++++++--
src/security/security_dac.c | 16 ++++++++---
src/security/security_selinux.c | 16 ++++++++---
src/util/virfile.c | 13 +++++++--
src/util/virprocess.c | 51 ++++++++++++++++++++++++++++++---
tests/commandtest.c | 43 +++++++++++++++++++++++++++
7 files changed, 136 insertions(+), 18 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH 00/14] qemu: Fix 'backing store' string generator for -blockdev
by Peter Krempa
QEMU doesn't like the backing store string generated by libvirt with
-blockdev. Luckily we are able to parse them back and with blockdev they
would no longer be used by qemu directly. Fix the generator an da few
issues noticed along.
Peter Krempa (14):
conf: rename 'namespace' property of struct _virStorageSourceNVMeDef
qemublocktest: xml->json: Add test for NVMe
virDomainDiskSourceNVMeFormat: Format only valid 'managed' values
qemublocktest: xml->json: Refactor cleanup in test case functions
testQemuDiskXMLToPropsValidateFileSrcOnly: Move together with rest of
xml->json code
qemuBlockGetBackingStoreString: Add 'pretty' argument
testQemuDiskXMLToProps: Store all per-image data in one structure
qemublocktest: Test backing store strings
qemuBlockGetBackingStoreString: Remove 'ret' variable
storage: Implement backing store support for "fat:" prefix
qemuBlockGetBackingStoreString: Add extra wrapping object to JSON
strings
qemu: block: Extract formatting of cookie string
qemuBlockGetBackingStoreString: Properly handle 'http/s' with cookies
and others
storage: Parse 'nvme' disk source properties from json:{} pseudo-uri
src/conf/domain_conf.c | 17 +-
src/hypervisor/virhostdev.c | 2 +-
src/qemu/qemu_block.c | 64 +++--
src/qemu/qemu_block.h | 6 +-
src/qemu/qemu_domain.c | 13 +-
src/qemu/qemu_driver.c | 4 +-
src/util/virstoragefile.c | 43 +++-
src/util/virstoragefile.h | 2 +-
tests/qemublocktest.c | 232 ++++++++++--------
.../qcow2-backing-qcow2-slice.json | 2 +-
.../imagecreate/qcow2-backing-raw-slice.json | 2 +-
.../xml2json/block-raw-noopts-srconly.json | 13 +-
.../block-raw-reservations-srconly.json | 13 +-
.../xml2json/dir-fat-cache-srconly.json | 15 +-
.../xml2json/dir-fat-floppy-srconly.json | 15 +-
.../xml2json/dir-fat-readonly-srconly.json | 15 +-
...ile-backing_basic-aio_threads-srconly.json | 68 +++--
...acking_basic-cache-directsync-srconly.json | 68 +++--
...file-backing_basic-cache-none-srconly.json | 68 +++--
...le-backing_basic-cache-unsafe-srconly.json | 68 +++--
...backing_basic-cache-writeback-srconly.json | 68 +++--
...king_basic-cache-writethrough-srconly.json | 68 +++--
.../file-backing_basic-detect-srconly.json | 68 +++--
.../file-backing_basic-noopts-srconly.json | 52 ++--
...le-backing_basic-unmap-detect-srconly.json | 68 +++--
...le-backing_basic-unmap-ignore-srconly.json | 68 +++--
.../file-backing_basic-unmap-srconly.json | 68 +++--
.../xml2json/file-bochs-noopts-srconly.json | 13 +-
.../xml2json/file-cloop-noopts-srconly.json | 13 +-
.../xml2json/file-dmg-noopts-srconly.json | 13 +-
.../xml2json/file-ploop-noopts-srconly.json | 13 +-
...cow2-backing-chain-encryption-srconly.json | 26 +-
...le-qcow2-backing-chain-noopts-srconly.json | 130 +++++++---
...w2-backing-chain-unterminated-srconly.json | 26 +-
.../xml2json/file-raw-aio_native-srconly.json | 13 +-
.../xml2json/file-raw-luks-srconly.json | 13 +-
.../xml2json/file-raw-noopts-srconly.json | 13 +-
.../xml2json/file-vdi-noopts-srconly.json | 13 +-
.../xml2json/file-vhd-noopts-srconly.json | 13 +-
.../xml2json/file-vpc-noopts-srconly.json | 13 +-
.../network-http-curlopts-srconly.json | 17 ++
.../xml2json/network-http-curlopts.json | 15 ++
.../xml2json/network-http-curlopts.xml | 20 ++
.../xml2json/network-http-noopts-srconly.json | 9 +
.../xml2json/network-http-noopts.json | 14 ++
.../xml2json/network-http-noopts.xml | 15 ++
.../xml2json/network-nbd-tls-srconly.json | 19 +-
...w2-backing-chain-cache-unsafe-srconly.json | 69 ++++--
...backing-chain-encryption_auth-srconly.json | 69 ++++--
.../xml2json/nvme-raw-noopts-srconly.json | 15 ++
.../xml2json/nvme-raw-noopts.json | 14 ++
.../xml2json/nvme-raw-noopts.xml | 13 +
tests/virstoragetest.c | 10 +
53 files changed, 1226 insertions(+), 575 deletions(-)
create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts-srconly.json
create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts.json
create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts-srconly.json
create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json
create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml
--
2.24.1
4 years, 8 months
[PATCH RESEND 0/5] virCommand: fix approach to pidfiles
by Michal Privoznik
The original series doesn't apply cleanly anymore:
https://www.redhat.com/archives/libvir-list/2020-March/msg00499.html
Here's the rebased one.
Michal Prívozník (5):
virCommand: Actually acquire pidfile instead of just writing it
qemuProcessStartManagedPRDaemon: Don't pass -f pidfile to the daemon
qemuSlirpStop: Simplify helper kill
qemuVirtioFSStop: Simplify daemon kill
bridge_driver: Replace and drop networkKillDaemon
docs/internals/command.html.in | 4 +-
src/network/bridge_driver.c | 106 ++++++---------------------------
src/qemu/qemu_process.c | 9 ---
src/qemu/qemu_slirp.c | 16 ++---
src/qemu/qemu_virtiofs.c | 21 +++----
src/util/vircommand.c | 56 ++++++++++++++---
tests/commanddata/test4.log | 1 +
7 files changed, 81 insertions(+), 132 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH] util: virhostcpu: Fail when fetching CPU Stats for invalid cpu
by Mauro S. M. Rodrigues
virHostCPUGetStatsLinux walks through every cpu in /proc/stat until it
finds cpu%cpuNum that matches with the requested cpu.
If none is found it logs the error but it should return -1, instead of 0.
Otherwise virsh nodecpustats --cpu <invalid cpu number> and API bindings
don't fail properly, printing a blank line instead of an error message.
This patch also includes an additional test for virhostcputest to avoid
this regression to happen again in the future.
Reported-by: Satheesh Rajendran <satheera(a)in.ibm.com>
Signed-off-by: Mauro S. M. Rodrigues <maurosr(a)linux.vnet.ibm.com>
---
src/util/virhostcpu.c | 2 +-
tests/virhostcputest.c | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 81293eea8c..20c8d0ce6c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -847,7 +847,7 @@ virHostCPUGetStatsLinux(FILE *procstat,
_("Invalid cpuNum in %s"),
__FUNCTION__);
- return 0;
+ return -1;
}
diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c
index 7865b61578..2f569d8bd4 100644
--- a/tests/virhostcputest.c
+++ b/tests/virhostcputest.c
@@ -258,14 +258,17 @@ mymain(void)
if (virTestRun(nodeData[i].testName, linuxTestHostCPU, &nodeData[i]) != 0)
ret = -1;
-# define DO_TEST_CPU_STATS(name, ncpus) \
+# define DO_TEST_CPU_STATS(name, ncpus, shouldFail) \
do { \
static struct nodeCPUStatsData data = { name, ncpus }; \
- if (virTestRun("CPU stats " name, linuxTestNodeCPUStats, &data) < 0) \
+ if ((virTestRun("CPU stats " name, \
+ linuxTestNodeCPUStats, \
+ &data) < 0) != shouldFail) \
ret = -1; \
} while (0)
- DO_TEST_CPU_STATS("24cpu", 24);
+ DO_TEST_CPU_STATS("24cpu", 24, false);
+ DO_TEST_CPU_STATS("24cpu", 25, true);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
2.24.1
4 years, 8 months
Hot unplug disabling on pci-pci bridge
by Ani Sinha
Hi All :
I have been playing with Qemu trying to disable hot-unplug capability for conventional PCI. I have discussed this briefly on IRC and the plan is to have an option on the pci-pci bridge that would disable SHPC and ACPI hotplug capability for all the slots on that bus. I am _not_ trying to implement a per slot capability for conventional PCI as was previously posted for PCIE slots in this patch : https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg01833.html (we do not need this atm).
I am following the conversations which happened few weeks back here:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg00985.html
To that end, I have been experimenting with Qemu using the patch I mention below. I have attached the virtio balloon driver with bus 1 which is attached to the pci bridge.
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='pci' index='1' model='pci-bridge'>
<model name='pci-bridge'/>
<target chassisNr='1'/>
<alias name='pci.1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<memballoon model='virtio'>
<stats period='30'/>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
</memballoon>
I am using a windows guest and from the guest I can see that the balloon driver is indeed attached to the pci bridge (see attached screenshot).
I still find Windows giving me an option to hot eject the pci balloon driver.
So what am I doing wrong here?
[cid:87E6C01C-8B8C-4E24-AC4B-C0D746C2F605]
The patch I am experimenting with (which is currently a hack) is attached below. It is based off libvirt 4.5 and not the latest mainline.
---
hw/pci-bridge/pci_bridge_dev.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index b2d861d..e706d49 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -58,7 +58,7 @@ static void pci_bridge_dev_realize(PCIDevice *dev, Error **errp)
pci_bridge_initfn(dev, TYPE_PCI_BUS);
- if (bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) {
+ if (0) {//bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) {
dev->config[PCI_INTERRUPT_PIN] = 0x1;
memory_region_init(&bridge_dev->bar, OBJECT(dev), "shpc-bar",
shpc_bar_size(dev));
@@ -161,7 +161,7 @@ static Property pci_bridge_dev_properties[] = {
DEFINE_PROP_ON_OFF_AUTO(PCI_BRIDGE_DEV_PROP_MSI, PCIBridgeDev, msi,
ON_OFF_AUTO_AUTO),
DEFINE_PROP_BIT(PCI_BRIDGE_DEV_PROP_SHPC, PCIBridgeDev, flags,
- PCI_BRIDGE_DEV_F_SHPC_REQ, true),
+ PCI_BRIDGE_DEV_F_SHPC_REQ, false),
DEFINE_PROP_END_OF_LIST(),
};
@@ -181,7 +181,7 @@ static const VMStateDescription pci_bridge_dev_vmstate = {
VMSTATE_END_OF_LIST()
}
};
-
+#if 0
static void pci_bridge_dev_hotplug_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
@@ -208,12 +208,12 @@ static void pci_bridge_dev_hot_unplug_request_cb(HotplugHandler *hotplug_dev,
}
shpc_device_hot_unplug_request_cb(hotplug_dev, dev, errp);
}
-
+#endif
static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
+ //HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
k->realize = pci_bridge_dev_realize;
k->exit = pci_bridge_dev_exitfn;
@@ -227,8 +227,8 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
dc->props = pci_bridge_dev_properties;
dc->vmsd = &pci_bridge_dev_vmstate;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
- hc->plug = pci_bridge_dev_hotplug_cb;
- hc->unplug_request = pci_bridge_dev_hot_unplug_request_cb;
+ //hc->plug = pci_bridge_dev_hotplug_cb;
+ //hc->unplug_request = pci_bridge_dev_hot_unplug_request_cb;
}
static const TypeInfo pci_bridge_dev_info = {
@@ -238,7 +238,7 @@ static const TypeInfo pci_bridge_dev_info = {
.class_init = pci_bridge_dev_class_init,
.instance_finalize = pci_bridge_dev_instance_finalize,
.interfaces = (InterfaceInfo[]) {
- { TYPE_HOTPLUG_HANDLER },
+ //{ TYPE_HOTPLUG_HANDLER },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ }
}
--
1.9.4
4 years, 8 months
[libvirt-tck] scripts: fix disk media change test
by Jim Fehlig
Since the introduction of the 'index' attribute of a disk's
<source> element, test 207-disk-media-change.t is failing. The
test is a bit flawed in that it compares initial and final domXML
after changing the media of a cdrom disk device. The test only
needs to check the final domXML to ensure the correct <source>
path exists at the end of the test.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
scripts/domain/207-disk-media-change.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/domain/207-disk-media-change.t b/scripts/domain/207-disk-media-change.t
index dfef7c9..7a43afc 100644
--- a/scripts/domain/207-disk-media-change.t
+++ b/scripts/domain/207-disk-media-change.t
@@ -98,5 +98,5 @@ EOF
my $finalxml = $dom->get_xml_description;
- is($initialxml, $finalxml, "final XML matches initial XML");
+ ok($finalxml =~ m|$path1|, "final XML has properly updated media");
}
--
2.25.0
4 years, 8 months