[PATCH] vbox_network: fix possible memory leak in vboxNetworkDefineCreateXML()
by Kristina Hanicova
virNetworkDef was not freed if the function failed in the first
two ifs, causing a possible memory leak.
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/vbox/vbox_network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c
index afd2acbb03..d97f571d1b 100644
--- a/src/vbox/vbox_network.c
+++ b/src/vbox/vbox_network.c
@@ -375,7 +375,7 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start)
PRUnichar *networkNameUtf16 = NULL;
char *networkNameUtf8 = NULL;
IHostNetworkInterface *networkInterface = NULL;
- virNetworkDef *def = virNetworkDefParseString(xml, NULL);
+ virNetworkDef *def = NULL;
virNetworkIPDef *ipdef = NULL;
unsigned char uuid[VIR_UUID_BUFLEN];
vboxIID vboxnetiid;
@@ -394,7 +394,7 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start)
VBOX_IID_INITIALIZE(&vboxnetiid);
- if ((!def) ||
+ if (!(def = virNetworkDefParseString(xml, NULL)) ||
(def->forward.type != VIR_NETWORK_FORWARD_NONE) ||
(def->nips == 0 || !def->ips))
goto cleanup;
--
2.31.1
3 years, 4 months
[PATCH] qemu: Label vhostuser net device
by Jim Fehlig
Attaching a newly created vhostuser port to a VM fails due to an
apparmor denial
internal error: unable to execute QEMU command 'chardev-add': Failed
to bind socket to /run/openvswitch/vhu838c4d29-c9: Permission denied
In the case of a net device type VIR_DOMAIN_NET_TYPE_VHOSTUSER, the
underlying chardev is not labeled in qemuDomainAttachNetDevice prior
to calling qemuMonitorAttachCharDev. Label the chardev before calling
qemuMonitorAttachCharDev, and restore the label when removing the
net device.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/qemu/qemu_hotplug.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index c00e8a7852..42e7997112 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1467,6 +1467,11 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
}
if (actualType == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
+ virDomainChrDef chr = { .source = net->data.vhostuser };
+
+ if (qemuSecuritySetChardevLabel(driver, vm, &chr) < 0)
+ goto cleanup;
+
if (qemuMonitorAttachCharDev(priv->mon, charDevAlias, net->data.vhostuser) < 0) {
ignore_value(qemuDomainObjExitMonitor(driver, vm));
virDomainAuditNet(vm, NULL, net, "attach", false);
@@ -4692,6 +4697,8 @@ qemuDomainRemoveNetDevice(virQEMUDriver *driver,
}
if (actualType == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
+ virDomainChrDef chr = { .source = net->data.vhostuser };
+
/* vhostuser has a chardev too */
if (qemuMonitorDetachCharDev(priv->mon, charDevAlias) < 0) {
/* well, this is a messy situation. Guest visible PCI device has
@@ -4699,6 +4706,8 @@ qemuDomainRemoveNetDevice(virQEMUDriver *driver,
* to just ignore the error and carry on.
*/
}
+ if (qemuSecurityRestoreChardevLabel(driver, vm, &chr) < 0)
+ VIR_WARN("Unable to restore security label on vhostuser char device");
} else if (actualType == VIR_DOMAIN_NET_TYPE_VDPA) {
int vdpafdset = -1;
g_autoptr(qemuMonitorFdsets) fdsets = NULL;
--
2.32.0
3 years, 4 months
[PATCH] conf: snapshot/checkpoint: Rewrite 'AlignDisk' logic to appease clang
by Peter Krempa
New clang has a false-positive about value of 'olddisks' being unused
after being set. This is clearly wrong because we want to use
'g_autofree' to clear it later.
While I'm against modifying good code for the sake of bad static
analysis in this case it's not obvious that we depend on the lifetime of
'olddisks' being needed until the end of the function as we store
pointers into it into the hash table and later copy them out.
Rewrite the code by assigning to 'olddisks' earlier and then using
'olddisks' in the loop, so it's clear where the lifetime of the objects
ends, and this should also silence the warning.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/checkpoint_conf.c | 14 ++++++++------
src/conf/snapshot_conf.c | 14 ++++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 4731f21aba..175a95fed7 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -265,6 +265,7 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *chkdef)
virDomainDef *domdef = chkdef->parent.dom;
g_autoptr(GHashTable) map = virHashNew(NULL);
g_autofree virDomainCheckpointDiskDef *olddisks = NULL;
+ size_t oldndisks;
size_t i;
int checkpoint_default = VIR_DOMAIN_CHECKPOINT_TYPE_NONE;
@@ -292,9 +293,14 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *chkdef)
if (!chkdef->ndisks)
checkpoint_default = VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP;
+ olddisks = g_steal_pointer(&chkdef->disks);
+ oldndisks = chkdef->ndisks;
+ chkdef->disks = g_new0(virDomainCheckpointDiskDef, domdef->ndisks);
+ chkdef->ndisks = domdef->ndisks;
+
/* Double check requested disks. */
- for (i = 0; i < chkdef->ndisks; i++) {
- virDomainCheckpointDiskDef *chkdisk = &chkdef->disks[i];
+ for (i = 0; i < oldndisks; i++) {
+ virDomainCheckpointDiskDef *chkdisk = &olddisks[i];
virDomainDiskDef *domdisk = virDomainDiskByName(domdef, chkdisk->name, false);
if (!domdisk) {
@@ -328,10 +334,6 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *chkdef)
}
}
- olddisks = g_steal_pointer(&chkdef->disks);
- chkdef->disks = g_new0(virDomainCheckpointDiskDef, domdef->ndisks);
- chkdef->ndisks = domdef->ndisks;
-
for (i = 0; i < domdef->ndisks; i++) {
virDomainDiskDef *domdisk = domdef->disks[i];
virDomainCheckpointDiskDef *chkdisk = chkdef->disks + i;
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index c765e4c815..fc6f0a859d 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -636,6 +636,7 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef,
virDomainDef *domdef = snapdef->parent.dom;
g_autoptr(GHashTable) map = virHashNew(NULL);
g_autofree virDomainSnapshotDiskDef *olddisks = NULL;
+ size_t oldndisks;
size_t i;
if (!domdef) {
@@ -654,9 +655,14 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef,
if (!domdef->ndisks)
return 0;
+ olddisks = g_steal_pointer(&snapdef->disks);
+ oldndisks = snapdef->ndisks;
+ snapdef->disks = g_new0(virDomainSnapshotDiskDef, domdef->ndisks);
+ snapdef->ndisks = domdef->ndisks;
+
/* Double check requested disks. */
- for (i = 0; i < snapdef->ndisks; i++) {
- virDomainSnapshotDiskDef *snapdisk = &snapdef->disks[i];
+ for (i = 0; i < oldndisks; i++) {
+ virDomainSnapshotDiskDef *snapdisk = &olddisks[i];
virDomainDiskDef *domdisk = virDomainDiskByName(domdef, snapdisk->name, false);
if (!domdisk) {
@@ -708,10 +714,6 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef,
}
}
- olddisks = g_steal_pointer(&snapdef->disks);
- snapdef->disks = g_new0(virDomainSnapshotDiskDef, domdef->ndisks);
- snapdef->ndisks = domdef->ndisks;
-
for (i = 0; i < domdef->ndisks; i++) {
virDomainDiskDef *domdisk = domdef->disks[i];
virDomainSnapshotDiskDef *snapdisk = snapdef->disks + i;
--
2.31.1
3 years, 4 months
[PATCH] virsh-snapshot: Don't leak @then in cmdSnapshotList()
by Michal Privoznik
The variable is used inside a loop in which it' allocated in each
iteration. Bring it inside the loop so that g_autoptr() kicks in
each iteration.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virsh-snapshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index ee99d0e061..e08ecb6910 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -1439,7 +1439,6 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
size_t i;
virDomainSnapshotPtr snapshot = NULL;
long long creation_longlong;
- g_autoptr(GDateTime) then = NULL;
bool tree = vshCommandOptBool(cmd, "tree");
bool name = vshCommandOptBool(cmd, "name");
bool from = vshCommandOptBool(cmd, "from");
@@ -1533,6 +1532,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
}
for (i = 0; i < snaplist->nsnaps; i++) {
+ g_autoptr(GDateTime) then = NULL;
g_autofree gchar *thenstr = NULL;
g_autoptr(xmlDoc) xml = NULL;
g_autoptr(xmlXPathContext) ctxt = NULL;
--
2.31.1
3 years, 4 months
[PATCH 0/5] Allow freepage/allocpages on numactl-less builds
by Michal Privoznik
See 3/5 for explanation.
Michal Prívozník (5):
conf: Introduce virCapabilitiesHostNUMAGetMaxNode()
virhostmem: Let caller pass max NUMA node to virHostMemGetFreePages
virhostmem: Let caller pass max NUMA node to virHostMemAllocPages
virhostmem: Handle numactl-less build in hugepages
allocation/reporting
rpm: Enable numactl on s390x
libvirt.spec.in | 2 +-
src/conf/capabilities.c | 9 +++++++++
src/conf/capabilities.h | 2 ++
src/libvirt_private.syms | 1 +
src/lxc/lxc_driver.c | 23 +++++++++++++++++++++--
src/qemu/qemu_driver.c | 23 +++++++++++++++++++++--
src/util/virhostmem.c | 24 ++++++++++++++++++------
src/util/virhostmem.h | 2 ++
src/vbox/vbox_common.c | 20 +++++++++++++++++---
9 files changed, 92 insertions(+), 14 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH v2 0/3] docs/about: some documentation clean-up/fix
by Yanan Wang
This series makes some clean-up and fix for docs/about, including removing
the duplicated section, unifying the subject format, and adding the missed
release record in the subject.
v1->v2:
- update the commit message, combined with Cornelia's comment
- add the missing release record in the subject (patch #3)
- v1: https://lore.kernel.org/qemu-devel/20210820015628.173532-1-wangyanan55@hu...
Yanan Wang (3):
docs/about: Remove the duplicated doc
docs/about: Unify the subject format
docs/about: Add the missing release record in the subject
docs/about/deprecated.rst | 56 ++++++++++++++++-----------------
docs/about/removed-features.rst | 45 ++++++++++----------------
2 files changed, 44 insertions(+), 57 deletions(-)
--
2.19.1
3 years, 4 months
[libvirt][PATCH v6 0/6] Support query and use SGX
by Haibin Huang
This patch series provides support for enabling Intel's Software Guard Extensions (SGX) feature in guest VM.
Giving the SGX support in QEMU is still pending for reviewing, this
patch series is not submmited for code review, but only describe the
SGX enabling solution design that contains changes to virConnectGetDomainCapabilities API response and domain definition. All comments/suggestions would be highly appreciated.
Intel Software Guard Extensions (Intel® SGX) is a set of instructions
that increases the security of application code and data, giving them
more protection from disclosure or modification. Developers can partition sensitive information into enclaves, which are areas of execution in memory with more security protection.
The typical flow looks below at very high level:
1. Calls virConnectGetDomainCapabilities API to domain capabilities that includes the following SGX information.
<feature>
...
<sgx supported='yes'>
<epc_size unit=’KiB’>N</epc_size>
</sgx>
</feature>
2. User requests to start a guest calling virCreateXML() with SGX requirement.
It should contain
<devices>
...
<memory model='sgx-epc'>
<target>
<size unit='KiB'>N</size>
</target>
</memory>
...
</devices>
Haibin Huang (3):
Support to query SGX capability
Add dommaincaps unit test
add qemu capabilities version 5.2.0
Lin Yang (3):
conf: Introduce SGX EPC element into device memory xml
qemu: Add command-line to generate SGX EPC memory backend
Add unit tests for guest VM creation command with SGX EPC
docs/schemas/domaincaps.rng | 17 +
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_capabilities.c | 29 +
src/conf/domain_capabilities.h | 13 +
src/conf/domain_conf.c | 4 +
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 2 +-
src/qemu/qemu_alias.c | 8 +-
src/qemu/qemu_capabilities.c | 146 +
src/qemu/qemu_capabilities.h | 6 +
src/qemu/qemu_command.c | 42 +-
src/qemu/qemu_domain.c | 10 +-
src/qemu/qemu_monitor.c | 10 +
src/qemu/qemu_monitor.h | 3 +
src/qemu/qemu_monitor_json.c | 91 +
src/qemu/qemu_monitor_json.h | 3 +
src/security/security_apparmor.c | 1 +
src/security/security_dac.c | 2 +
src/security/security_selinux.c | 2 +
tests/domaincapsdata/bhyve_basic.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_uefi.x86_64.xml | 1 +
tests/domaincapsdata/empty.xml | 1 +
tests/domaincapsdata/libxl-xenfv.xml | 1 +
tests/domaincapsdata/libxl-xenpv.xml | 1 +
.../domaincapsdata/qemu_1.5.3-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.5.3-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.5.3.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.6.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.6.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.6.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.7.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.7.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.7.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.1.1-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.1.1-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.1.1.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.10.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml | 1 +
.../qemu_2.10.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.11.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 1 +
.../qemu_2.12.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.4.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.5.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml | 1 +
.../qemu_2.6.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 1 +
.../qemu_4.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 +
.../qemu_4.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 +
.../qemu_5.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 207 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 201 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 207 +
.../caps_5.2.0.x86_64.replies | 29649 ++++++++++++++++
.../caps_5.2.0.x86_64.xml | 3189 ++
.../sgx-epc.x86_64-5.1.0.args | 41 +
tests/qemuxml2argvdata/sgx-epc.xml | 40 +
tests/qemuxml2argvtest.c | 1 +
123 files changed, 34013 insertions(+), 9 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_5.2.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
create mode 100644 tests/qemuxml2argvdata/sgx-epc.x86_64-5.1.0.args
create mode 100644 tests/qemuxml2argvdata/sgx-epc.xml
--
2.17.1
3 years, 4 months
Questions about the ownership of /var/cache/libvirt/qemu
by Peng Liang
Hi all,
When we change the user for QEMU process (change "user" and "group" in
/etc/libvirt/qemu.conf) to a normal user, we found that libvirtd will
also change the ownership of /var/cache/libvirt/qemu but will keep the
ownership of /var/cache/libvirt/qemu/capabilities as root.
Is it secure to put files/directories owned by root in a directory
owned by a normal user? Could the normal user replace the root's file
with a new one? Does it need to set sticky bit on
/var/cache/libvirt/qemu or keep the ownership of /var/cache/libvirt/qemu
as root?
3 years, 4 months
[libvirt PATCH 0/9] tests: cputest: use g_auto more (glib chronicles)
by Ján Tomko
Also improve the compilation times (unoptimized optimization routines
take too long when there are too many branches in a function, which
is the case of cputest's main) and switch qemuxml2* to use the same
approach.
Ján Tomko (9):
qemu: monitor: define cleanup function for qemuMonitorCPUModelInfo
tests: use g_auto in cpuTestMakeQEMUCaps
tests: cputest: use g_auto for virQEMUCaps
tests: cputest: use g_auto for virCPUData
tests: cputest: use g_auto for virCPUDef
tests: cputest: use g_autofree
tests: cputest: remove unnecessary labels
tests: cputests: introduce and use virTestRunLog
tests: qemuxml2*test: switch to virRunTestLog
src/qemu/qemu_monitor.h | 1 +
tests/cputest.c | 239 +++++++++++-----------------------
tests/qemustatusxml2xmltest.c | 3 +-
tests/qemuxml2argvtest.c | 10 +-
tests/qemuxml2xmltest.c | 9 +-
tests/testutils.c | 30 +++++
tests/testutils.h | 4 +
tests/testutilsqemu.h | 1 -
8 files changed, 114 insertions(+), 183 deletions(-)
--
2.31.1
3 years, 4 months