[libvirt] [PATCH] Support apparmor in RPM spec
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If libapparmor-devel happens to be installed when building the
RPM, it will failed due to unlisted virt-aa-helper in %files.
Add support for apparmor in the spec, so that we can explicitly
turn it on/off, defaulting to off in all distros. This causes
--without-apparmor to be given to configure, preventing the
build failures if the user happens to have libapparmor-devel
present.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt.spec.in | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a3a831f..6212b3c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -100,6 +100,9 @@
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
+# Just hardcode to off, since few people ever have apparmor RPMs installed
+%define with_apparmor 0%{!?_without_apparmor:0}
+
# A few optional bits off by default, we enable later
%define with_polkit 0%{!?_without_polkit:0}
%define with_capng 0%{!?_without_capng:0}
@@ -472,6 +475,9 @@ BuildRequires: avahi-devel
%if %{with_selinux}
BuildRequires: libselinux-devel
%endif
+%if %{with_apparmor}
+BuildRequires: libapparmor-devel
+%endif
%if %{with_network}
BuildRequires: dnsmasq >= 2.41
BuildRequires: iptables
@@ -1268,6 +1274,10 @@ of recent versions of Linux (and other OSes).
%define _without_selinux --without-selinux
%endif
+%if ! %{with_apparmor}
+ %define _without_apparmor --without-apparmor
+%endif
+
%if ! %{with_hal}
%define _without_hal --without-hal
%endif
@@ -1367,6 +1377,7 @@ of recent versions of Linux (and other OSes).
%{?_without_netcf} \
%{?_without_selinux} \
%{?_with_selinux_mount} \
+ %{?_without_apparmor} \
%{?_without_hal} \
%{?_without_udev} \
%{?_without_yajl} \
@@ -1835,6 +1846,11 @@ fi
%endif
%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
+
+ %if %{with_apparmor}
+%attr(0755, root, root) %{_libexecdir}/virt-aa-helper
+ %endif
+
%attr(0755, root, root) %{_sbindir}/libvirtd
%attr(0755, root, root) %{_sbindir}/virtlockd
--
1.8.3.1
11 years, 4 months
[libvirt] [PATCH] Delete obsolete / unused python test files
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The python/tests directory contains a number of so called
"tests" for the python API. These are all hardcoded to
look for Xen and cannot be run in any automated fashion,
and no one is ever manually running them. Given that they
don't meaningully contribute to the test coverage, delete
them.
For some reason these tests were also copied into the
filesystem as part of 'make install'. The change to the
RPM in commit 3347a4203278ec93d7b0ceb88b5ed10e4f14765c
caused a build failure, since it removed the code which
deleted these installed tests.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
configure.ac | 2 +-
python/Makefile.am | 2 -
python/tests/Makefile.am | 52 -----------------
python/tests/basic.py | 31 ----------
python/tests/create.py | 146 -----------------------------------------------
python/tests/error.py | 42 --------------
python/tests/node.py | 34 -----------
python/tests/uuid.py | 41 -------------
8 files changed, 1 insertion(+), 349 deletions(-)
delete mode 100644 python/tests/Makefile.am
delete mode 100755 python/tests/basic.py
delete mode 100755 python/tests/create.py
delete mode 100755 python/tests/error.py
delete mode 100755 python/tests/node.py
delete mode 100755 python/tests/uuid.py
diff --git a/configure.ac b/configure.ac
index 35a5d76..084d864 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2447,7 +2447,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
libvirt.pc libvirt.spec mingw-libvirt.spec \
po/Makefile.in \
include/libvirt/Makefile include/libvirt/libvirt.h \
- python/Makefile python/tests/Makefile \
+ python/Makefile \
daemon/Makefile \
tools/Makefile \
tests/Makefile \
diff --git a/python/Makefile.am b/python/Makefile.am
index 7eb42c6..925e1f4 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -16,8 +16,6 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
-SUBDIRS= . tests
-
INCLUDES = \
$(PYTHON_INCLUDES) \
-I$(top_builddir)/gnulib/lib \
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
deleted file mode 100644
index 0fd3c78..0000000
--- a/python/tests/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
-##
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library. If not, see
-## <http://www.gnu.org/licenses/>.
-
-EXAMPLE_DIR = $(datadir)/doc/libvirt-python-$(VERSION)/examples
-
-PYTESTS= \
- basic.py \
- create.py \
- uuid.py \
- error.py \
- node.py
-
-EXTRA_DIST = $(PYTESTS)
-
-if WITH_PYTHON
-tests: $(PYTESTS)
- @echo "## running Python regression tests"
- -@(PYTHONPATH="..:../.libs:../src/.libs:$(srcdir)/../src:$$PYTHONPATH";\
- export PYTHONPATH; \
- LD_LIBRARY_PATH="$(top_builddir)/src/.libs:$$LD_LIBRARY_PATH" ; \
- export LD_LIBRARY_PATH; \
- for test in $(PYTESTS) ; \
- do log=`$(PYTHON) $(srcdir)/$$test` ; \
- if [ "`echo $$log | grep OK`" = "" ] ; then \
- echo "-- $$test" ; echo "$$log" ; fi ; done)
-else
-tests:
-endif
-
-clean:
- rm -f *.pyc core
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
- -(for test in $(PYTESTS); \
- do $(INSTALL) -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
-
-uninstall-local:
- for test in $(PYTESTS); do rm -f $(DESTDIR)$(EXAMPLE_DIR)/$$test; done
diff --git a/python/tests/basic.py b/python/tests/basic.py
deleted file mode 100755
index c6dec81..0000000
--- a/python/tests/basic.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/python -u
-import libvirt
-import sys
-import os
-
-if not os.access("/proc/xen", os.R_OK):
- print 'System is not running a Xen kernel'
- sys.exit(1)
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-# print conn
-
-try:
- dom0 = conn.lookupByName("Domain-0")
-except:
- print 'Failed to find the main domain'
- sys.exit(1)
-
-# print dom0
-
-print "Domain 0: id %d running %s" % (dom0.ID(), dom0.OSType())
-print dom0.info()
-del dom0
-del conn
-print "OK"
-
-sys.exit(0)
diff --git a/python/tests/create.py b/python/tests/create.py
deleted file mode 100755
index 815ccc4..0000000
--- a/python/tests/create.py
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/python -u
-import libvirt
-import sys
-import os
-import time
-
-if not os.access("/proc/xen", os.R_OK):
- print 'System is not running a Xen kernel'
- sys.exit(1)
-
-#
-# Try to provide default OS images paths here, of course non standard
-#
-osroots = [
- "/u/fc4-2.img",
- "/u/fc4.img",
- "/xen/fc4.img",
-]
-
-okay = 1
-
-osroot = None
-for root in osroots:
- if os.access(root, os.R_OK):
- osroot = root
- break
-
-if osroot == None:
- print "Could not find a guest OS root, edit to add the path in osroots"
- sys.exit(1)
-
-kernel=open("/proc/version").read().split()
-kernelOv = kernel[2]
-
-if kernelOv.find('hypervisor'):
- kernelU = "/boot/vmlinuz-" + kernelOv.replace('hypervisor', 'guest')
- initrdU = "/boot/initrd-" + kernelOv.replace('hypervisor', 'guest') + ".img"
-elif kernelOv.find('xen0'):
- kernelU = "/boot/vmlinuz-" + kernelOv.replace('xen0', 'xenU')
- initrdU = "/boot/initrd-" + kernelOv.replace('xen0', 'xenU') + ".img"
-
-if not os.access(kernelU, os.R_OK):
- print "Did not find the guest kernel %s" % (kernelU)
- sys.exit(1)
-
-kernelU = "<kernel>" + kernelU + "</kernel>"
-
-if not os.access(initrdU, os.R_OK):
- print "Did not find the guest initrd %s" % (initrdU)
- initrdU = ""
-else:
- initrdU = "<initrd>" + initrdU + "</initrd>"
-
-
-conn = libvirt.open(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-xmldesc="""<domain type='xen'>
- <name>test</name>
- <os>
- <type>linux</type>
-""" + kernelU + initrdU + """
- <cmdline> root=/dev/sda1 ro selinux=0 3</cmdline>
- </os>
- <memory>131072</memory>
- <vcpu>1</vcpu>
- <devices>
- <disk type='file'>
- <source file='%s'/>
- <target dev='sda1'/>
- </disk>
- <interface type='bridge'>
- <source bridge='xenbr0'/>
- <mac address='aa:00:00:00:00:12'/>
- <script path='/etc/xen/scripts/vif-bridge'/>
- </interface>
- </devices>
-</domain>
-""" % (osroot)
-
-dom = conn.createLinux(xmldesc, 0)
-if dom == None:
- print 'Failed to create a test domain'
- sys.exit(1)
-
-# print dom
-
-print "Domain: id %d running %s" % (dom.ID(), dom.OSType())
-
-print "Suspending test domain for 5 seconds"
-if dom.suspend() != 0:
- print 'Failed to suspend domain test'
- dom.destroy()
- del dom
- del conn
- sys.exit(1)
-
-infos = dom.info()
-time.sleep(5)
-infos2 = dom.info()
-if infos[4] != infos2[4]:
- print 'Suspended domain test got CPU cycles'
- okay = 0
-
-print "resuming test domain for 10 seconds"
-if dom.resume() != 0:
- print 'Failed to resume domain test'
- dom.destroy()
- del dom
- del conn
- sys.exit(1)
-
-time.sleep(10)
-print "shutdown of test domain"
-
-if dom.shutdown() != 0:
- okay = 0
- print 'Failed to shutdown domain test'
-
-i = 0
-while i < 30:
- time.sleep(1)
- i = i + 1
- try:
- t = dom.info()[4]
- except:
- okay = 0
- t = -1
- break
-
- if t == 0:
- break
-
-if t != 0:
- print 'Shutdown failed destroying domain test'
- okay = 0
- dom.destroy()
-
-del dom
-del conn
-if okay == 1:
- print "OK"
-
-sys.exit(0)
diff --git a/python/tests/error.py b/python/tests/error.py
deleted file mode 100755
index 295f9a7..0000000
--- a/python/tests/error.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/python -u
-#
-# Tests global error handlers at the python level.
-#
-import libvirt
-import sys
-import os
-
-errno = None
-
-def handler(ctxt, err):
- global errno
-
- #print "handler(%s, %s)" % (ctxt, err)
- errno = err
-
-libvirt.registerErrorHandler(handler, 'context')
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-try:
- dom0 = conn.lookupByName("Does_not_exist")
- print 'strange found a Does_not_exist domain'
- sys.exit(1)
-except:
- pass
-
-del conn
-
-if errno == None:
- print 'failed to get an error'
-elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \
- errno[0] == libvirt.VIR_ERR_INVALID_DOMAIN or \
- errno[0] == libvirt.VIR_ERR_GET_FAILED:
- print "OK"
-else:
- print 'got unexpected error:', errno
-
-sys.exit(0)
diff --git a/python/tests/node.py b/python/tests/node.py
deleted file mode 100755
index f199fc3..0000000
--- a/python/tests/node.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python -u
-import libvirt
-import sys
-import os
-
-if not os.access("/proc/xen", os.R_OK):
- print 'System is not running a Xen kernel'
- sys.exit(1)
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-try:
- (model, memory, cpus, mhz, nodes, socket, cores, threads) = conn.getInfo()
-except:
- print 'Failed to extract the current node information'
- sys.exit(1)
-
-print "Xen running on %d %s processors at %d MHz, %d MBytes of memory" % (
- cpus, model, mhz, memory)
-
-if cpus > nodes * socket * cores * threads:
- print "Erroneous CPU information"
- sys.exit(1)
-
-if cpus < nodes * socket * cores * threads:
- print "Strange, running in degrated mode, some CPU are not available"
-
-del conn
-print "OK"
-
-sys.exit(0)
diff --git a/python/tests/uuid.py b/python/tests/uuid.py
deleted file mode 100755
index db48e80..0000000
--- a/python/tests/uuid.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/python -u
-import libvirt
-import sys
-import os
-
-if not os.access("/proc/xen", os.R_OK):
- print 'System is not running a Xen kernel'
- sys.exit(1)
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-ids = conn.listDomainsID()
-if ids == None or len(ids) == 0:
- print 'Failed to list running domains'
- sys.exit(1)
-
-id = ids[-1]
-
-try:
- dom = conn.lookupByID(id)
-except:
- print 'Failed to find the domain %d'
- sys.exit(1)
-
-name0 = dom.name()
-uuid = dom.UUID()
-print "Using domain %s" % (name0)
-try:
- dom2 = conn.lookupByUUID(uuid)
-except:
- print 'Failed to lookup domain %d based on its UUID'
- sys.exit(1)
-if dom2.name() != name0:
- print 'lookup of %s based on UUID brings a different domain %s' % (
- name0, dom2.name())
-
-print "OK"
-sys.exit(0)
--
1.8.3.1
11 years, 4 months
[libvirt] Release of libvirt-1.1.1
by Daniel Veillard
As planned the release is out, tagged in git and available
at the usual place:
ftp://libvirt.org/libvirt/
This is a rather large release, including around 380 commits (time
to take some vacations !) with a large set of bug fixes, including
3 CVE security ones, and large improvements over the code base.
The localization got updates for no less then 18 languages too,
with 8 of them being nearly 100% complete !
Features:
- Adding device removal or deletion events (Jiri Denemark)
- Introduce new domain create APIs to pass pre-opened FDs to LXC (Daniel P. Berrange)
- Add interface versions for Xen 4.3 (Stefan Bader)
- Add new public API virDomainSetMemoryStatsPeriod (John Ferlan)
- Various LXC improvements (Daniel P. Berrange and Gao feng)
Security:
- security: fix deadlock with prefork (Eric Blake)
- CVE-2013-4153 qemu: Fix double free of returned JSON array in qemuAgentGetVCPUs() (Peter Krempa)
- CVE-2013-4154 qemu: Prevent crash of libvirtd without guest agent configuration (Alex Jia)
- CVE-2013-2230 Fix crash when multiple event callbacks were registered (Ján Tomko)
Documentation:
- formatdomain.html.in: Document implementation limitation of QoS (Michal Privoznik)
- formatdomain.html.in: Correctly use <code/> in #elementQoS (Michal Privoznik)
- Fix copy-paste-error in virNodeGetMemoryStats (Philipp Hahn)
- virsh: Mention --driver in man page for nodedev-detach (Peter Krempa)
- maint: tweak use of <a> in HACKING (Eric Blake)
- maint: fix typo in qemu error message (Eric Blake)
- daemon: Fix command example in libvirtd.sasl (Cole Robinson)
- Put virt-sanlock-cleanup into section 8 (Guido Günther)
- Document hypervisor drivers that support certain timer models (Peter Krempa)
Portability:
- build: fix shunloadtest breakage (Eric Blake)
- examples: fix mingw build vs. printf (Eric Blake)
- build: skip systemd mock on non-Linux (Eric Blake)
- Fix dbus message reading code on big endian hosts (Daniel P. Berrange)
- build: fix another virdbus issue on mingw (Eric Blake)
- build: fix virutil build on mingw (Eric Blake)
- build: fix virthread build on mingw (Eric Blake)
- build: fix virdbus build on mingw (Eric Blake)
- build: fix vircgroup build on mingw (Eric Blake)
- Conditionalize build of virCgroupValidateMachineGroup (Daniel P. Berrange)
- build: fix VPATH 'make check' (Eric Blake)
- cpu: Fix one compile error for PPC. (Li Zhang)
- virdbustest: Don't pass number of arguments as long long (Guido Günther)
- Fix virCgroupAvailable() w/o HAVE_GETMNTENT_R defined (Roman Bogorodskiy)
- Fix link_addr detection (Roman Bogorodskiy)
- build: work around broken kernel headers (Eric Blake)
- dbus: work with older dbus (Eric Blake)
- Use AC_LINK_IFELSE (Guido Günther)
- Check for link_addr more thoroughly (Guido Günther)
- Fix bridge routines detection on kFreeBSD (Roman Bogorodskiy)
- Fix build with clang (Ján Tomko)
- build: don't ship access syms files in tarball (Eric Blake)
- build: work around mingw header pollution (Eric Blake)
- build: avoid build failure without gnutls (Eric Blake)
Bug Fixes:
- Fix probing of legacy Xen driver to not leave URI set (Daniel P. Berrange)
- caps: use -device for primary video when qemu >=1.6 (Guannan Ren)
- Resolve Coverity complaint in storagevolxml2argvtest (Ján Tomko)
- Don't check validity of missing attributes in DNS SRV XML (Ján Tomko)
- Set the number of elements 0 in virNetwork*Clear (Ján Tomko)
- conf:Fix a copy paste error (Alex Jia)
- virLXCMonitorClose: Unlock domain while closing monitor (Michal Privoznik)
- libxl: Correctly initialize vcpu bitmap (Stefan Bader)
- Add new virAuth symbols to private.syms (Ján Tomko)
- Use qemuOpenFile in qemu_driver.c (Martin Kletzander)
- Make qemuOpenFile aware of per-VM DAC seclabel. (Martin Kletzander)
- domain_event: Resolve memory leak found by Valgrind (John Ferlan)
- lxc: Resolve Coverity warning (John Ferlan)
- qemu: Take error path if acquiring of job fails in qemuDomainSaveInternal (Peter Krempa)
- build: fix make rpm failure (Laine Stump)
- virsh: fix change-media bug on disk block type (Guannan Ren)
- tests: Free test at the end of GetDeviceAliases JSON test (Jiri Denemark)
- vmware: Fix bogus CPU arch copy (Jiri Denemark)
- qemu: Shorten SCSI hostdev alias to avoid QEMU failure (Viktor Mihajlovski)
- Add virtio-scsi to fallback models of scsi controller (Martin Kletzander)
- qemuhotplugtest: Resolve some memleaks (Michal Privoznik)
- qemuDomainDetachChrDevice: Don't leak @charAlias (Michal Privoznik)
- Fix impl of virDomainCreateWithFlags remote client helper (Daniel P. Berrange)
- cgroup: reuse buffer for getline (Ján Tomko)
- Create directory for lease files if it's missing (Guido Günther)
- rbd: Do not free the secret if it is not set (Wido den Hollander)
- Make logical pools independent on target path (Martin Kletzander)
- qemu: add macvlan delete to qemuDomainAttachNetDevice cleanup (Matthew Rosato)
- qemuBuildChrDeviceCommandLine: Don't leak devstr (Michal Privoznik)
- conf: reject pci-root controllers with non-zero indexes (Ján Tomko)
- nodeinfo: Don't fail on non-contiguous NUMA topologies (hejia hejia)
- util: make virSetUIDGID async-signal-safe (Eric Blake)
- qemu_hostdev: Resolve Coverity issue (John Ferlan)
- storage_backend: Resolve Coverity issue (John Ferlan)
- virsh-nodedev: Resolve Coverity issues (John Ferlan)
- virsh-interface: Resolve Coverity issues (John Ferlan)
- virsh-domain-monitor: Resolve Coverity issues (John Ferlan)
- testutils: Resolve Coverity issues (John Ferlan)
- hellolibvirt: Resolve Coverity issues (John Ferlan)
- storage: return -1 when fs pool can't be mounted (Ján Tomko)
- qemu: fix double free in qemuMigrationPrepareDirect (Ján Tomko)
- Properly detect VMDK with internal version 2 (Martin Kletzander)
- Resolve Coverity complaints in tests/securityselinuxlabeltest.c (John Ferlan)
- Paused domain should remain paused after migration (Jiri Denemark)
- conf: don't check hyperv spinlock retries if disabled (Ján Tomko)
- Fix NULL dereference caused by ACL filtering of domains (Jiri Denemark)
- Unlock the storage volume object after looking it up (Ján Tomko)
- libxl: fix deadlock in libxlReconnectDomain (Marek Marczykowski-Górecki)
- LXC: fix memory leak when userns configuration is incorrect (Gao feng)
- virNetDevBandwidthUnplug: Don't leak @cmd (Michal Privoznik)
- virCgroupNewPartition: Don't leak @newpath (Michal Privoznik)
- qemuNodeDeviceDetachFlags: Avoid use of uninitialized variables (Michal Privoznik)
- qemu: fix return value of qemuDomainBlockPivot on errors (Ján Tomko)
Improvements:
- tests: consistently use virFilePrintf (Eric Blake)
- Rename VIR_DOMAIN_PAUSED_GUEST_PANICKED to VIR_DOMAIN_PAUSED_CRASHED (Daniel P. Berrange)
- Remove VIR_DOMAIN_SHUTDOWN_CRASHED from public API (Daniel P. Berrange)
- spec: Cat test-suite.log if make check fails (Jiri Denemark)
- build: avoid uninitialized use warning (Eric Blake)
- Set default partition in libvirtd instead of libvirt_lxc (Daniel P. Berrange)
- virStateDriver - Separate AutoStart from Initialize (John Ferlan)
- Separate out StateAutoStart from StateInitialize (John Ferlan)
- Remove redundant free in virNetworkDNSHostDefParseXML (Ján Tomko)
- Remove double space in error messages (Ján Tomko)
- Fix virsh snapshot-list error reporting (Jim Fehlig)
- Skip detecting placement if controller is disabled (Daniel P. Berrange)
- Add 'controllers' arg to virCgroupNewDetect (Daniel P. Berrange)
- Fix detection of 'emulator' cgroup (Daniel P. Berrange)
- Make virCgroupIsValidMachine static (Daniel P. Berrange)
- Introduce a more convenient virCgroupNewDetectMachine (Daniel P. Berrange)
- Add inputpool to storagevolxml2argvtest (Ján Tomko)
- Move volume XMLs out of storagevolxml2argvdata (Ján Tomko)
- Move pool XML out of storagevolxml2argvdata (Ján Tomko)
- Use separate macros for failure/success in vol-to-argv test (Ján Tomko)
- tests: PCI controller checks (Ján Tomko)
- Don't overwrite errors in qemuTranslateDiskSourcePool (Ján Tomko)
- Protection against doing bad stuff to the root group (Daniel P. Berrange)
- Convert LXC driver to use virCgroupNewMachine (Daniel P. Berrange)
- Convert QEMU driver to use virCgroupNewMachine (Daniel P. Berrange)
- New cgroups API for atomically creating machine cgroups (Daniel P. Berrange)
- Add a colon after 'internal error' (Ján Tomko)
- Expose ownership ID parsing (Martin Kletzander)
- qemu: set/validate slot/connection type when assigning slots for PCI devices (Laine Stump)
- qemu: make QEMU_PCI_ADDRESS_(SLOT|FUNCTION)_LAST less misleading (Laine Stump)
- qemu: only check for PIIX3-specific device addrs on pc-* machinetypes (Laine Stump)
- qemu: turn qemuDomainPCIAddressBus into a struct (Laine Stump)
- valgrind.supp: Add more valgrind suppression paths (John Ferlan)
- Create + setup cgroups atomically for LXC process (Daniel P. Berrange)
- Create + setup cgroups atomically for QEMU process (Daniel P. Berrange)
- Remove obsolete cgroups creation apis (Daniel P. Berrange)
- Auto-detect existing cgroup placement (Daniel P. Berrange)
- Add API for checking if a cgroup is valid for a domain (Daniel P. Berrange)
- Add a virCgroupNewDetect API for finding cgroup placement (Daniel P. Berrange)
- Add logic for handling systemd-machined non-existance (Daniel P. Berrange)
- Fix handling of DBus errors emitted by the bus itself (Daniel P. Berrange)
- storage: Add connection for autostart storage pool (John Ferlan)
- Adjust 'ceph' authentication secret usage for rbd pool. (John Ferlan)
- storage: Support "chap" authentication for iscsi pool (John Ferlan)
- qemu_common: Create qemuBuildVolumeString() to process storage pool (John Ferlan)
- qemu: Create a common qemuGetSecretString (John Ferlan)
- qemu: Add source pool auth info to virDomainDiskDef for iSCSI (John Ferlan)
- bridge driver: use more general function names (Roman Bogorodskiy)
- Add virDBusMessage(Encode,Decode) stubs (Roman Bogorodskiy)
- qemu: Translate the volume type disk source before cgroup setting (Osier Yang)
- conf: Ignore the volume type disk if its mode is "direct" (Osier Yang)
- qemu: Translate the iscsi pool/volume disk source (John Ferlan)
- conf: Introduce virDomainDiskSourceIsBlockType (John Ferlan)
- conf: Introduce new XML tag "mode" for disk source (John Ferlan)
- storage_iscsi: Reflect the default target port (John Ferlan)
- bridge driver: s/network_driver/virNetworkDriverState/ (Roman Bogorodskiy)
- Convert remainder of cgroups code to report errors (Daniel P. Berrange)
- Convert the virCgroupKill* APIs to report errors (Daniel P. Berrange)
- Report full errors from virCgroupNew* (Daniel P. Berrange)
- Add helpers for dealing with system errors (Daniel P. Berrange)
- Add API for calling systemd-machined's DBus API (Daniel P. Berrange)
- Introduce virDBusCallMethod & virDBusMessageRead methods (Daniel P. Berrange)
- cpu: Let explicit features override model features (Jiri Denemark)
- cpu: Store arch in virCPUData (Jiri Denemark)
- Replace union cpuData with virCPUData (Jiri Denemark)
- cpu_x86: Use x86-specific CPU data structure (Jiri Denemark)
- LXC: Set default driver for image backed filesystems (Daniel P. Berrange)
- LXC: Fix some error reporting in filesystem setup (Daniel P. Berrange)
- qemu: Unplug devices that disappeared when libvirtd was down (Jiri Denemark)
- qemu: Introduce qemuMonitorGetDeviceAliases (Jiri Denemark)
- conf: Make error reporting in virDomainDefFindDevice optional (Jiri Denemark)
- util: Non-existent string array does not contain any string (Jiri Denemark)
- Change s/i/iv/ in test code to avoid syntax-check (Daniel P. Berrange)
- Allow test cases to be run selectively (Daniel P. Berrange)
- maint: update to latest gnulib (Eric Blake)
- autogen: Handle case when libvirt's submodule (Michal Privoznik)
- security_dac: compute supplemental groups before fork (Eric Blake)
- security: framework for driver PreFork handler (Eric Blake)
- qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events (Jiri Denemark)
- qemu: Remove devices only after DEVICE_DELETED event (Jiri Denemark)
- qemu: Add support for DEVICE_DELETED event (Jiri Denemark)
- Add virDomainDefFindDevice for looking up a device by its alias (Jiri Denemark)
- Clarify virDomainDetachDeviceFlags documentation (Jiri Denemark)
- examples: Handle VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event (Jiri Denemark)
- Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event (Jiri Denemark)
- qemu: Separate char device removal into a standalone function (Jiri Denemark)
- qemu: Set cpuset.cpus for domain process (Osier Yang)
- caps: Add helpers to convert NUMA nodes to corresponding CPUs (Peter Krempa)
- Introduce lxcDomObjFromDomain (Michal Privoznik)
- Remove lxcDriverLock from almost everywhere (Michal Privoznik)
- lxc: Make activeUsbHostdevs use locks (Michal Privoznik)
- Stop accessing driver->caps directly in LXC driver (Michal Privoznik)
- lxc: switch to virCloseCallbacks API (Michal Privoznik)
- Introduce annotations for virLXCDriverPtr fields (Michal Privoznik)
- lxc: Use atomic ops for driver->nactive (Michal Privoznik)
- Introduce a virLXCDriverConfigPtr object (Michal Privoznik)
- virLXCDriver: Drop unused @cgroup (Michal Privoznik)
- qemu: Move close callbacks handling into util/virclosecallbacks.c (Michal Privoznik)
- virAsprintf: correctly check return value (Ján Tomko)
- Merge virCommandPreserveFD / virCommandTransferFD (Daniel P. Berrange)
- Enable FD passing when starting guests with virsh (Daniel P. Berrange)
- LXC: Wire up the virDomainCreate{XML}WithFiles methods (Daniel P. Berrange)
- Introduce remote protocol support for virDomainCreate{XML}WithFiles (Daniel P. Berrange)
- maint: Make ctags work out of the box (Jiri Denemark)
- esx: Support for disk-only and quiescing snapshots. (Geoff Hickey)
- libxl: implement virDomainGetNumaParameters (Dario Faggioli)
- libxl: advertise the support for VIR_TYPED_PARAM_STRING (Dario Faggioli)
- lxc_container: Don't call virGetGroupList during exec (Michal Privoznik)
- qemuDomainGetSchedulerType: Prefer qemuDomObjFromDomain (Michal Privoznik)
- virSecurityManagerGenLabel: Skip seclabels without model (Michal Privoznik)
- lxcCapsInit: Allocate primary security driver unconditionally (Michal Privoznik)
- qemu: Separate host device removal into a standalone function (Jiri Denemark)
- qemu: Separate net device removal into a standalone function (Jiri Denemark)
- qemu: Separate controller removal into a standalone function (Jiri Denemark)
- qemu: Separate disk device removal into a standalone function (Jiri Denemark)
- qemu: Add qemuDomainReleaseDeviceAddress to remove any address (Jiri Denemark)
- build: avoid compiler warning on shadowed name (Eric Blake)
- LXC: Change the owner of live attached host devices (Gao feng)
- LXC: Change the owner of host devices to the root of container (Gao feng)
- LXC: Create host devices for container on host side (Gao feng)
- LXC: Change the owner of live attached disk device (Gao feng)
- LXC: Move virLXCControllerChown to lxc_container.c (Gao feng)
- LXC: controller: change the owner of disk to the root of container (Gao feng)
- LXC: Setup disks for container on host side (Gao feng)
- Allow balloon driver collection to be adjusted dynamically (John Ferlan)
- Implement the virDomainSetMemoryStatsPeriod for QEMU driver (John Ferlan)
- Specify remote protocol for virDomainSetMemoryStatsPeriod (John Ferlan)
- Add capability to fetch balloon stats (John Ferlan)
- Determine whether to start balloon memory stats gathering. (John Ferlan)
- Add 'period' for Memballoon statistics gathering capability (John Ferlan)
- qemuhotplugtest: Introduce test for chardev hotplug (Michal Privoznik)
- qemu: Implement chardev hotplug on live level (Michal Privoznik)
- qemu: Implement chardev hotplug on config level (Michal Privoznik)
- domain_conf: Auto fill chardev port (Michal Privoznik)
- cpu: Allow fine tuning of "host-model" cpu (Peter Krempa)
- cpu: Clean up code style (Peter Krempa)
- cpu: Add virCPUDefUpdateFeature() (Peter Krempa)
- conf: Clean up error reporting in cpu definition parsing (Peter Krempa)
- storage_conf: Merge AuthChap and AuthCephx into AuthSecret (John Ferlan)
- storage_conf: Move username processing into common function (John Ferlan)
- storage_pool: Rework chap XML to mimic ceph (John Ferlan)
- storage_conf: Move auth processing into virStoragePoolDefParseAuth (John Ferlan)
- storage_conf: Introduce virStoragePoolAuthSecretPtr (John Ferlan)
- storage_conf: Adjust virStoragePoolAuthType enum (John Ferlan)
- Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command (John Ferlan)
- Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command (John Ferlan)
- Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command (John Ferlan)
- pci: make virPCIDeviceReset more autonomous (Laine Stump)
- pci: reorder static functions (Laine Stump)
- python: return dictionary without value in case of no blockjob (Guannan Ren)
- Change domain controller index type to unsigned (Jincheng Miao)
- Add a couple of debug statements to LXC driver (Daniel P. Berrange)
- qemu: Introduce qemuBuildChrDeviceStr (Michal Privoznik)
- qemu_command: Honour chardev alias assignment with a function (Michal Privoznik)
- qemu_monitor: Introduce qemuMonitorDetachCharDev (Michal Privoznik)
- qemu_monitor: Introduce qemuMonitorAttachCharDev (Michal Privoznik)
- qemu_monitor_json: Move InetSocketAddress build to a separate function (Michal Privoznik)
- domain_conf: Introduce chardev hotplug helpers (Michal Privoznik)
- remote: Improve libssh2 password authentication (Peter Krempa)
- libssh2: Improve password based authentication (Peter Krempa)
- virAuth: Don't require virConnectPtr to retrieve authentication creds (Peter Krempa)
- util: add virGetGroupList (Eric Blake)
- util: improve user lookup helper (Eric Blake)
- maint: update to latest gnulib (Eric Blake)
- qemu: Fix hot (un-)plug error codes and messages (Michal Privoznik)
- conf: Rework virDomainDeviceDefParse (Michal Privoznik)
- conf: Extend device types handled by virDomainDeviceDefParse (Michal Privoznik)
- LXC: remove some incorrect setting ATTRIBUTE_UNUSED (Gao feng)
- qemu: Slightly increase memory limit (Jiri Denemark)
- util: add rebase fix that was accidentally omitted from previous patch (Laine Stump)
- util: use VIR_(APPEND|DELETE)_ELEMENT for pci/usb device lists (Laine Stump)
- Prevent use of 'int' data type & 'ii', 'jj', 'kk' var names for loops (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in examples/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in python/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/cpu/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/hyperv/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/interface/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/network/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/libxl/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/locking/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/lxc/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/node_device/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/nwfilter/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/openvz/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/parallels/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/phyp/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/qemu files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/remote/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/rpc/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/secret/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/security files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/test/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/uml/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/vbox/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/storage/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/{esx,vmx,vmware} files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in tools/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in tests/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/util/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in src/conf/ files (Daniel P. Berrange)
- Convert 'int i' to 'size_t i' in daemon/ files (Daniel P. Berrange)
- Adapt to VIR_ALLOC and virAsprintf in tools/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in tests/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/xenxs/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/xenapi/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/xen/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/vmx/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/vmware/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/vbox/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/util/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/uml/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/test/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/storage/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/security/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/secret/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/rpc/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/remote/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/qemu/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/phyp/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/parallels/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/openvz/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/nwfilter/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/network/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/node_device/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/lxc/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/locking/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/libxl/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/interface/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/hyperv/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/esx/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/cpu/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/conf/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in src/access/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in daemon/* (Michal Privoznik)
- Adapt to VIR_ALLOC and virAsprintf in docs/ (Michal Privoznik)
- Introduce OOM reporting to virAsprintf (Michal Privoznik)
- viralloc: Report OOM error on failure (Michal Privoznik)
- build: honor autogen.sh --no-git (Eric Blake)
- LXC: hostdev: create parent directory for hostdev (Gao feng)
- LXC: hostdev: introduce lxcContainerSetupHostdevCapsMakePath (Gao feng)
- LXC: Create /dev/tty within a container (Richard Weinberger)
- scsi: Fix construction of sysfs device path (Viktor Mihajlovski)
- selinux: Always generate imagelabel (Peter Krempa)
- selinux: Cleanup coding style (Peter Krempa)
- qemu: Set RLIMIT_MEMLOCK when memoryBacking/locked is used (Jiri Denemark)
- qemu: Use qemuDomainMemoryLimit when computing memory for VFIO (Jiri Denemark)
- qemu: Move memory limit computation to a reusable function (Jiri Denemark)
- Don't spam logs with "port 0 must be in range" errors (Jiri Denemark)
- qemu: Release correct websocket port (Jiri Denemark)
- conf: virDomainObjListRemoveLocked function (Marek Marczykowski-Górecki)
- maint: update to latest gnulib (Eric Blake)
- Extend the ACL test case to validate filter rule checks (Daniel P. Berrange)
- Add access control filtering of interface objects (Daniel P. Berrange)
- Add access control filtering of nwfilter objects (Daniel P. Berrange)
- Add access control filtering of secret objects (Daniel P. Berrange)
- Add access control filtering of storage objects (Daniel P. Berrange)
- Add access control filtering of node device objects (Daniel P. Berrange)
- Add access control filtering of network objects (Daniel P. Berrange)
- Change signature of ACL filter functions (Daniel P. Berrange)
- Add access control filtering of domain objects (Daniel P. Berrange)
- qemu: Allow seamless migration for domains with multiple graphics (Martin Kletzander)
- qemu: Don't miss errors when changing graphics passwords (Martin Kletzander)
- LXC: blkio: allow to setup weight_device (Gao feng)
- qemu: Implement 'oncrash' coredump events when guest panicked (Chen Fan)
- qemu: Implement 'oncrash' events when guest panicked (Chen Fan)
- qemu: expose qemuProcessShutdownOrReboot() (Chen Fan)
- qemu: refactor processWatchdogEvent (Chen Fan)
- libvirt: Define domain crash event types (Chen Fan)
- Add some misc debugging to LXC startup (Daniel P. Berrange)
- Ignore failure to mount SELinux filesystem in container (Daniel P. Berrange)
- LXC: fuse: Change files owner to the root user of container (Gao feng)
- LXC: controller: change the owner of /dev/pts and ptmx to the root of container (Gao feng)
- LXC: controller: change the owner of devices created on host (Gao feng)
- LXC: controller: change the owner of /dev to the root user of container (Gao feng)
- LXC: controller: change the owner of tty devices to the root user of container (Gao feng)
- LXC: Creating devices for container on host side (Gao feng)
- LXC: introduce virLXCControllerSetupUserns and lxcContainerSetID (Gao feng)
- LXC: sort the uidmap/gidmap of domain (Gao feng)
- LXC: enable user namespace only when user set the uidmap (Gao feng)
- LXC: Introduce New XML element for user namespace (Gao feng)
- qemu: Improve info message and remove a variable in qemuDomainManagedSave (Peter Krempa)
- libxl: implement per NUMA node free memory reporting (Dario Faggioli)
- build: configure must not affect tarball contents (Eric Blake)
- Drop iptablesContext (Roman Bogorodskiy)
- qemu: indentation fix (Ján Tomko)
- qemu: Implement CPUs check against machine type's cpu-max (Michal Novotny)
Cleanups:
- python: Drop TODO (Cole Robinson)
- maint: split long lines in Makefiles (Eric Blake)
- tests: split long lines (Eric Blake)
- qemu: Cleanup coding style nits in qemu_cgroup.c (Peter Krempa)
So thanks everybody for the contributions to this large release,
be it with bug reports code, ideas, documentation or localizations !
Enjoy !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 4 months
[libvirt] [v1.0.5-maint PATCH] lxc: correctly backport /dev/tty fix
by Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=982317
maint-only patch; reported by Geert Jansen
Commit 17cdc298 tried to backport upstream 90a0c6d, but in
resolving conflicts, failed to account that upstream commit
e1d32bb refactored code to leave off a leading /dev.
* src/lxc/lxc_container.c (lxcContainerPopulateDevices): Use
correct device name.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/lxc/lxc_container.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 8497c10..972486b 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -839,7 +839,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" },
- { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/tty" },
+ { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/dev/tty" },
};
const struct {
const char *src;
--
1.8.3.1
11 years, 4 months
[libvirt] Linking fails on FreeBSD
by Roman Bogorodskiy
Hi,
Linking fails on FreeBSD:
CCLD libvirt.la
/usr/bin/ld: ./.libs/libvirt_util.a(libvirt_util_la-vircgroup.o):
relocation R_X86_64_PC32 against `virCgroupPartitionEscape' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
Following the suggestion and re-compiling with -fPIC doesn't help.
Anybody has an idea how to fix that?
Roman Bogorodskiy
11 years, 4 months
[libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The way we were casting small (<32bit) integers was broken
on big endian hosts, causing stack smashing. This was detected
in the test suite either by test failures due to incorrect
results, or by libc/gcc abort'ing with its stack canary
triggered.
In v2:
- Added missing change to virdbus.c
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/util/virdbus.c | 6 +++---
tests/virdbustest.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/util/virdbus.c b/src/util/virdbus.c
index 4ce6c46..33f3379 100644
--- a/src/util/virdbus.c
+++ b/src/util/virdbus.c
@@ -738,7 +738,7 @@ virDBusMessageIterDecode(DBusMessageIter *rootiter,
switch (*t) {
case DBUS_TYPE_BYTE:
- GET_NEXT_VAL(unsigned char, int, "%d");
+ GET_NEXT_VAL(unsigned char, unsigned char, "%d");
break;
case DBUS_TYPE_BOOLEAN:
@@ -746,11 +746,11 @@ virDBusMessageIterDecode(DBusMessageIter *rootiter,
break;
case DBUS_TYPE_INT16:
- GET_NEXT_VAL(dbus_int16_t, int, "%d");
+ GET_NEXT_VAL(dbus_int16_t, short, "%d");
break;
case DBUS_TYPE_UINT16:
- GET_NEXT_VAL(dbus_uint16_t, unsigned int, "%d");
+ GET_NEXT_VAL(dbus_uint16_t, short unsigned, "%d");
break;
case DBUS_TYPE_INT32:
diff --git a/tests/virdbustest.c b/tests/virdbustest.c
index fb241ee..61de937 100644
--- a/tests/virdbustest.c
+++ b/tests/virdbustest.c
@@ -54,8 +54,8 @@ static int testMessageSimple(const void *args ATTRIBUTE_UNUSED)
int ret = -1;
unsigned char in_byte = 200, out_byte = 0;
int in_bool = true, out_bool = false;
- int in_int16 = 12000, out_int16 = 0;
- unsigned int in_uint16 = 32000, out_uint16 = 0;
+ short in_int16 = 0xfefe, out_int16 = 0;
+ unsigned short in_uint16 = 32000, out_uint16 = 0;
int in_int32 = 100000000, out_int32 = 0;
unsigned int in_uint32 = 200000000, out_uint32 = 0;
long long in_int64 = 1000000000000, out_int64 = 0;
@@ -232,8 +232,8 @@ static int testMessageStruct(const void *args ATTRIBUTE_UNUSED)
int ret = -1;
unsigned char in_byte = 200, out_byte = 0;
int in_bool = true, out_bool = false;
- int in_int16 = 12000, out_int16 = 0;
- unsigned int in_uint16 = 32000, out_uint16 = 0;
+ short in_int16 = 12000, out_int16 = 0;
+ unsigned short in_uint16 = 32000, out_uint16 = 0;
int in_int32 = 100000000, out_int32 = 0;
unsigned int in_uint32 = 200000000, out_uint32 = 0;
long long in_int64 = 1000000000000, out_int64 = 0;
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH] Fix dbus message reading code on big endian hosts
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The way we were casting small (<32bit) integers was broken
on big endian hosts, causing stack smashing. This was detected
in the test suite either by test failures due to incorrect
results, or by libc/gcc abort'ing with its stack canary
triggered.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
tests/virdbustest.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/virdbustest.c b/tests/virdbustest.c
index fb241ee..61de937 100644
--- a/tests/virdbustest.c
+++ b/tests/virdbustest.c
@@ -54,8 +54,8 @@ static int testMessageSimple(const void *args ATTRIBUTE_UNUSED)
int ret = -1;
unsigned char in_byte = 200, out_byte = 0;
int in_bool = true, out_bool = false;
- int in_int16 = 12000, out_int16 = 0;
- unsigned int in_uint16 = 32000, out_uint16 = 0;
+ short in_int16 = 0xfefe, out_int16 = 0;
+ unsigned short in_uint16 = 32000, out_uint16 = 0;
int in_int32 = 100000000, out_int32 = 0;
unsigned int in_uint32 = 200000000, out_uint32 = 0;
long long in_int64 = 1000000000000, out_int64 = 0;
@@ -232,8 +232,8 @@ static int testMessageStruct(const void *args ATTRIBUTE_UNUSED)
int ret = -1;
unsigned char in_byte = 200, out_byte = 0;
int in_bool = true, out_bool = false;
- int in_int16 = 12000, out_int16 = 0;
- unsigned int in_uint16 = 32000, out_uint16 = 0;
+ short in_int16 = 12000, out_int16 = 0;
+ unsigned short in_uint16 = 32000, out_uint16 = 0;
int in_int32 = 100000000, out_int32 = 0;
unsigned int in_uint32 = 200000000, out_uint32 = 0;
long long in_int64 = 1000000000000, out_int64 = 0;
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH] spec: Cat test-suite.log if make check fails
by Jiri Denemark
Current automake enables parallel test by default, which means test
details are only logged in test-suite.log and not printed to stderr.
This patch makes test failures directly visible in RPM build logs even
when parallel tests are turned on.
---
libvirt.spec.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 81101e8..a3a831f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1482,7 +1482,11 @@ do
printf '#!/bin/sh\nexit 0\n' > $i
chmod +x $i
done
-make check
+if ! make check VIR_TEST_DEBUG=1
+then
+ cat test-suite.log || true
+ exit 1
+fi
%if %{with_libvirtd}
%pre daemon
--
1.8.3.2
11 years, 4 months