[libvirt] [PATCHv3 0/3] 'autodeflate' attribute for mememory balloon
by Dmitry Andreev
This patch-set adds support for the new feature 'deflate-on-oom'
that has been added to the QEMU virtio memory balloon a month ago.
This feature lets a guest OS deflate balloon on OOM.
With 'deflate-on-oom' enabled virtio balloon will release
it's memory if possible right before an OOM termination of
processes.
QEMU commit with the complete feature description:
http://git.qemu.org/?p=qemu.git;a=commit;h=e3816255bf4b6377bb405331e2ee0d...
v3
* pull head & merge
* reword commit message [1/3] [2/3]
* docs: s/OOM-/Out of Memory / [1/3]
* merge and fix qemu 2.6.0 caps test [2/3]
* s/> 0/ != VIR_TRISTATE_SWITCH_ABSENT/ [3/3]
Dmitry Andreev (3):
conf: introduce 'autodeflate' attribute for memballoon device
qemu: add capability check for memballoon 'deflate-on-oom' feature
qemu: add support of optional 'autodeflate' attribute
docs/formatdomain.html.in | 10 ++
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 23 +++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 11 ++
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 11 ++
tests/qemucapabilitiesdata/caps_1.2.2-1.replies | 68 ++++++++-
tests/qemucapabilitiesdata/caps_1.3.1-1.replies | 68 ++++++++-
tests/qemucapabilitiesdata/caps_1.4.2-1.replies | 68 ++++++++-
tests/qemucapabilitiesdata/caps_1.5.3-1.replies | 66 ++++++++-
tests/qemucapabilitiesdata/caps_1.6.0-1.replies | 66 ++++++++-
tests/qemucapabilitiesdata/caps_1.6.50-1.replies | 66 ++++++++-
tests/qemucapabilitiesdata/caps_2.1.1-1.replies | 78 +++++++++-
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.4.0-1.replies | 146 ++++++++++++++++++-
tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.5.0-1.replies | 161 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-1.replies | 161 ++++++++++++++++++++-
.../qemuxml2argv-balloon-ccw-deflate.args | 20 +++
.../qemuxml2argv-balloon-ccw-deflate.xml | 21 +++
.../qemuxml2argv-balloon-device-deflate-off.args | 23 +++
.../qemuxml2argv-balloon-device-deflate-off.xml | 25 ++++
.../qemuxml2argv-balloon-device-deflate.args | 23 +++
.../qemuxml2argv-balloon-device-deflate.xml | 25 ++++
.../qemuxml2argv-balloon-mmio-deflate.args | 25 ++++
.../qemuxml2argv-balloon-mmio-deflate.xml | 30 ++++
tests/qemuxml2argvtest.c | 9 ++
29 files changed, 1145 insertions(+), 70 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-device-deflate-off.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-device-deflate-off.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-device-deflate.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-device-deflate.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.xml
--
1.8.3.1
8 years, 11 months
[libvirt] [PATCH] qemuProcessCleanupChardevDevice: Don't unlink NULL paths
by Michal Privoznik
So, you try to start a domain, but before we even get to the part
where chardev part of qemu command line is generated (and
possibly missing path to unix sockets is made up) an error occurs
which results in calling qemuProcessStop. This will then try to
clean up the mess and possibly ends up calling unlink(NULL).
==8085== Thread 3:
==8085== Syscall param unlink(pathname) points to unaddressable byte(s)
==8085== at 0xA85EA57: unlink (in /lib64/libc-2.21.so)
==8085== by 0x213D3C24: qemuProcessCleanupChardevDevice (qemu_process.c:2866)
==8085== by 0x558D6B1: virDomainChrDefForeach (domain_conf.c:22924)
==8085== by 0x213DA9AE: qemuProcessStop (qemu_process.c:5326)
==8085== by 0x213DA2F2: qemuProcessStart (qemu_process.c:5190)
==8085== by 0x2142957F: qemuDomainObjStart (qemu_driver.c:7396)
==8085== by 0x214297DB: qemuDomainCreateWithFlags (qemu_driver.c:7450)
==8085== by 0x21429842: qemuDomainCreate (qemu_driver.c:7468)
==8085== by 0x5611B95: virDomainCreate (libvirt-domain.c:6753)
==8085== by 0x125D9A: remoteDispatchDomainCreate (remote_dispatch.h:3613)
==8085== by 0x125CB7: remoteDispatchDomainCreateHelper (remote_dispatch.h:3589)
==8085== by 0x568BF41: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
==8085== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==8085==
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 3d9e0e5..f083f3f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2862,7 +2862,8 @@ qemuProcessCleanupChardevDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
if (dev->source.type == VIR_DOMAIN_CHR_TYPE_UNIX &&
- dev->source.data.nix.listen)
+ dev->source.data.nix.listen &&
+ dev->source.data.nix.path)
unlink(dev->source.data.nix.path);
return 0;
--
2.4.10
8 years, 11 months
[libvirt] [PATCH] qemu: Use memory-object-file when needed
by Martin Kletzander
We were missing a check for '!nodemask' in the condition that decides
whether we need memory-object-file or not. We only used userNodeset,
but forgot that we might need to use nodemask even if that's not set.
Even though there was a test for this, the args file was incorrect, so
it is very nicely visible what this change does function-wise. Even
with that I added the same test but instead of auto nodeset I specified
one in numatune/memory just to make sure it fixes the problem.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_command.c | 3 ++-
.../qemuxml2argv-numatune-auto-prefer.args | 4 ++-
...emuxml2argv-numatune-hugepages-no-memnode.args} | 3 ++-
.../qemuxml2argv-numatune-hugepages-no-memnode.xml | 29 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
5 files changed, 38 insertions(+), 3 deletions(-)
copy tests/qemuxml2argvdata/{qemuxml2argv-numatune-auto-prefer.args => qemuxml2argv-numatune-hugepages-no-memnode.args} (72%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5d3ab3a4eac5..debaea491be8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5238,7 +5238,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
}
/* If none of the following is requested... */
- if (!pagesize && !userNodeset && !memAccess && !nodeSpecified && !force) {
+ if (!pagesize && !userNodeset && !memAccess &&
+ !nodeSpecified && !nodemask && !force) {
/* report back that using the new backend is not necessary
* to achieve the desired configuration */
ret = 1;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args b/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args
index b4c49d44c525..710dae2aaa56 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args
@@ -10,7 +10,9 @@ QEMU_AUDIO_DRV=none \
-M pc \
-m 64 \
-smp 1 \
--numa node,nodeid=0,cpus=0,mem=64 \
+-object memory-backend-ram,id=ram-node0,size=67108864,host-nodes=0-3,\
+policy=preferred \
+-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \
-nographic \
-monitor unix:/tmp/test-monitor,server,nowait \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args b/tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.args
similarity index 72%
copy from tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args
copy to tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.args
index b4c49d44c525..3ee81e9da7be 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.args
@@ -10,7 +10,8 @@ QEMU_AUDIO_DRV=none \
-M pc \
-m 64 \
-smp 1 \
--numa node,nodeid=0,cpus=0,mem=64 \
+-object memory-backend-ram,id=ram-node0,size=67108864,host-nodes=1,policy=bind \
+-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \
-nographic \
-monitor unix:/tmp/test-monitor,server,nowait \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.xml b/tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.xml
new file mode 100644
index 000000000000..83fe891306ce
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.xml
@@ -0,0 +1,29 @@
+<domain type='qemu'>
+ <name>QEMUGuest</name>
+ <uuid>9f4b6512-e73a-4a25-93e8-5307802821ce</uuid>
+ <memory unit='KiB'>65536</memory>
+ <currentMemory unit='KiB'>65536</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <numatune>
+ <memory nodeset='1'/>
+ </numatune>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu>
+ <numa>
+ <cell id='0' cpus='0' memory='65536' unit='KiB'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/kvm</emulator>
+ <controller type='usb' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 7cd8c8e18f0e..1a7cfa3d9de3 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1344,6 +1344,8 @@ mymain(void)
DO_TEST("numatune-auto-nodeset-invalid", NONE);
DO_TEST("numatune-auto-prefer", QEMU_CAPS_OBJECT_MEMORY_RAM,
QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST("numatune-hugepages-no-memnode", QEMU_CAPS_OBJECT_MEMORY_RAM,
+ QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST_FAILURE("numatune-static-nodeset-exceed-hostnode",
QEMU_CAPS_OBJECT_MEMORY_RAM);
DO_TEST_PARSE_ERROR("numatune-memnode-nocpu", NONE);
--
2.7.0
8 years, 11 months
[libvirt] [PATCH 00/12] Centralize more more bits in XML PostParse
by Cole Robinson
There are several qemu and generic domain XML validating/populating
routines that callers need to invoke manually after parsing XML. This
series moves some of these calls into the PostParse handling routines.
Functionally there shouldn't be much change, except for more complete
XML in a few cases where drivers convert their native config formats.
Most of the patches are just moving functions around and verifying
things don't break, but there's some test suite improvements sprinkled
in.
The initial motivation for this series is to put qemuDomainAssignAddresses
into the PostParse call path, since I want that for future patches
tp autofill a user requested <address type='pci'/>
Cole Robinson (12):
domain: separate out function for post parse console compat
domain: separate out function for post parse timer validation
domain: add implicit controllers from post parse
domain: Add virDomainDefAddImplicitDevices
qemu: domain: split out post parse default device handling
qemu: Handle CanonicalizeMachine in post parse
qemu: Handle SecurityManagerVerify in post parse
domain: conf: Export virDomainDefPostParseDevices
tests: qemuxml2xml: Use standard file comparison helpers
tests: qemuxml2xml: Convert some fprintf to VIR_TEST_DEBUG
tests: qemuxml2xml: Wire up QEMUCaps usage
qemu: Assign device addresses in PostParse
src/conf/domain_conf.c | 104 ++++++++++++++-------
src/conf/domain_conf.h | 6 +-
src/libvirt_private.syms | 3 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain.c | 89 ++++++++++++++----
src/qemu/qemu_driver.c | 50 +---------
src/vmx/vmx.c | 2 +-
src/vz/vz_sdk.c | 2 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 4 +-
tests/qemuxml2argvtest.c | 12 +--
.../qemuxml2xmlout-channel-virtio-auto.xml | 9 +-
.../qemuxml2xmlout-disk-scsi-vscsi.xml | 35 +++++++
.../qemuxml2xmlout-panic-pseries.xml | 30 ++++++
.../qemuxml2xmlout-pseries-panic-missing.xml | 4 +-
.../qemuxml2xmlout-pseries-panic-no-address.xml | 4 +-
tests/qemuxml2xmltest.c | 39 +++++---
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 1 +
.../sexpr2xml-fv-serial-dev-2-ports.xml | 1 +
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 1 +
.../sexpr2xml-fv-serial-tcp-telnet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 1 +
.../test-fullvirt-direct-kernel-boot.xml | 1 +
tests/xlconfigdata/test-fullvirt-multiusb.xml | 1 +
tests/xlconfigdata/test-new-disk.xml | 1 +
tests/xlconfigdata/test-spice-features.xml | 1 +
tests/xlconfigdata/test-spice.xml | 1 +
tests/xmconfigdata/test-escape-paths.xml | 1 +
.../xmconfigdata/test-fullvirt-default-feature.xml | 1 +
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 1 +
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 1 +
tests/xmconfigdata/test-fullvirt-localtime.xml | 1 +
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 1 +
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 1 +
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 1 +
.../test-fullvirt-serial-dev-2-ports.xml | 1 +
.../test-fullvirt-serial-dev-2nd-port.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-file.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-null.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 1 +
.../test-fullvirt-serial-tcp-telnet.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 1 +
tests/xmconfigdata/test-fullvirt-sound.xml | 1 +
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 1 +
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 1 +
tests/xmconfigdata/test-fullvirt-utc.xml | 1 +
tests/xmconfigdata/test-no-source-cdrom.xml | 1 +
tests/xmconfigdata/test-pci-devs.xml | 1 +
72 files changed, 315 insertions(+), 136 deletions(-)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-vscsi.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
--
2.5.0
8 years, 11 months
[libvirt] [PATCH] xenconfig: check return value of regcomp
by Jim Fehlig
Commit ec63000a missed checking the return value of regcomp(),
which coverity promptly identified.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/xenconfig/xen_sxpr.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c
index a7a622f..cd6f207 100644
--- a/src/xenconfig/xen_sxpr.c
+++ b/src/xenconfig/xen_sxpr.c
@@ -325,6 +325,7 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
char *trate = NULL;
char *p;
regex_t rec;
+ int err;
char *suffix;
unsigned long long tmp;
int ret = -1;
@@ -336,7 +337,16 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
if (p != NULL)
*p = 0;
- regcomp(&rec, vif_bytes_per_sec_re, REG_EXTENDED|REG_NOSUB);
+ err = regcomp(&rec, vif_bytes_per_sec_re, REG_EXTENDED|REG_NOSUB);
+ if (err != 0) {
+ char error[100];
+ regerror(err, &rec, error, sizeof(error));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Failed to compile regular expression '%s': %s"),
+ vif_bytes_per_sec_re, error);
+ goto cleanup;
+ }
+
if (regexec(&rec, trate, 0, NULL, 0)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid rate '%s' specified"), rate);
--
2.6.1
8 years, 11 months
[libvirt] [PATCH] Xen: use correct domctl version in domaininfolist union
by Jim Fehlig
Commmit fd2e3c4c used the domctl version 8 structure for version 9
in the xen_getdomaininfolist union, resulting in insufficient buffer
size (and subsequent memory corruption) for the GETDOMAININFOLIST
ioctl.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/xen/xen_hypervisor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 431c47a..c1834cb 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -309,7 +309,7 @@ union xen_getdomaininfolist {
struct xen_v2d6_getdomaininfo *v2d6;
struct xen_v2d7_getdomaininfo *v2d7;
struct xen_v2d8_getdomaininfo *v2d8;
- struct xen_v2d8_getdomaininfo *v2d9;
+ struct xen_v2d9_getdomaininfo *v2d9;
};
typedef union xen_getdomaininfolist xen_getdomaininfolist;
--
2.1.4
8 years, 11 months
[libvirt] [PATCH] wireshark: Install into DESTDIR
by Michal Privoznik
Like everything we install, it should be prefixed with DESTDIR.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
m4/virt-wireshark.m4 | 8 ++++----
tools/Makefile.am | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index 199317e..ac2e44c 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -28,20 +28,20 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
dnl Check for system location of wireshark plugins
if test "x$with_wireshark_dissector" != "xno" ; then
if test "x$with_ws_plugindir" = "xcheck" ; then
- ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
+ plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
if test "x$ws_plugindir" = "x" ; then
dnl On some systems the plugindir variable may not be stored within pkg config.
dnl Fall back to older style of constructing the plugin dir path.
- ws_plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
+ plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
fi
elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then
AC_MSG_ERROR([ws-plugindir must be used only with valid path])
else
- ws_plugindir=$with_ws_plugindir
+ plugindir=$with_ws_plugindir
fi
fi
- AC_SUBST([ws_plugindir])
+ AC_SUBST([plugindir])
])
AC_DEFUN([LIBVIRT_RESULT_WIRESHARK],[
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e5c186c..d38d3cb 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -381,6 +381,7 @@ EXTRA_DIST += \
if WITH_WIRESHARK_DISSECTOR
+ws_plugindir = $(DESTDIR)$(plugindir)
ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
wireshark_src_libvirt_la_CPPFLAGS = \
-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS)
--
2.4.10
8 years, 11 months
[libvirt] [PATCH] Expand $(wildcard) correctly
by Michal Privoznik
So after da176bf6b756 and friend we have switched to $(wildcard
some/path/*.xml) instead of enumerating the files explicitly.
This is nice, however it makes distcheck build from VPATH fail.
The reason is that it's is not obvious to what does the wildcard
refer to: srcdir or builddir?
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/Makefile.am | 2 +-
examples/Makefile.am | 6 +++---
include/Makefile.am | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 5f531ea..fb53a45 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -149,7 +149,7 @@ fig = \
migration-unmanaged-direct.fig
schemadir = $(pkgdatadir)/schemas
-schema_DATA = $(wildcard schemas/*.rng)
+schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
EXTRA_DIST= \
apibuild.py genaclperms.pl \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 50fc011..2adcefb 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -16,7 +16,7 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
-FILTERS = $(wildcard xml/nwfilter/*.xml)
+FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
EXTRA_DIST = \
apparmor/TEMPLATE.qemu \
@@ -30,8 +30,8 @@ EXTRA_DIST = \
systemtap/events.stp \
systemtap/rpc-monitor.stp \
$(FILTERS) \
- $(wildcard xml/storage/*.xml) \
- $(wildcard xml/test/*.xml)
+ $(wildcard $(srcdir)/xml/storage/*.xml) \
+ $(wildcard $(srcdir)/xml/test/*.xml)
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir) \
diff --git a/include/Makefile.am b/include/Makefile.am
index b3d2bff..bbf734a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -18,7 +18,7 @@
virincdir = $(includedir)/libvirt
-allheaders = $(wildcard libvirt/*.h)
+allheaders = $(wildcard $(srcdir)/libvirt/*.h)
virinc_HEADERS = $(filter-out libvirt/libvirt-admin.h, $(allheaders))
EXTRA_DIST = libvirt/libvirt-common.h.in
--
2.4.10
8 years, 11 months
[libvirt] [PATCH 0/3] build: drop some nested makefiles
by Cole Robinson
This kills some nested makefiles. They don't hurt much but they are
largely redudant so don't serve much usefulness either. After this we
have a strict two level Makefile hierarchy, which is an easy rule of
thumb to follow.
The first two patches clean up blantantly redundant makesfiles
Patch 3 is a bit trickier with the wireshark plugin, but it's also
more useful to fix since now it can be built in parallel with the
rest of the tools/ directory.
Cole Robinson (3):
build: Kill include/libvirt/Makefile.am
build: Kill docs/schemas/Makefile.am
build: Kill tools/wireshark Makefiles
Makefile.am | 2 +-
configure.ac | 7 ++----
docs/Makefile.am | 10 ++++----
docs/schemas/Makefile.am | 35 ---------------------------
include/Makefile.am | 19 +++++++++++++--
include/libvirt/Makefile.am | 44 ----------------------------------
tools/Makefile.am | 52 ++++++++++++++++++++++++++++++++++++++---
tools/wireshark/Makefile.am | 23 ------------------
tools/wireshark/src/Makefile.am | 49 --------------------------------------
9 files changed, 75 insertions(+), 166 deletions(-)
delete mode 100644 docs/schemas/Makefile.am
delete mode 100644 include/libvirt/Makefile.am
delete mode 100644 tools/wireshark/Makefile.am
delete mode 100644 tools/wireshark/src/Makefile.am
--
2.5.0
8 years, 11 months
[libvirt] [PATCH] testutils: Fix coverity warning with REGENERATE_OUTPUT
by Cole Robinson
- Don't double check for expectName
- actual is always non-NULL by this point, so don't check it either
---
tests/testutils.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/testutils.c b/tests/testutils.c
index 4ffea0c..b587f83 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -469,15 +469,14 @@ virtTestDifferenceFullInternal(FILE *stream,
actualStart = actual;
actualEnd = actual + (strlen(actual)-1);
- if (regenerate && (virTestGetRegenerate() > 0) && expectName && actual) {
+ if (expectName && regenerate && (virTestGetRegenerate() > 0)) {
char *regencontent;
/* Try to properly indent qemu argv files */
if (!(regencontent = virStringReplace(actual, " -", " \\\n-")))
return -1;
- if (expectName && actual &&
- virFileWriteStr(expectName, regencontent, 0666) < 0) {
+ if (virFileWriteStr(expectName, regencontent, 0666) < 0) {
VIR_FREE(regencontent);
return -1;
}
--
2.5.0
8 years, 11 months