[libvirt] [PATCH] Post-release version bump for new dev cycle
by Peter Krempa
---
Pushed as trivial.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f370475..ddbdba5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
-AC_INIT([libvirt], [1.2.12], [libvir-list(a)redhat.com], [], [http://libvirt.org])
+AC_INIT([libvirt], [1.2.13], [libvir-list(a)redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
--
2.2.1
9 years, 11 months
[libvirt] Release of libvirt-1.2.12
by Daniel Veillard
As planned I pushed the libvirt-1.2.12 release as well as the
corresponding python bindings to the server, they are also tagged
in git(s):
ftp://libvirt.org/libvirt [/python]
This is a mixed release, not really a huge feature addition though
there should be user noticeable improvement for networking and users
of Parallels. 2 secutity fixes, a large set of bug fixes and lot of
improvements:
Security:
- CVE-2015-0236: qemu: Check ACLs when dumping security info from snapshots (Peter Krempa)
- CVE-2015-0236: qemu: Check ACLs when dumping security info from save image (Peter Krempa)
Documentation:
- Fix docs about python bindings package (Martin Kletzander)
- Document some -boot option limitations on UEFI (Michal Privoznik)
- virsh.pod: Update description (John Ferlan)
- Fix typo s/interpetation/interpretation/ (Claudio Bley)
- split typedef and struct definition for apibuild.py (Claudio Bley)
Portability:
- Fix build with older gcc (Ján Tomko)
- Fix virCgroupNewMachine prototype on non-Linux (Ján Tomko)
- Conditionalize use of -Wno-suggest-attribute=format pragma (Daniel P. Berrange)
- virnetlink: fix build on non-Linux (Eric Blake)
- util: Fix fallocate stubs for mingw build (Martin Kletzander)
- avoid using deprecated udev logging functions (Daniel P. Berrange)
Bug Fixes:
- Fix a memory leak in virCgroupGetPercpuStats (Ján Tomko)
- Use correct location for qcow1 encryption header (Ján Tomko)
- systemd: fix build without dbus (Daniel P. Berrange)
- Fix apparmor issues for tck (Mike Latimer)
- Fix apparmor issues for Xen (Mike Latimer)
- esx_vi: fix possible segfault (Pavel Hrdina)
- xenapi_driver: fix copy-paste typo (Pavel Hrdina)
- Fix virCgroupGetPercpuStats with non-continuous present CPUs (Ján Tomko)
- qemu: output error when try to hotplug unsupported console type (Luyao Huang)
- qemu: format server interface without a listen address (Ján Tomko)
- tests: fix xlconfigtest build failure (Jim Fehlig)
- qemu_conf: check for duplicate security drivers (Ján Tomko)
- Always check return value of qemuDomainObjExitMonitor (Ján Tomko)
- Fix vmdef usage after domain crash in monitor on device attach (Ján Tomko)
- Fix vmdef usage after domain crash in monitor on device detach (Ján Tomko)
- libxl: Set path to console on domain startup. (Anthony PERARD)
- Coverity fix: properly check for 0 ipv6 address. (Cédric Bosdonnat)
- network: Resolve Coverity FORWARD_NULL (John Ferlan)
- qemu: Tweak auto adding PCI bridge controller when extending default PCI bus (Erik Skultety)
- domain_conf: Check errors from virSocketAddrFormat (John Ferlan)
- domain_conf: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- Fix ipv6 regex in RNG schemas to match '::' (Cédric Bosdonnat)
- virNetworkDefUpdateIPDHCPHost: Don't crash when updating network (Michal Privoznik)
- qemu: free priv->origname when qemuMigrationPrepareAny fails (Luyao Huang)
- Fix vmdef usage while in monitor in qemu process (Ján Tomko)
- Fix vmdef usage while in monitor in BlockStat* APIs (Ján Tomko)
- Fix vmdef usage while in monitor in qemuDomainHotplugVcpus (Ján Tomko)
- qemu_driver: fix setting vcpus for offline domain (Pavel Hrdina)
- qemu: snapshot: inactive external snapshot can't work after libvirtd restart (Shanzhi Yu)
- qemu: forbid second blockcommit during active commit (Eric Blake)
- parallels: don't override error message when XML parsing fails (Daniel P. Berrange)
- Don't use VIR_DOMAIN_XML_SECURE when parsing XML (Daniel P. Berrange)
- conf: fix crash when hotplug a channel chr device with no target (Luyao Huang)
- qemuxml2argvtest: Fix test after change of qxl vgamem_mb default (Michal Privoznik)
- cpu: Bugfix for s390 CPU driver to return a host CPU model (Daniel Hansel)
- virconf: Resolve a possible memory leak in virConfSetValue (John Ferlan)
- openvz: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- lxc: Don't crash on NULL ifname_guest_actual (Guido Günther)
- conf: Correctly format controller's driver (Luyao Huang)
- vmx: Fix a VMX parsing problem (Geoff Hickey)
- qemu: Fix system pages handling in <memoryBacking/> (Michal Privoznik)
- qemu: Don't unref domain after exit from nested async job (Peter Krempa)
- conf: Don't format actual network definition in migratable XML (Luyao Huang)
- qemu: Restore old bandwidth rules when setting new fails (Luyao Huang)
- Fix error when starting a container after an error (Cédric Bosdonnat)
- qemu: Fix coverity issues after refcount refactoring (Martin Kletzander)
- util: Fix possible NULL dereference (Martin Kletzander)
- disable vCPU pinning with TCG mode (Daniel P. Berrange)
- Don't setup fake CPU pids for old QEMU (Daniel P. Berrange)
- Fix hotplugging of block device-backed usb disks (Ján Tomko)
- Buffer size too small when reading sysinfo (Boris Fiuczynski)
- qemu: fix memory leak in blockinfo (Eric Blake)
- conf: fix cannot start a guest have a shareable network iscsi hostdev (Luyao Huang)
- qemu: fix bugs in blockstats (Eric Blake)
- qemu: Free saved error in qemuDomainSetVcpusFlags (Martin Kletzander)
- qemu: Add missing goto error in qemuRestoreCgroupState (Martin Kletzander)
- conf: Fix invalid condition when parsing storage owner (Martin Kletzander)
- qemu: Fix hotplugging cpus with strict memory pinning (Martin Kletzander)
- parallels: fix usage of disk->info.addr.drive structure (Dmitry Guryanov)
- qemu: Auto generate a controller when attach hostdev and chr device (Luyao Huang)
- xenconfig: fix boot device parsing (Wei Liu)
- conf: fix virDomainLeaseIndex logic (Luyao Huang)
- conf: Fix libvirtd crash matching hostdev XML (Luyao Huang)
- fix typo in sanlock driver s/VIR_CONF_UONG/VIR_CONF_ULONG/ (Daniel P. Berrange)
- qemu: avoid rare race when undefining domain (Martin Kletzander)
Improvement:
- tests: Check for virQEMUDriverConfigNew return value (Michal Privoznik)
- systemd: avoid string comparisons on dbus error messages (Daniel P. Berrange)
- aarch64: Support versioned machine types. (Richard W.M. Jones)
- qemu: Add check for PCI bridge placement if there are too many PCI devices (Erik Skultety)
- qemu: Fix auto-adding PCI bridge when all slots are reserved (Erik Skultety)
- qemu: move PCI slot assignment for PIIX3, Q35 into a separate function (Erik Skultety)
- qemu: reorder PCI slot assignment functions (Erik Skultety)
- schemas: Move definition of 'hexuint' to basictypes (Peter Krempa)
- util: json: Make argument of virJSONValueArraySize const (Peter Krempa)
- qemu: command: Honor const-correctnes in qemuBuildNumaArgStr (Peter Krempa)
- conf: Fix comment mentioning actual type of @multi member of virDevicePCIAddress (Peter Krempa)
- Grant access to helpers (Mike Latimer)
- conf: virDomainDefMaybeAddController tweak return code (Erik Skultety)
- qemu: Remove dead code in qemuDomainAssignPCIAddresses revert patch (Erik Skultety)
- network: Let domains be restricted to local DNS (Josh Stone)
- Make ZFS storage pool XML tests optional (Gary R Hook)
- Simplify condition for formatting CPU features (Ján Tomko)
- Add an XML test for host-model CPU with features (Ján Tomko)
- parallels: create container from existing image (Dmitry Guryanov)
- parallels: allow to add filesystems to container (Dmitry Guryanov)
- parallels: commit with PVCF_DETACH_HDD_BUNDLE flag (Dmitry Guryanov)
- parallels: dump info about container filesystems (Dmitry Guryanov)
- add ploop fs driver type (Dmitry Guryanov)
- qemu: Add support for enabling/disabling PMU (Martin Kletzander)
- docs, schema, conf: Add support for PMU feature (Martin Kletzander)
- virsh: add support for domain XML validation (Daniel P. Berrange)
- Add XML test for too many PCI devices on default PCI bus (Erik Skultety)
- Remove dead code in qemuDomainAssignPCIAddresses (Erik Skultety)
- virSocketAddrGetIpPrefix 0.0.0.0 and :: special cases (Cédric Bosdonnat)
- Use the network route definitions for domains (Cédric Bosdonnat)
- Move code related to network routes to networkcommon_conf.[ch] (Cédric Bosdonnat)
- Move network route definition to networkcommon.rng (Cédric Bosdonnat)
- Add support for schema validation when passing in XML (Daniel P. Berrange)
- Add virXMLValidateAgainstSchema helper method (Daniel P. Berrange)
- Change int to size_t in size var for tap/vhost FDs (Daniel P. Berrange)
- Log dtrace/systemd probes at INFO level instead of DEBUG (Daniel P. Berrange)
- Add systemd/dtrace probes for DBus APIs (Daniel P. Berrange)
- Add support for systemd-machined CreateMachineWithNetwork (Daniel P. Berrange)
- Mark the domain as active in qemuhotplugtest (Ján Tomko)
- Check for domain liveness in qemuDomainObjExitMonitor (Ján Tomko)
- check IOMMU group devices usage when preparing device for vfio passthrough (Shivaprasad G Bhat)
- virpci: Implement virPCIDeviceGetAddress function (Shivaprasad G Bhat)
- libxl: Add support for parsing/formating Xen XL config (Kiarie Kahurani)
- tests: Tests for the xen-xl parser (Kiarie Kahurani)
- Introduce support for parsing/formatting Xen xl config format (Jim Fehlig)
- qemu_process: detect updated video ram size values from QEMU (Pavel Hrdina)
- qemu_monitor: introduce new function to get QOM path (Pavel Hrdina)
- qemu, lxc: Warn if setting QoS on unsupported vNIC types (Michal Privoznik)
- conf: Increase virNetDevBandwidthParse intelligence (Michal Privoznik)
- Give virDomainDef parser & formatter their own flags (Daniel P. Berrange)
- Decouple CPU XML formatting from domain XML public API flags (Daniel P. Berrange)
- formatdomaincaps: Correctly format API reference (Michal Privoznik)
- Fix flags passed to virDomainDefParseString by XenAPI driver (Daniel P. Berrange)
- Add stub virDomainDefineXMLFlags impls (Daniel P. Berrange)
- Add new virDomainDefineXMLFlags public API (Daniel P. Berrange)
- qemu: Allow enabling/disabling features with host-passthrough (Martin Kletzander)
- lxc: Move setting ifname_guest_actual to virLXCSetupInterfaces (Guido Günther)
- openvz: Check errors from virSocketAddrFormat (John Ferlan)
- qxl: change the default value for vgamem_mb to 16 MiB (Pavel Hrdina)
- virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ (Hao Liu)
- safezero: fall back to writing zeroes even when resizing (Ján Tomko)
- maint: in src/Makefile.am, $(top_srcdir)/src is verbose (Eric Blake)
- nwfilter: Add support for icmpv6 filtering (Stefan Berger)
- Parallels: Add VNC hostname setup (Alexander Burluka)
- qemu: fix miss goto cleanup in qemuDomainAttachNetDevice (Luyao Huang)
- networkGetDHCPLeases: Remove unnecessary error reporting (Nehal J Wani)
- qemu: use a wrong name for guest panic status (Luyao Huang)
- maint: update to latest gnulib (Eric Blake)
- Report error if a driver can't handle multiple IP addresses (Cédric Bosdonnat)
- Openvz --ipadd can be provided multiple times (Cédric Bosdonnat)
- LXC: honour network devices link state (Cédric Bosdonnat)
- LXC: use the new net devices routes definition (Cédric Bosdonnat)
- lxc conf2xml: convert lxc.network.ipv[46].gateway (Cédric Bosdonnat)
- Domain network devices can now have a <route> element (Cédric Bosdonnat)
- lxc conf2xml: convert ip addresses for hostdev NICs (Cédric Bosdonnat)
- Allow network capabilities hostdev to configure IP addresses (Cédric Bosdonnat)
- lxc conf2xml: convert IP addresses (Cédric Bosdonnat)
- LXC: set IP addresses to veth devices in the container (Cédric Bosdonnat)
- Domain conf: allow more than one IP address for net devices (Cédric Bosdonnat)
- Renamed virNetDevClearIPv4Address to virNetDevClearIPAddress (Cédric Bosdonnat)
- virNetDevClearIPv4Address: netlink implementation (Cédric Bosdonnat)
- virNetDevAddRoute: implementation using netlink (Cédric Bosdonnat)
- Renamed virNetDevSetIPv4Address to virNetDevSetIPAddress (Cédric Bosdonnat)
- virNetDevSetIPv4Address: libnl implementation (Cédric Bosdonnat)
- Forgot to cleanup ifname_guest* in domain network def parsing (Cédric Bosdonnat)
- maint: fix date in local gnulib patch (Daniel P. Berrange)
- maint: update to latest gnulib (Daniel P. Berrange)
- Teach AppArmor, that /usr/lib64 may exist. (Cedric Bosdonnat)
- Add tests to xmconfigtest (Chunyan Liu)
- xenconfig: set HVM pae/apic/acpi/ default to 1 (Chunyan Liu)
- src/xenconfig: Export helper functions (Kiarie Kahurani)
- capabilities: Format <domain/> properly (Michal Privoznik)
- parallels: report, that cdrom image is raw (Dmitry Guryanov)
- tests: Set up two more overrides for root builders (Martin Kletzander)
- test: fix nwfilter tests following changes in virfirewall.c (Stefan Berger)
- qemu: completely rework reference counting (Martin Kletzander)
- maint: update .mailmap (Claudio Bley)
- qemu: Create memory-backend-{ram,file} iff needed (Michal Privoznik)
- Remove redundant cleanup in qemuDomainAttachVirtioDiskDevice (Ján Tomko)
- Fix error message on redirdev caps detection (Ján Tomko)
- logical: Add "--type snapshot" to lvcreate command (John Ferlan)
- getstats: crawl backing chain for qemu (Eric Blake)
- getstats: split block stats reporting for easier recursion (Eric Blake)
- getstats: add new flag for block backing chain (Eric Blake)
- getstats: prepare for dynamic block.count stat (Eric Blake)
- getstats: report block sizes for offline domains (Eric Blake)
- qemu: refactor blockinfo data gathering (Eric Blake)
- getstats: rearrange blockinfo gathering (Eric Blake)
- getstats: perform recursion in monitor collection (Eric Blake)
- getstats: prepare monitor collection for recursion (Eric Blake)
- qemu: let blockinfo reuse virStorageSource (Eric Blake)
- qemu: refactor blockinfo job handling (Eric Blake)
- build: fix typo in previous patch (Eric Blake)
- virstoragefile: Have virStorageFileResize use safezero (John Ferlan)
- virfile: Refactor safezero (John Ferlan)
- conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs (Martin Kletzander)
- storage: unify permission formatting (Martin Kletzander)
- qemu: Leave cpuset.mems in parent cgroup alone (Martin Kletzander)
- qemu: Save numad advice into qemuDomainObjPrivate (Martin Kletzander)
- qemu: Remove unnecessary qemuSetupCgroupPostInit function (Martin Kletzander)
- util: Add virNumaGetHostNodeset (Martin Kletzander)
- util: Add function virCgroupHasEmptyTasks (Martin Kletzander)
- spec: Fix syntax (Jiri Denemark)
- spec: Disable -Werror in Fedora RPM builds (Daniel P. Berrange)
- parallels: set format for real disk devices (Dmitry Guryanov)
- parallels: support NULL virDomainVideoAccelDefPtr (Dmitry Guryanov)
- qemu: add/remove bridge fdb entries as guest CPUs are started/stopped (Laine Stump)
- qemu: make persistent update of graphics device supported (Wang Rui)
- qemu: fix alignment of qemuDomainFindGraphics (Wang Rui)
- qemu: report properer error number when change graphics failed (Wang Rui)
- qemu: Allow system pages to <memoryBacking/> (Michal Privoznik)
- virconf: Introduce VIR_CONF_ULONG (Michal Privoznik)
- virConfType: switch to VIR_ENUM_{DECL,IMPL} (Michal Privoznik)
- virConfSetValue: Simplify condition (Michal Privoznik)
- conf: move the check for secondary consoles of targetType serial (Erik Skultety)
- qemu: add a qemuInterfaceStopDevices(), called when guest CPUs stop (Laine Stump)
- qemu: always call qemuInterfaceStartDevices() when starting CPUs (Laine Stump)
- conf: Ignore device address for model=none usb controller and memballon (Luyao Huang)
Cleanup:
- Indentation (Ján Tomko)
Thanks everybody for helping with this release,
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/
9 years, 11 months
[libvirt] Submit your Google Summer of Code project ideas and volunteer to mentor
by Stefan Hajnoczi
Dear libvirt, KVM, and QEMU contributors,
The Google Summer of Code season begins soon and it's time to collect
our thoughts for mentoring students this summer working full-time on
libvirt, KVM, and QEMU.
What is GSoC?
Google Summer of Code 2015 (GSoC) funds students to
work on open source projects for 12 weeks over the summer. Open
source organizations apply to participate and those accepted receive
funding for one or more students.
We now need to collect a list of project ideas on our wiki. We also
need mentors to volunteer.
http://qemu-project.org/Google_Summer_of_Code_2015
Project ideas
Please post project ideas on the wiki page below. Project ideas
should be suitable as a 12-week project that a student fluent in
C/Python/etc can complete. No prior knowledge of QEMU/KVM/libvirt
internals can be assumed.
http://qemu-project.org/Google_Summer_of_Code_2015
Mentors
Please add your name to project ideas you are willing to mentor. In
order to mentor you must be an established contributor (regularly
contribute patches). You must be willing to spend about 5 hours per
week from May 25 to August 21.
I have CCed the 8 most active committers since QEMU 2.1.0 as well as
the previous libvirt and KVM mentors but everyone is invited.
Official timeline:
https://www.google-melange.com/gsoc/events/google/gsoc20145
Stefan
9 years, 11 months
[libvirt] [PATCH] tests: Check for virQEMUDriverConfigNew return value
by Michal Privoznik
The function may return NULL if something went wrong. In some places
in the tests we are not checking the return value rather than
accessing the pointer directly resulting in SIGSEGV.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/domaincapstest.c | 3 +++
tests/qemuhotplugtest.c | 3 ++-
tests/qemuxmlnstest.c | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 70d2ef3..fa931f6 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -212,46 +212,49 @@ static int
mymain(void)
{
int ret = 0;
#define DO_TEST(Filename, Emulatorbin, Machine, Arch, Type, ...) \
do { \
struct test_virDomainCapsFormatData data = {.filename = Filename, \
.emulatorbin = Emulatorbin, .machine = Machine, .arch = Arch, \
.type = Type, __VA_ARGS__}; \
if (virtTestRun(Filename, test_virDomainCapsFormat, &data) < 0) \
ret = -1; \
} while (0)
DO_TEST("basic", "/bin/emulatorbin", "my-machine-type",
VIR_ARCH_X86_64, VIR_DOMAIN_VIRT_UML);
DO_TEST("full", "/bin/emulatorbin", "my-machine-type",
VIR_ARCH_X86_64, VIR_DOMAIN_VIRT_KVM, .fillFunc = fillAll);
#ifdef WITH_QEMU
virQEMUDriverConfigPtr cfg = virQEMUDriverConfigNew(false);
+ if (!cfg)
+ return EXIT_FAILURE;
+
# define DO_TEST_QEMU(Filename, QemuCapsFile, Emulatorbin, Machine, Arch, Type, ...) \
do { \
const char *capsPath = abs_srcdir "/qemucapabilitiesdata/" QemuCapsFile ".caps"; \
virQEMUCapsPtr qemuCaps = qemuTestParseCapabilities(capsPath); \
struct fillQemuCapsData fillData = {.qemuCaps = qemuCaps, .cfg = cfg}; \
struct test_virDomainCapsFormatData data = {.filename = Filename, \
.emulatorbin = Emulatorbin, .machine = Machine, .arch = Arch, \
.type = Type, .fillFunc = fillQemuCaps, .opaque = &fillData}; \
if (!qemuCaps) { \
fprintf(stderr, "Unable to build qemu caps from %s\n", capsPath); \
ret = -1; \
} else if (virtTestRun(Filename, test_virDomainCapsFormat, &data) < 0) \
ret = -1; \
} while (0)
DO_TEST_QEMU("qemu_1.6.50-1", "caps_1.6.50-1", "/usr/bin/qemu-system-x86_64",
"pc-1.2", VIR_ARCH_X86_64, VIR_DOMAIN_VIRT_KVM);
virObjectUnref(cfg);
#endif /* WITH_QEMU */
return ret;
}
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 1c18dbb..12a7f71 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -333,165 +333,166 @@ static int
mymain(void)
{
int ret = 0;
struct qemuHotplugTestData data = {0};
virSecurityManagerPtr mgr;
#if !WITH_YAJL
fputs("libvirt not compiled with yajl, skipping this test\n", stderr);
return EXIT_AM_SKIP;
#endif
if (virThreadInitialize() < 0 ||
!(driver.caps = testQemuCapsInit()) ||
!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
- driver.config = virQEMUDriverConfigNew(false);
+ if (!(driver.config = virQEMUDriverConfigNew(false)))
+ return EXIT_FAILURE;
VIR_FREE(driver.config->spiceListen);
VIR_FREE(driver.config->vncListen);
/* some dummy values from 'config file' */
if (VIR_STRDUP_QUIET(driver.config->spicePassword, "123456") < 0)
return EXIT_FAILURE;
if (!(driver.domainEventState = virObjectEventStateNew()))
return EXIT_FAILURE;
driver.lockManager = virLockManagerPluginNew("nop", "qemu",
driver.config->configBaseDir,
0);
if (!driver.lockManager)
return EXIT_FAILURE;
if (!(mgr = virSecurityManagerNew("none", "qemu", false, false, false)))
return EXIT_FAILURE;
if (!(driver.securityManager = virSecurityManagerNewStack(mgr)))
return EXIT_FAILURE;
/* wait only 100ms for DEVICE_DELETED event */
qemuDomainRemoveDeviceWaitTime = 100;
#define DO_TEST(file, ACTION, dev, event, fial, kep, ...) \
do { \
const char *my_mon[] = { __VA_ARGS__, NULL}; \
const char *name = file " " #ACTION " " dev; \
data.action = ACTION; \
data.domain_filename = file; \
data.device_filename = dev; \
data.fail = fial; \
data.mon = my_mon; \
data.keep = kep; \
data.deviceDeletedEvent = event; \
if (virtTestRun(name, testQemuHotplug, &data) < 0) \
ret = -1; \
} while (0)
#define DO_TEST_ATTACH(file, dev, fial, kep, ...) \
DO_TEST(file, ATTACH, dev, false, fial, kep, __VA_ARGS__)
#define DO_TEST_DETACH(file, dev, fial, kep, ...) \
DO_TEST(file, DETACH, dev, false, fial, kep, __VA_ARGS__)
#define DO_TEST_ATTACH_EVENT(file, dev, fial, kep, ...) \
DO_TEST(file, ATTACH, dev, true, fial, kep, __VA_ARGS__)
#define DO_TEST_DETACH_EVENT(file, dev, fial, kep, ...) \
DO_TEST(file, DETACH, dev, true, fial, kep, __VA_ARGS__)
#define DO_TEST_UPDATE(file, dev, fial, kep, ...) \
DO_TEST(file, UPDATE, dev, false, fial, kep, __VA_ARGS__)
#define QMP_OK "{\"return\": {}}"
#define HMP(msg) "{\"return\": \"" msg "\"}"
#define QMP_DEVICE_DELETED(dev) \
"{" \
" \"timestamp\": {" \
" \"seconds\": 1374137171," \
" \"microseconds\": 2659" \
" }," \
" \"event\": \"DEVICE_DELETED\"," \
" \"data\": {" \
" \"device\": \"" dev "\"," \
" \"path\": \"/machine/peripheral/" dev "\"" \
" }" \
"}\r\n"
DO_TEST_UPDATE("graphics-spice", "graphics-spice-nochange", false, false, NULL);
DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-nochange", false, false,
"set_password", QMP_OK, "expire_password", QMP_OK);
DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false,
"set_password", QMP_OK, "expire_password", QMP_OK);
DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false, NULL);
DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen-network", false, false,
"set_password", QMP_OK, "expire_password", QMP_OK);
/* Strange huh? Currently, only graphics can be updated :-P */
DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL);
DO_TEST_ATTACH("console-compat-2", "console-virtio", false, true,
"chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}}",
"device_add", QMP_OK);
DO_TEST_DETACH("console-compat-2", "console-virtio", false, false,
"device_del", QMP_OK,
"chardev-remove", QMP_OK);
DO_TEST_ATTACH("hotplug-base", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-virtio", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-virtio", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base", "disk-virtio", false, false,
"device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-usb", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-usb", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base", "disk-usb", false, false,
"device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-scsi", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base", "disk-scsi", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base", "disk-scsi", false, false,
"device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK,
"human-monitor-command", HMP(""));
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
virObjectUnref(driver.config);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c
index 947aa9c..4d665da 100644
--- a/tests/qemuxmlnstest.c
+++ b/tests/qemuxmlnstest.c
@@ -205,62 +205,63 @@ static int
mymain(void)
{
int ret = 0;
bool json = false;
abs_top_srcdir = getenv("abs_top_srcdir");
if (!abs_top_srcdir)
abs_top_srcdir = abs_srcdir "/..";
- driver.config = virQEMUDriverConfigNew(false);
+ if (!(driver.config = virQEMUDriverConfigNew(false)))
+ return EXIT_FAILURE;
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
# define DO_TEST_FULL(name, migrateFrom, migrateFd, expectError, ...) \
do { \
struct testInfo info = { \
name, NULL, migrateFrom, migrateFd, json, expectError \
}; \
if (!(info.extraFlags = virQEMUCapsNew())) \
return EXIT_FAILURE; \
virQEMUCapsSetList(info.extraFlags, __VA_ARGS__, QEMU_CAPS_LAST);\
if (virtTestRun("QEMU XML-2-ARGV " name, \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
virObjectUnref(info.extraFlags); \
} while (0)
# define DO_TEST(name, expectError, ...) \
DO_TEST_FULL(name, NULL, -1, expectError, __VA_ARGS__)
# define NONE QEMU_CAPS_LAST
/* Unset or set all envvars here that are copied in qemudBuildCommandLine
* using ADD_ENV_COPY, otherwise these tests may fail due to unexpected
* values for these envvars */
setenv("PATH", "/bin", 1);
setenv("USER", "test", 1);
setenv("LOGNAME", "test", 1);
setenv("HOME", "/home/test", 1);
unsetenv("TMPDIR");
unsetenv("LD_PRELOAD");
unsetenv("LD_LIBRARY_PATH");
unsetenv("QEMU_AUDIO_DRV");
unsetenv("SDL_AUDIODRIVER");
DO_TEST("qemu-ns-domain", false, NONE);
DO_TEST("qemu-ns-domain-ns0", false, NONE);
DO_TEST("qemu-ns-domain-commandline", false, NONE);
DO_TEST("qemu-ns-domain-commandline-ns0", false, NONE);
DO_TEST("qemu-ns-commandline", false, NONE);
DO_TEST("qemu-ns-commandline-ns0", false, NONE);
DO_TEST("qemu-ns-commandline-ns1", false, NONE);
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
2.0.5
9 years, 11 months
[libvirt] [PATCH v4 0/2] Allow UEFI paths to be specified at compile time
by Michal Privoznik
diff to v3:
- basically the patch is split into two patches
- dropped shell script in to configure.ac
Michal Privoznik (2):
qemu: Allow UEFI paths to be specified at compile time
qemu: Add AAVMF to the list of known UEFIs
configure.ac | 12 ++++
src/qemu/qemu.conf | 12 +++-
src/qemu/qemu_conf.c | 68 +++++++++++++++++++---
src/qemu/test_libvirtd_qemu.aug.in | 1 +
.../domaincaps-qemu_1.6.50-1.xml | 1 +
tests/domaincapstest.c | 16 ++---
6 files changed, 93 insertions(+), 17 deletions(-)
--
2.0.5
9 years, 11 months
[libvirt] [PATCH] Fix a memory leak in virCgroupGetPercpuStats
by Ján Tomko
Coverity reports that my commit af1c98e introduced
two memory leaks:
the cpumap if ncpus == 0 in virCgroupGetPercpuStats
and the params array in the test of the function.
---
src/util/vircgroup.c | 6 ++++--
tests/vircgrouptest.c | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index e65617a..6957e81 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3061,8 +3061,10 @@ virCgroupGetPercpuStats(virCgroupPtr group,
total_cpus = virBitmapSize(cpumap);
- if (ncpus == 0)
- return total_cpus;
+ if (ncpus == 0) {
+ rv = total_cpus;
+ goto cleanup;
+ }
if (start_cpu >= total_cpus) {
virReportError(VIR_ERR_INVALID_ARG,
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index a455a81..cc1825b 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -614,6 +614,7 @@ static int testCgroupGetPercpuStats(const void *args ATTRIBUTE_UNUSED)
cleanup:
virCgroupFree(&cgroup);
+ VIR_FREE(params);
return ret;
}
--
2.0.5
9 years, 11 months
[libvirt] [PATCH] [Build-breaker : 1.2.12] Suppress compilation without dbus headers
by Prerna Saxena
Hi,
While testing 1.2.12 rc2 on Powerpc, Fedora 21, I hit a bunch of build failures in absence of dbus-devel :
src/util/virsystemd.c:284:17: note: in expansion of macro 'STREQ_NULLABLE'
if (STREQ_NULLABLE("org.freedesktop.DBus.Error.UnknownMethod",
^
....
src/util/virsystemd.c:288:17: error: implicit declaration of function 'dbus_error_free' [-Werror=implicit-function-declaration]
dbus_error_free(&error);
Found that this was because commit 318df5a05 needs Dbus libraries for compilation, and configure didnt mark "with_dbus" to be mandatory. In this case, the compilation itself failed in a much uglier
fashion on my system where dbus-devel was absent.
The following patch introduces a compile error when dbus-devel is absent, so that the build itself proceeds later without cryptic errors.
This has also been reported on the list : https://www.redhat.com/archives/libvir-list/2015-January/msg00641.html
>From 8c4f583b6bb47ca41866ff884af0cd55487f047d Mon Sep 17 00:00:00 2001
From: Prerna Saxena <prerna(a)linux.vnet.ibm.com>
Date: Sun, 25 Jan 2015 05:35:23 -0600
Subject: [PATCH] Build: Fix dbus m4 macro to correctly flag it as a required
dependency.
Commit 318df5a needs dbus headers to compile. However, this package
is listed as optional, and so this breaks libvirt compilation
on systems that lack the relevant devel files.
This patch does not allow ./configure to proceed if dbus-devel is absent.
It also tweaks the libvirt spec file to reflect this relationship.
---
libvirt.spec.in | 3 ---
m4/virt-dbus.m4 | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index ba1cf41..4dfda13 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -627,10 +627,7 @@ BuildRequires: util-linux
BuildRequires: nfs-utils
%endif
-%if %{with_firewalld}
-# Communication with the firewall daemon uses DBus
BuildRequires: dbus-devel
-%endif
# Fedora build root suckage
BuildRequires: gawk
diff --git a/m4/virt-dbus.m4 b/m4/virt-dbus.m4
index 3f9b306..42359cf 100644
--- a/m4/virt-dbus.m4
+++ b/m4/virt-dbus.m4
@@ -19,6 +19,7 @@ dnl
AC_DEFUN([LIBVIRT_CHECK_DBUS],[
LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0])
+ m4_divert_text([DEFAULTS], [with_dbus=yes])
if test "$with_dbus" = "yes" ; then
old_CFLAGS="$CFLAGS"
--
1.8.3.1
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
9 years, 11 months
[libvirt] [libvirt-test-API][PATCH] Add IPv6 section into network case
by jiahu
Add IPv6 family related scenarios to virtual network case
---
cases/basic_network.conf | 8 ++++++++
repos/network/define.py | 7 ++++++-
repos/network/xmls/network.xml | 5 +++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/cases/basic_network.conf b/cases/basic_network.conf
index e9abd57..5d1438e 100644
--- a/cases/basic_network.conf
+++ b/cases/basic_network.conf
@@ -13,6 +13,14 @@ network:define
$defaultnetend
netmode
nat
+ netip6addr
+ $netip6addr
+ netip6prefix
+ $netip6prefix
+ netip6start
+ $netip6start
+ netip6end
+ $netip6end
network:network_list
flags
diff --git a/repos/network/define.py b/repos/network/define.py
index dd054f7..6e50eb7 100644
--- a/repos/network/define.py
+++ b/repos/network/define.py
@@ -17,7 +17,12 @@ required_params = ('networkname',
'bridgenetmask',
'netstart',
'netend',
- 'netmode',)
+ 'netmode',
+ 'netip6addr',
+ 'netip6prefix',
+ 'netip6start',
+ 'netip6end',
+ )
optional_params = {'xml' : 'xmls/network.xml',
}
diff --git a/repos/network/xmls/network.xml b/repos/network/xmls/network.xml
index 220169b..97e3517 100644
--- a/repos/network/xmls/network.xml
+++ b/repos/network/xmls/network.xml
@@ -7,4 +7,9 @@
<range start="NETSTART" end="NETEND"/>
</dhcp>
</ip>
+ <ip family="ipv6" address="NETIP6ADDR" prefix="NETIP6PREFIX" >
+ <dhcp>
+ <range start="NETIP6START" end="NETIP6END" />
+ </dhcp>
+ </ip>
</network>
--
1.8.1.4
9 years, 11 months
[libvirt] [PATCH] conf: Disallow emulatorpin when numatune's in effect
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1170492
In one of our previous commits (dc8b7ce7) we've obsoleted <cputune/>
in favor of <numatune/> and others. If old element was passed it was
basically ignored and interesting settings were copied from the new
one. Well with one exception we'd forgotten about: emulatorpin.
Imagine that domain is configured as follows:
<vcpu placement='static' current='2'>6</vcpu>
<cputune>
<emulatorpin cpuset='1-3'/>
</cputune>
This is perfectly valid as only old style elements are used. However,
adding new style elements messes up the XML:
<vcpu placement='auto' current='2'>6</vcpu>
<cputune>
<emulatorpin cpuset='1-3'/>
</cputune>
<numatune>
<memory mode='strict' placement='auto'/>
</numatune>
Since <numatune/> is auto, <vcpu/> becomes auto as well. However in
that case we can't guarantee that emulator will be pinned onto
selected nodes.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_conf.c | 12 +++++++-
.../qemuxml2argv-cputune-numatune.xml | 35 ++++++++++++++++++++++
.../qemuxml2xmlout-cputune-numatune.xml | 32 ++++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
4 files changed, 79 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cputune-numatune.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-numatune.xml
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8792f5e..0b8af6d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13173,8 +13173,18 @@ virDomainDefParseXML(xmlDocPtr xml,
ctxt) < 0)
goto error;
- if (virDomainNumatuneHasPlacementAuto(def->numatune) && !def->cpumask)
+ if (virDomainNumatuneHasPlacementAuto(def->numatune) && !def->cpumask) {
+ /* If numatune is used, it obsoletes some older settings
+ * like /domain/vcpu/@placement or
+ * /domain/cputune/emulatorpin. For more info see comment
+ * a few lines above where emulatorpin is parsed. */
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO;
+ if (def->cputune.emulatorpin) {
+ VIR_WARN("Ignore emulatorpin for <numatune> placement is 'auto'");
+ virDomainVcpuPinDefFree(def->cputune.emulatorpin);
+ def->cputune.emulatorpin = NULL;
+ }
+ }
if ((n = virXPathNodeSet("./resource", ctxt, &nodes)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune-numatune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune-numatune.xml
new file mode 100644
index 0000000..9759b48
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune-numatune.xml
@@ -0,0 +1,35 @@
+<domain type='kvm'>
+ <name>dummy2</name>
+ <uuid>4d92ec27-9ebf-400b-ae91-20c71c647c19</uuid>
+ <memory unit='KiB'>131072</memory>
+ <currentMemory unit='KiB'>65536</currentMemory>
+ <vcpu placement='auto' current='2'>6</vcpu>
+ <cputune>
+ <emulatorpin cpuset='1-3'/>
+ </cputune>
+ <numatune>
+ <memory mode='strict' placement='auto'/>
+ </numatune>
+ <os>
+ <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
+ </controller>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-numatune.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-numatune.xml
new file mode 100644
index 0000000..b33f57f
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-numatune.xml
@@ -0,0 +1,32 @@
+<domain type='kvm'>
+ <name>dummy2</name>
+ <uuid>4d92ec27-9ebf-400b-ae91-20c71c647c19</uuid>
+ <memory unit='KiB'>131072</memory>
+ <currentMemory unit='KiB'>65536</currentMemory>
+ <vcpu placement='auto' current='2'>6</vcpu>
+ <numatune>
+ <memory mode='strict' placement='auto'/>
+ </numatune>
+ <os>
+ <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
+ </controller>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 4abb303..9ceda58 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -310,6 +310,7 @@ mymain(void)
DO_TEST("blkiotune-device");
DO_TEST("cputune");
DO_TEST("cputune-zero-shares");
+ DO_TEST_DIFFERENT("cputune-numatune");
DO_TEST("smp");
DO_TEST("iothreads");
--
2.0.5
9 years, 11 months
[libvirt] [libvirt-test-API][PATCH] Add global IPv6 default values to network part
by jiahu
Added below variables into global.cfg.
netip6addr/netip6prefix/netip6start/netip6end
---
global.cfg | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/global.cfg b/global.cfg
index db8f71e..56677a5 100644
--- a/global.cfg
+++ b/global.cfg
@@ -195,6 +195,15 @@ defaultnetstart = 192.168.111.2
# default the ending address ip
defaultnetend = 192.168.111.254
+# default bridge ipv6 addr
+netip6addr = 2001:db8:ca2:99::1
+# default bridge ipv6 prefix
+netip6prefix = 64
+# default the starting ipv6 address
+netip6start = 2001:db8:ca2:99::11
+# default the ending ipv6 address
+netip6end = 2001:db8:ca2:99::ff
+
################################################################
#
# host interface
--
1.8.1.4
9 years, 11 months