[libvirt] [PATCH 00/12] Add IV Secret Object support
by John Ferlan
The first 5 patches handle changing the current mechanism of getting
the secret while building the command line into a mechanism where the
secret is built and stored as part of the disk or hostdev private data
and then parsed during command line generation. The end result is to
remove the 'conn' parameter from the qemuBuildCommandLine.
The next 5 patches deal with some hotplug cleanup that was necessary
in order to "more easily" handle having a secret object as a possible
option instead of relying on the '-drive' string to hold the secret.
The last 2 patches are the resulting initialization vector patches.
They haven't been fully tested or vetted, but I figured getting something
"out there" for review would give me some more time to figure out a
proper test environment. At the very least each of the first two
groups of 5 patches could be their own series - it's just that they
ended up being part of this code.
John Ferlan (12):
qemu: Introduce qemuDomainSecretInfo
qemu: Introduce qemuDomainSecretPrepare and Destroy
qemu: Introduce qemuDomainHostdevPrivatePtr
qemu: Introduce qemuDomainSecretHostdevPrepare and Destroy
qemu: Use qemuDomainSecretInfoPtr in qemuBuildNetworkDriveURI
qemu: hotplug: Assume support for -device for attach virtio disk
qemu: hotplug: Adjust error path for attach virtio disk
qemu: hotplug: Adjust error path for attach scsi disk
qemu: hotplug: Adjust error path for attach hostdev scsi disk
qemu: hotplug: Fix possible memory leak of props
qemu: Introduce qemuDomainSecretIV
qemu: Utilize qemu secret objects for SCSI/RBD auth/secret
configure.ac | 1 +
src/conf/domain_conf.c | 28 ++-
src/conf/domain_conf.h | 7 +-
src/lxc/lxc_native.c | 4 +-
src/qemu/qemu_alias.c | 23 ++
src/qemu/qemu_alias.h | 2 +
src/qemu/qemu_command.c | 321 ++++++++++++++++++--------
src/qemu/qemu_command.h | 20 +-
src/qemu/qemu_domain.c | 508 +++++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_domain.h | 81 ++++++-
src/qemu/qemu_driver.c | 13 +-
src/qemu/qemu_hotplug.c | 309 ++++++++++++++++---------
src/qemu/qemu_hotplug.h | 4 +-
src/qemu/qemu_parse_command.c | 4 +-
src/qemu/qemu_process.c | 13 +-
src/vbox/vbox_common.c | 4 +-
src/xenconfig/xen_common.c | 4 +-
src/xenconfig/xen_sxpr.c | 4 +-
tests/virhostdevtest.c | 3 +-
19 files changed, 1107 insertions(+), 246 deletions(-)
--
2.5.5
8 years, 8 months
[libvirt] [PATCH] qemuxml2argvtest: Adapt to ethernet automatic tap creation
by Michal Privoznik
After 9c17d665fdc5 the tap device for ethernet network type is
automatically precreated before spawning qemu. Problem is, the
qemuxml2argvtest wasn't updated and thus is failing. Because of
all the APIs that new code is calling, I had to mock a lot. Also,
since the tap FDs are labeled separately from the rest of the
devices/files I had to enable NOP security driver for the test
too.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
There are only 2 problems with this patch. All of them are in
virNetDevTapCreate mock implementation:
1) new tap device has constant name. Even within one domain
2) new tap FDs are constant. Even within one domain
I'm unable to come with better approach though. Having a static variable that
is incremented each time the mock is called would not fly as it will give
different results when combined with VIR_TEST_RANGE.
Therefore I assume we are good so far with these two limitations.
cfg.mk | 2 +-
tests/qemuhotplugtest.c | 7 ----
.../qemuxml2argv-graphics-spice-timeout.args | 2 +-
.../qemuxml2argv-net-eth-ifname.args | 2 +-
.../qemuxml2argv-net-eth-names.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 2 +-
tests/qemuxml2argvmock.c | 49 ++++++++++++++++++++--
tests/testutilsqemu.c | 9 ++++
8 files changed, 61 insertions(+), 16 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 6f28eef..f5573db 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1139,7 +1139,7 @@ exclude_file_name_regexp--sc_copyright_usage = \
^COPYING(|\.LESSER)$$
exclude_file_name_regexp--sc_flags_usage = \
- ^(docs/|src/util/virnetdevtap\.c$$|tests/(vir(cgroup|pci|usb)|nss)mock\.c$$)
+ ^(docs/|src/util/virnetdevtap\.c$$|tests/(vir(cgroup|pci|usb)|nss|qemuxml2argv)mock\.c$$)
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
^(src/rpc/gendispatch\.pl$$|tests/)
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 2298a68..1eb2b6a 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -341,7 +341,6 @@ 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);
@@ -369,12 +368,6 @@ mymain(void)
if (!driver.lockManager)
return EXIT_FAILURE;
- if (!(mgr = virSecurityManagerNew("none", "qemu",
- VIR_SECURITY_MANAGER_PRIVILEGED)))
- return EXIT_FAILURE;
- if (!(driver.securityManager = virSecurityManagerNewStack(mgr)))
- return EXIT_FAILURE;
-
/* wait only 100ms for DEVICE_DELETED event */
qemuDomainRemoveDeviceWaitTime = 100;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
index 7ca17ae..8a29a7e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
@@ -26,7 +26,7 @@ id=virtio-disk0 \
media=cdrom,id=drive-ide0-1-0 \
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
-device rtl8139,vlan=0,id=net0,mac=52:54:00:71:70:89,bus=pci.0,addr=0x7 \
--net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 \
+-net tap,fd=3,vlan=0,name=hostnet0 \
-serial pty \
-device usb-tablet,id=input0 \
-spice port=5900 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.args b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.args
index 22d6dd0..b96c933 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.args
@@ -20,4 +20,4 @@ QEMU_AUDIO_DRV=none \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device rtl8139,vlan=0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,addr=0x3 \
--net tap,ifname=nic02,script=/etc/qemu-ifup,vlan=0,name=hostnet0
+-net tap,fd=3,vlan=0,name=hostnet0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args
index 0704178..a2c3f87 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args
@@ -20,7 +20,7 @@ QEMU_AUDIO_DRV=none \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device rtl8139,vlan=0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,addr=0x3 \
--net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 \
+-net tap,fd=3,vlan=0,name=hostnet0 \
-device e1000,vlan=1,id=net1,mac=00:11:22:33:44:56,bus=pci.0,addr=0x4 \
--net tap,script=/etc/qemu-ifup,vlan=1,name=hostnet1 \
+-net tap,fd=3,vlan=1,name=hostnet1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.args b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.args
index b69cf52..b96c933 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.args
@@ -20,4 +20,4 @@ QEMU_AUDIO_DRV=none \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device rtl8139,vlan=0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,addr=0x3 \
--net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0
+-net tap,fd=3,vlan=0,name=hostnet0
diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index b7dfebb..e2c19a6 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -21,12 +21,15 @@
#include <config.h>
#include "internal.h"
-#include "virnuma.h"
+#include "vircommand.h"
#include "virmock.h"
-#include "virutil.h"
+#include "virnetdev.h"
+#include "virnetdevtap.h"
+#include "virnuma.h"
+#include "virscsi.h"
#include "virstring.h"
#include "virtpm.h"
-#include "virscsi.h"
+#include "virutil.h"
#include <time.h>
#include <unistd.h>
@@ -98,3 +101,43 @@ virSCSIDeviceGetSgName(const char *sysfs_prefix ATTRIBUTE_UNUSED,
ignore_value(VIR_STRDUP(ret, "sg0"));
return ret;
}
+
+int
+virNetDevTapCreate(char **ifname,
+ const char *tunpath ATTRIBUTE_UNUSED,
+ int *tapfd,
+ size_t tapfdSize,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ size_t i;
+
+ for (i = 0; i < tapfdSize; i++)
+ tapfd[i] = STDERR_FILENO + 1 + i;
+
+ return VIR_STRDUP(*ifname, "vnet0");
+}
+
+int
+virNetDevSetMAC(const char *ifname ATTRIBUTE_UNUSED,
+ const virMacAddr *macaddr ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+int
+virCommandRun(virCommandPtr cmd ATTRIBUTE_UNUSED,
+ int *exitstatus)
+{
+ if (exitstatus)
+ *exitstatus = 0;
+
+ return 0;
+}
+
+void
+virCommandPassFD(virCommandPtr cmd ATTRIBUTE_UNUSED,
+ int fd ATTRIBUTE_UNUSED,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ /* nada */
+}
diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index 1f854f5..eb4c6c8 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -555,6 +555,8 @@ int qemuTestCapsCacheInsert(virQEMUCapsCachePtr cache, const char *binary,
int qemuTestDriverInit(virQEMUDriver *driver)
{
+ virSecurityManagerPtr mgr = NULL;
+
memset(driver, 0, sizeof(*driver));
if (virMutexInit(&driver->lock) < 0)
@@ -588,9 +590,16 @@ int qemuTestDriverInit(virQEMUDriver *driver)
if (qemuTestCapsCacheInsert(driver->qemuCapsCache, "empty", NULL) < 0)
goto error;
+ if (!(mgr = virSecurityManagerNew("none", "qemu",
+ VIR_SECURITY_MANAGER_PRIVILEGED)))
+ goto error;
+ if (!(driver->securityManager = virSecurityManagerNewStack(mgr)))
+ goto error;
+
return 0;
error:
+ virObjectUnref(mgr);
qemuTestDriverFree(driver);
return -1;
}
--
2.7.3
8 years, 8 months
[libvirt] [libvirt-php PATCH 00/35] Add PHP7 support and unit tests
by Neal Gompa
First, I apologize if this was sent twice to anyone. I had an error
in my git send-email configuration.
This patch set primarily adds support for PHP 7 to libvirt-php,
but also adds the capability for libvirt-php to be built
using the standard PHP extension build system method.
Several tests have been updated and added by Remi Collet (Fedora PHP stack maintainer)
and Frederic Mora (my colleague who graciously assisted in this effort).
I intend to provide more tests over time, but I think this is a good start.
These tests can be run through `make tests` in the new build system.
Instructions for using the new build system is also included.
The original build system still properly builds libvirt-php on
either PHP 5.6 or PHP 7.0. This was tested using Remi's PHP 5.6
and PHP 7.0 software collections on CentOS 7.2.
Most of this work was done by Remi Collet several weeks ago,
with Chuck Roydhouse doing work to ensure that Vasiliy Tolstov's
patches from the current git master could be incorporated into this work.
They are included in this patch set, but should be the same as what is
in the tree now. This work started before he posted his commits and
they were merged, and were merged in to ensure that it could remain
working.
The version number was bumped to 0.5.2 by Remi, and I bumped it in the
main build system simply for consistency.
I would greatly appreciate a quick review and merge of this patch set.
Chuck Roydhouse (1):
add arginfo for libvirt_domain_block_commit and
libvirt_domain_block_job_info
Frederic Mora (1):
Add more tests
Neal Gompa (2):
Commit short instructions to using the php extension build method
Bump version to 0.5.2
Remi Collet (28):
add config.m4 to allow standard PHP extension build system
include config.h earlier
add missing arginfo (wip)
fix typo in config.m4
add missing arginfo, part 2
adapt RETURN_STRING
work on zpp
register + fetch resources + hash
adapt add_assoc_string_ex
clean ALLOC_INIT_ZVAL
zend_hash_update
add_next_index_string
buildable with PHP 7
bump version 0.5.2-dev
fix zpp
fix missed (hidden) zpp calls
fix PHP 5 compat
fix libvirt_version + add test
port test-connect.phpt to real phpt
Switch all add_assoc_string_ex to add_assoc_string to avoid nul char
management
Fix max_connections management
add test-conn-limit.phpt (as real phpt)
add test-connect-get-emulator.phpt
fix parse_array + build warnings
convert test-install.phpt to real phpt
convert test-domain-create-and-coredump.phpt to real phpt
convert test-domain-create-and-get-xpath.phpt to real phpt
fix PHP 5 compat again (nested macro issue)
Vasiliy Tolstov (3):
add some checks to prevent overflow
add block_commit support and needed const
add libvirt_domain_block_job_info
8 years, 8 months
[libvirt] [PATCH v3 0/6] vz: change vz driver to be stateful driver and other enhancements
by Maxim Nestratov
There is no benefit in providing two ways of connecting to vz driver:
by connecting via daemon and directly from client. Both ways finally
come to a host where vz daemon sits. Always connecting via daemon allows
us to have a single list of domains and share it among all connections.
Since v1:
removed patch "z: remove close callback implementations"
building fixed
close callback functions are added to libvirt_private.syms
reworked not to lose event subscribers when connections drop
Since v2:
removed "vz: change vzConnectIsAlive behavior"
addressed mostly all comments on previous series
changed "vz: build driver as module and don't register it on client's side"
Maxim Nestratov (6):
vz: build driver as module and don't register it on client's side
vz: introduce new vzDriver lockable structure and use it
vz: lock driver when a new domain is created in
prlsdkNewDomainByHandle
vz: implement connectGetSysinfo hypervisor callback
vz: remove vzDriverLock/Unlock function
vz: minor cleanup
daemon/Makefile.am | 4 +
daemon/libvirtd.c | 9 ++
src/Makefile.am | 19 ++-
src/libvirt.c | 7 -
src/libvirt_private.syms | 7 +
src/vz/vz_driver.c | 384 +++++++++++++++++++++++++++++------------------
src/vz/vz_sdk.c | 211 +++++++++++++-------------
src/vz/vz_sdk.h | 30 ++--
src/vz/vz_utils.c | 27 ++--
src/vz/vz_utils.h | 34 +++--
10 files changed, 431 insertions(+), 301 deletions(-)
--
2.4.3
8 years, 8 months
[libvirt] [PATCH v2 00/10] vz: change vz driver to be stateful driver and other enhancements
by Maxim Nestratov
There is no benefit in providing two ways of connecting to vz driver:
by connecting via daemon and directly from client. Both ways finally
come to a host where vz daemon sits. Always connecting via daemon allows
us to have a single list of domains and share it among all connections.
Since v1:
removed patch "z: remove close callback implementations"
building fixed
close callback functions are added to libvirt_private.syms
reworked not to lose event subscribers when connections drop
Maxim Nestratov (10):
virsh: report when vz driver is compiled
vz: change the order of capabilities reported
vz: remove drivername field from vzConn structure
vz: add Hypervisor prefix to vz and parallels Driver structures
vz: build driver as module and don't register it on client's side
vz: introduce new vzDriver lockable structure and use it
vz: implement connectGetSysinfo hypervisor callback
vz: remove vzDriverLock/Unlock function
vz: minor cleanup
vz: change vzConnectIsAlive behavior
daemon/Makefile.am | 4 +
daemon/libvirtd.c | 9 ++
src/Makefile.am | 20 ++-
src/libvirt.c | 7 -
src/libvirt_private.syms | 6 +
src/vz/vz_driver.c | 414 +++++++++++++++++++++++++++++------------------
src/vz/vz_sdk.c | 211 ++++++++++++------------
src/vz/vz_sdk.h | 30 ++--
src/vz/vz_utils.c | 32 ++--
src/vz/vz_utils.h | 33 +++-
tools/virsh.c | 3 +
11 files changed, 452 insertions(+), 317 deletions(-)
--
2.4.3
8 years, 8 months
[libvirt] [PATCH v2] util: Add virGettextInitialize, convert the code
by Cole Robinson
Take setlocale/gettext error handling pattern from tools/virsh-*
and use it for all standalone binaries via a new shared
virGettextInitialize routine. The virsh* pattern differed slightly
from other callers. All users now consistently:
* Ignore setlocale errors. virsh has done this forever, presumably for
good reason. This has been partially responsible for some bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=1312688
https://bugzilla.redhat.com/show_bug.cgi?id=1026514
https://bugzilla.redhat.com/show_bug.cgi?id=1016158
* Report the failed function name
* Report strerror
---
v2:
Add virGettextInitialize rather than duplicate the code everywhere
daemon/libvirtd.c | 6 ++---
src/Makefile.am | 2 ++
src/libvirt_private.syms | 4 ++++
src/locking/lock_daemon.c | 6 ++---
src/locking/sanlock_helper.c | 9 ++-----
src/logging/log_daemon.c | 6 ++---
src/lxc/lxc_controller.c | 6 ++---
src/network/leaseshelper.c | 12 +++-------
src/security/virt-aa-helper.c | 12 +++-------
src/storage/parthelper.c | 9 ++-----
src/util/iohelper.c | 13 +++-------
src/util/virgettext.c | 56 +++++++++++++++++++++++++++++++++++++++++++
src/util/virgettext.h | 25 +++++++++++++++++++
tools/virsh.c | 15 ++----------
tools/virt-admin.c | 15 ++----------
tools/virt-host-validate.c | 15 ++----------
tools/virt-login-shell.c | 14 ++---------
tools/vsh.c | 2 --
18 files changed, 116 insertions(+), 111 deletions(-)
create mode 100644 src/util/virgettext.c
create mode 100644 src/util/virgettext.h
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 3d38a46..5f66e8b 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -30,7 +30,6 @@
#include <getopt.h>
#include <stdlib.h>
#include <grp.h>
-#include <locale.h>
#include "libvirt_internal.h"
#include "virerror.h"
@@ -58,6 +57,7 @@
#include "locking/lock_manager.h"
#include "viraccessmanager.h"
#include "virutil.h"
+#include "virgettext.h"
#ifdef WITH_DRIVER_MODULES
# include "driver.h"
@@ -1172,9 +1172,7 @@ int main(int argc, char **argv) {
{0, 0, 0, 0}
};
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
+ if (virGettextInitialize() < 0 ||
virInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/Makefile.am b/src/Makefile.am
index eda0365..38b9560 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -114,6 +114,7 @@ UTIL_SOURCES = \
util/virfile.c util/virfile.h \
util/virfirewall.c util/virfirewall.h \
util/virfirewallpriv.h \
+ util/virgettext.c util/virgettext.h \
util/virgic.c util/virgic.h \
util/virhash.c util/virhash.h \
util/virhashcode.c util/virhashcode.h \
@@ -2321,6 +2322,7 @@ libvirt_setuid_rpc_client_la_SOURCES = \
util/virevent.c \
util/vireventpoll.c \
util/virfile.c \
+ util/virgettext.c \
util/virhash.c \
util/virhashcode.c \
util/virjson.c \
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 068bc00..af7de8a 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1517,6 +1517,10 @@ virFirewallStartRollback;
virFirewallStartTransaction;
+# util/virgettext.h
+virGettextInitialize;
+
+
# util/virgic.h
virGICVersionTypeFromString;
virGICVersionTypeToString;
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 973e691..bfdcfc6 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -28,7 +28,6 @@
#include <sys/stat.h>
#include <getopt.h>
#include <stdlib.h>
-#include <locale.h>
#include "lock_daemon.h"
@@ -47,6 +46,7 @@
#include "virhash.h"
#include "viruuid.h"
#include "virstring.h"
+#include "virgettext.h"
#include "locking/lock_daemon_dispatch.h"
#include "locking/lock_protocol.h"
@@ -1179,9 +1179,7 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
+ if (virGettextInitialize() < 0 ||
virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
diff --git a/src/locking/sanlock_helper.c b/src/locking/sanlock_helper.c
index d8d294f..57e1cfb 100644
--- a/src/locking/sanlock_helper.c
+++ b/src/locking/sanlock_helper.c
@@ -1,13 +1,12 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
-#include <locale.h>
-#include "configmake.h"
#include "internal.h"
#include "virconf.h"
#include "viralloc.h"
#include "domain_conf.h"
+#include "virgettext.h"
static int
@@ -70,12 +69,8 @@ main(int argc, char **argv)
.cb = authCallback,
};
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ if (virGettextInitialize() < 0)
exit(EXIT_FAILURE);
- }
if (getArgs(argc, argv, &uri, &uuid, &action) < 0)
goto cleanup;
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index f674cbd..70339af 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -28,7 +28,6 @@
#include <sys/stat.h>
#include <getopt.h>
#include <stdlib.h>
-#include <locale.h>
#include "log_daemon.h"
@@ -46,6 +45,7 @@
#include "virhash.h"
#include "viruuid.h"
#include "virstring.h"
+#include "virgettext.h"
#include "log_daemon_dispatch.h"
#include "log_protocol.h"
@@ -936,9 +936,7 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
+ if (virGettextInitialize() < 0 ||
virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 8b5ec4c..73e57e3 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -36,7 +36,6 @@
#include <signal.h>
#include <getopt.h>
#include <sys/mount.h>
-#include <locale.h>
#include <grp.h>
#include <sys/stat.h>
#include <time.h>
@@ -66,6 +65,7 @@
#include "virdbus.h"
#include "rpc/virnetdaemon.h"
#include "virstring.h"
+#include "virgettext.h"
#define VIR_FROM_THIS VIR_FROM_LXC
@@ -2505,9 +2505,7 @@ int main(int argc, char *argv[])
for (i = 0; i < VIR_LXC_DOMAIN_NAMESPACE_LAST; i++)
ns_fd[i] = -1;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
+ if (virGettextInitialize() < 0 ||
virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index 097cd11..16f6eb8 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -25,7 +25,6 @@
#include <config.h>
-#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
@@ -38,6 +37,7 @@
#include "virjson.h"
#include "virlease.h"
#include "configmake.h"
+#include "virgettext.h"
#define VIR_FROM_THIS VIR_FROM_NETWORK
@@ -115,14 +115,8 @@ main(int argc, char **argv)
program_name = argv[0];
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), program_name);
- exit(EXIT_FAILURE);
- }
-
- if (virThreadInitialize() < 0 ||
+ if (virGettextInitialize() < 0 ||
+ virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), program_name);
exit(EXIT_FAILURE);
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 50d2a08..5db9c02 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -35,7 +35,6 @@
#include <fcntl.h>
#include <getopt.h>
#include <sys/utsname.h>
-#include <locale.h>
#include "internal.h"
#include "virbuffer.h"
@@ -54,6 +53,7 @@
#include "configmake.h"
#include "virrandom.h"
#include "virstring.h"
+#include "virgettext.h"
#include "storage/storage_driver.h"
@@ -1298,14 +1298,8 @@ main(int argc, char **argv)
char *profile = NULL;
char *include_file = NULL;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
- exit(EXIT_FAILURE);
- }
-
- if (virThreadInitialize() < 0 ||
+ if (virGettextInitialize() < 0 ||
+ virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index d1df068..6695f23 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -39,13 +39,12 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <locale.h>
#include "virutil.h"
#include "virfile.h"
#include "c-ctype.h"
-#include "configmake.h"
#include "virstring.h"
+#include "virgettext.h"
/* we don't need to include the full internal.h just for this */
#define STREQ(a, b) (strcmp(a, b) == 0)
@@ -72,12 +71,8 @@ int main(int argc, char **argv)
const char *partsep;
bool devmap_nopartsep = false;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ if (virGettextInitialize() < 0)
exit(EXIT_FAILURE);
- }
if (argc == 3 && STREQ(argv[2], "-g")) {
cmd = DISK_GEOMETRY;
diff --git a/src/util/iohelper.c b/src/util/iohelper.c
index 8a3c377..275f993 100644
--- a/src/util/iohelper.c
+++ b/src/util/iohelper.c
@@ -27,7 +27,6 @@
#include <config.h>
-#include <locale.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
@@ -38,9 +37,9 @@
#include "virfile.h"
#include "viralloc.h"
#include "virerror.h"
-#include "configmake.h"
#include "virrandom.h"
#include "virstring.h"
+#include "virgettext.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
@@ -230,14 +229,8 @@ main(int argc, char **argv)
program_name = argv[0];
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), program_name);
- exit(EXIT_FAILURE);
- }
-
- if (virThreadInitialize() < 0 ||
+ if (virGettextInitialize() < 0 ||
+ virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), program_name);
exit(EXIT_FAILURE);
diff --git a/src/util/virgettext.c b/src/util/virgettext.c
new file mode 100644
index 0000000..7e32043
--- /dev/null
+++ b/src/util/virgettext.c
@@ -0,0 +1,56 @@
+/*
+ * virgettext.c: gettext helper routines
+ *
+ * Copyright (C) 2016 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/>.
+ */
+
+#include <config.h>
+
+#include <locale.h>
+#include <stdio.h>
+
+#include "configmake.h"
+#include "internal.h"
+#include "virgettext.h"
+
+
+/**
+ * virGettextInit:
+ *
+ * Initialize standard gettext setup
+ * Returns -1 on fatal error
+ */
+int
+virGettextInitialize(void)
+{
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ return -1;
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/src/util/virgettext.h b/src/util/virgettext.h
new file mode 100644
index 0000000..4584d83
--- /dev/null
+++ b/src/util/virgettext.h
@@ -0,0 +1,25 @@
+/*
+ * virgettext.h: gettext helper routines
+ *
+ * Copyright (C) 2016 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/>.
+ */
+#ifndef __VIR_GETTEXT_H__
+# define __VIR_GETTEXT_H__
+
+int virGettextInitialize(void);
+
+#endif /* __VIR_GETTEXT_H__ */
diff --git a/tools/virsh.c b/tools/virsh.c
index fe33839..f632405 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -34,7 +34,6 @@
#include <getopt.h>
#include <sys/time.h>
#include <fcntl.h>
-#include <locale.h>
#include <time.h>
#include <limits.h>
#include <sys/stat.h>
@@ -53,12 +52,12 @@
#include <libvirt/libvirt-qemu.h>
#include <libvirt/libvirt-lxc.h>
#include "virfile.h"
-#include "configmake.h"
#include "virthread.h"
#include "vircommand.h"
#include "conf/domain_conf.h"
#include "virtypedparam.h"
#include "virstring.h"
+#include "virgettext.h"
#include "virsh-console.h"
#include "virsh-domain.h"
@@ -933,18 +932,8 @@ main(int argc, char **argv)
progname++;
ctl->progname = progname;
- if (!setlocale(LC_ALL, "")) {
- perror("setlocale");
- /* failure to setup locale is not fatal */
- }
- if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
- perror("bindtextdomain");
- return EXIT_FAILURE;
- }
- if (!textdomain(PACKAGE)) {
- perror("textdomain");
+ if (virGettextInitialize() < 0)
return EXIT_FAILURE;
- }
if (isatty(STDIN_FILENO)) {
ctl->istty = true;
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index f0a49a3..195088b 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -25,20 +25,19 @@
#include <errno.h>
#include <getopt.h>
-#include <locale.h>
#if WITH_READLINE
# include <readline/readline.h>
# include <readline/history.h>
#endif
-#include "configmake.h"
#include "internal.h"
#include "viralloc.h"
#include "virerror.h"
#include "virfile.h"
#include "virstring.h"
#include "virthread.h"
+#include "virgettext.h"
/* Gnulib doesn't guarantee SA_SIGINFO support. */
#ifndef SA_SIGINFO
@@ -689,18 +688,8 @@ main(int argc, char **argv)
progname++;
ctl->progname = progname;
- if (!setlocale(LC_ALL, "")) {
- perror("setlocale");
- /* failure to setup locale is not fatal */
- }
- if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
- perror("bindtextdomain");
- return EXIT_FAILURE;
- }
- if (!textdomain(PACKAGE)) {
- perror("textdomain");
+ if (virGettextInitialize() < 0)
return EXIT_FAILURE;
- }
if (isatty(STDIN_FILENO)) {
ctl->istty = true;
diff --git a/tools/virt-host-validate.c b/tools/virt-host-validate.c
index a8c2075..5b7fe9b 100644
--- a/tools/virt-host-validate.c
+++ b/tools/virt-host-validate.c
@@ -25,10 +25,9 @@
#include <stdlib.h>
#include <gettext.h>
#include <getopt.h>
-#include <locale.h>
#include "internal.h"
-#include "configmake.h"
+#include "virgettext.h"
#include "virt-host-validate-common.h"
#if WITH_QEMU
@@ -80,18 +79,8 @@ main(int argc, char **argv)
bool quiet = false;
bool usedHvname = false;
- if (!setlocale(LC_ALL, "")) {
- perror("setlocale");
- /* failure to setup locale is not fatal */
- }
- if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
- perror("bindtextdomain");
- return EXIT_FAILURE;
- }
- if (!textdomain(PACKAGE)) {
- perror("textdomain");
+ if (virGettextInitialize() < 0)
return EXIT_FAILURE;
- }
while ((c = getopt_long(argc, argv, "hvq", argOptions, NULL)) != -1) {
switch (c) {
diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index ec759dc..8f87227 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -24,7 +24,6 @@
#include <errno.h>
#include <fnmatch.h>
#include <getopt.h>
-#include <locale.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
@@ -41,6 +40,7 @@
#include "virstring.h"
#include "viralloc.h"
#include "vircommand.h"
+#include "virgettext.h"
#define VIR_FROM_THIS VIR_FROM_NONE
static const char *conf_file = SYSCONFDIR "/libvirt/virt-login-shell.conf";
@@ -207,18 +207,8 @@ main(int argc, char **argv)
virSetErrorLogPriorityFunc(NULL);
progname = argv[0];
- if (!setlocale(LC_ALL, "")) {
- perror("setlocale");
- /* failure to setup locale is not fatal */
- }
- if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
- perror("bindtextdomain");
- return ret;
- }
- if (!textdomain(PACKAGE)) {
- perror("textdomain");
+ if (virGettextInitialize() < 0)
return ret;
- }
while ((arg = getopt_long(argc, argv, "hV", opt, &longindex)) != -1) {
switch (arg) {
diff --git a/tools/vsh.c b/tools/vsh.c
index 6bdc082..f033c05 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -35,7 +35,6 @@
#include <sys/time.h>
#include "c-ctype.h"
#include <fcntl.h>
-#include <locale.h>
#include <time.h>
#include <limits.h>
#include <sys/stat.h>
@@ -55,7 +54,6 @@
#include <libvirt/libvirt-qemu.h>
#include <libvirt/libvirt-lxc.h>
#include "virfile.h"
-#include "configmake.h"
#include "virthread.h"
#include "vircommand.h"
#include "conf/domain_conf.h"
--
2.7.3
8 years, 8 months
[libvirt] [PATCH 00/15] support for pxb and pxb-pcie controllers
by Laine Stump
These two controllers are used to create a new root bus on a 440fx
(pxb) or q35 (pxb-pie) virtual machine. There may be other use cases,
but the main reason for me taking the time to support a separate root
bus is to have assigned devices be visible in the guest on a different
NUMA node, so that the guest can be aware of the locality of the
device wrt CPU and memory that are on different NUMA nodes - although
you aren't required to, you can add a <node>N</node> subelement to the
bus' <target> element to indicate which NUMA node it is on (it's up to
the management application to place devices on that bus that really
are on the given NUMA node in the host).
There are several differences between pxb and pxb-pcie, which are
detailed in the individual commit log messages, but in short:
1) pxb is for 440fx, pxb-pcie for q35 (they *might* work on other
arches/machinetypes that have a PCI or PCIe bus, but I haven't enabled
that)
2) pxb has an integrate d pci-bridge with 32 slots that are (should
be) hotplug-capable, while pxb-pcie supplies only a single slot, and
it will only accept a pcie-root-port (which will then accept a single
device, hotplug-capable) or a pcie-switch-upstream-port.
Along the way I encountered a few minor problems/ugliness that I took
care of in patches 01/15 - 09/15. pxb support is in 10-12, and
pxb-pcie is in 13-15
There is a bugzilla record associated with this:
https://bugzilla.redhat.com/show_bug.cgi?id=1103314
Laine Stump (15):
schema: make pci slot and function optional
schema: rename uint8range/uint24range to uint8/uint24
schema: new basic type - uint16
schema: allow pci address attributes to be in decimal
conf: use #define instead of literal for highest slot in upstream port
conf: allow use of slot 0 in a dmi-to-pci-bridge
conf/qemu: change the way VIR_PCI_CONNECT_TYPE_* flags work
conf: utility function to convert PCI controller model into connect
type
qemu: set PCI controller default modelName in a separate function
qemu: add capabilities bit for device "pxb"
conf: new pci controller model pci-expander-bus
qemu: support new pci controller model "pci-expander-bus"
qemu: add capabilities bit for device "pxb-pcie"
conf: new pci controller model pcie-expander-bus
qemu: support new pci controller model "pcie-expander-bus"
docs/formatdomain.html.in | 74 +++-
docs/schemas/basictypes.rng | 63 ++--
docs/schemas/domaincommon.rng | 23 +-
docs/schemas/networkcommon.rng | 12 +-
docs/schemas/nwfilter.rng | 16 +-
src/bhyve/bhyve_device.c | 10 +-
src/conf/domain_addr.c | 119 +++++--
src/conf/domain_addr.h | 68 ++--
src/conf/domain_conf.c | 61 +++-
src/conf/domain_conf.h | 11 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 74 ++++
src/qemu/qemu_domain.c | 42 +++
src/qemu/qemu_domain_address.c | 305 +++++++++-------
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 2 +
tests/qemucapabilitiesdata/caps_2.6.0-1.replies | 3 +
.../qemuxml2argv-aarch64-virtio-pci-default.args | 2 +-
...l2argv-aarch64-virtio-pci-manual-addresses.args | 2 +-
.../qemuxml2argv-pci-expander-bus-bad-machine.xml | 167 +++++++++
.../qemuxml2argv-pci-expander-bus-bad-node.xml | 160 +++++++++
.../qemuxml2argv-pci-expander-bus.args | 87 +++++
.../qemuxml2argv-pci-expander-bus.xml | 167 +++++++++
.../qemuxml2argv-pcie-expander-bus-bad-machine.xml | 36 ++
.../qemuxml2argv-pcie-expander-bus.args | 123 +++++++
.../qemuxml2argv-pcie-expander-bus.xml | 247 +++++++++++++
.../qemuxml2argv-pcie-root-port.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 2 +-
.../qemuxml2argv-pcie-switch-downstream-port.args | 2 +-
.../qemuxml2argv-pcie-switch-upstream-port.args | 2 +-
.../qemuxml2argv-pcihole64-q35.args | 2 +-
.../qemuxml2argv-q35-pm-disable-fallback.args | 2 +-
.../qemuxml2argv-q35-pm-disable.args | 2 +-
.../qemuxml2argv-q35-usb2-multi.args | 2 +-
.../qemuxml2argv-q35-usb2-reorder.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 +-
.../qemuxml2argv-usb-controller-default-q35.args | 2 +-
.../qemuxml2argv-usb-controller-explicit-q35.args | 2 +-
tests/qemuxml2argvtest.c | 25 ++
.../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 2 +-
...2xmlout-aarch64-virtio-pci-manual-addresses.xml | 2 +-
.../qemuxml2xmlout-pci-expander-bus.xml | 207 +++++++++++
.../qemuxml2xmlout-pcie-expander-bus.xml | 384 +++++++++++++++++++++
.../qemuxml2xmlout-pcie-root-port.xml | 2 +-
.../qemuxml2xmlout-pcie-root.xml | 2 +-
.../qemuxml2xmlout-pcie-switch-downstream-port.xml | 2 +-
.../qemuxml2xmlout-pcie-switch-upstream-port.xml | 2 +-
.../qemuxml2xmlout-pcihole64-q35.xml | 2 +-
.../qemuxml2xmlout-q35-usb2-multi.xml | 2 +-
.../qemuxml2xmlout-q35-usb2-reorder.xml | 2 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 2 +-
tests/qemuxml2xmltest.c | 10 +
57 files changed, 2296 insertions(+), 261 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus-bad-machine.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus-bad-node.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus-bad-machine.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-expander-bus.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml
--
2.5.5
8 years, 8 months
[libvirt] [PATCH] Be consistent with setlocale error handling
by Cole Robinson
Take setlocale/gettext error handling pattern from tools/virsh-*
and use it in all the other standalone binaries. The changes are
* Ignore setlocale errors. virsh has done this forever, presumably for
good reason. This has been partially responsible for some bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=1312688
https://bugzilla.redhat.com/show_bug.cgi?id=1026514
https://bugzilla.redhat.com/show_bug.cgi?id=1016158
* Report the failed function name
* Report strerror
---
daemon/libvirtd.c | 20 ++++++++++++++++----
src/locking/lock_daemon.c | 20 ++++++++++++++++----
src/locking/sanlock_helper.c | 16 ++++++++++++----
src/logging/log_daemon.c | 20 ++++++++++++++++----
src/lxc/lxc_controller.c | 20 ++++++++++++++++----
src/network/leaseshelper.c | 16 ++++++++++++----
src/security/virt-aa-helper.c | 16 ++++++++++++----
src/storage/parthelper.c | 16 ++++++++++++----
src/util/iohelper.c | 16 ++++++++++++----
9 files changed, 124 insertions(+), 36 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 3d38a46..9488950 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -1172,10 +1172,22 @@ int main(int argc, char **argv) {
{0, 0, 0, 0}
};
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
- virInitialize() < 0) {
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (virInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
}
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 973e691..fffbe1d 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -1179,10 +1179,22 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
- virThreadInitialize() < 0 ||
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/locking/sanlock_helper.c b/src/locking/sanlock_helper.c
index d8d294f..6b17fce 100644
--- a/src/locking/sanlock_helper.c
+++ b/src/locking/sanlock_helper.c
@@ -70,10 +70,18 @@ main(int argc, char **argv)
.cb = authCallback,
};
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
exit(EXIT_FAILURE);
}
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index f674cbd..8a0de22 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -936,10 +936,22 @@ int main(int argc, char **argv) {
privileged = geteuid() == 0;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
- virThreadInitialize() < 0 ||
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 8b5ec4c..612c0d7 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -2505,10 +2505,22 @@ int main(int argc, char *argv[])
for (i = 0; i < VIR_LXC_DOMAIN_NAMESPACE_LAST; i++)
ns_fd[i] = -1;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL ||
- virThreadInitialize() < 0 ||
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (virThreadInitialize() < 0 ||
virErrorInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index 097cd11..e753e75 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -115,10 +115,18 @@ main(int argc, char **argv)
program_name = argv[0];
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), program_name);
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
exit(EXIT_FAILURE);
}
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 50d2a08..f47dc63 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1298,10 +1298,18 @@ main(int argc, char **argv)
char *profile = NULL;
char *include_file = NULL;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
exit(EXIT_FAILURE);
}
diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index d1df068..c0f1f5a 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -72,10 +72,18 @@ int main(int argc, char **argv)
const char *partsep;
bool devmap_nopartsep = false;
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
exit(EXIT_FAILURE);
}
diff --git a/src/util/iohelper.c b/src/util/iohelper.c
index 8a3c377..0200bb1 100644
--- a/src/util/iohelper.c
+++ b/src/util/iohelper.c
@@ -230,10 +230,18 @@ main(int argc, char **argv)
program_name = argv[0];
- if (setlocale(LC_ALL, "") == NULL ||
- bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
- textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), program_name);
+ if (!setlocale(LC_ALL, "")) {
+ perror("setlocale");
+ /* failure to setup locale is not fatal */
+ }
+
+ if (!bindtextdomain(PACKAGE, LOCALEDIR)) {
+ perror("bindtextdomain");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!textdomain(PACKAGE)) {
+ perror("textdomain");
exit(EXIT_FAILURE);
}
--
2.7.3
8 years, 8 months
[libvirt] [PATCH] tests: fix xen-related tests
by Ján Tomko
My commit 6879be4 moved the addition of the implicit video device
from the XML parser to the PostParse function, but did not regenerate
all the tests.
---
Technically a build breaker fix, but perhaps too big to push without review.
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-fv.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 3 +++
tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 3 +++
tests/xlconfigdata/test-disk-positional-parms-full.xml | 3 +++
tests/xlconfigdata/test-disk-positional-parms-partial.xml | 3 +++
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml | 3 +++
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml | 3 +++
tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml | 3 +++
tests/xlconfigdata/test-fullvirt-multiusb.xml | 3 +++
tests/xlconfigdata/test-fullvirt-nohap.xml | 3 +++
tests/xlconfigdata/test-new-disk.xml | 3 +++
tests/xlconfigdata/test-rbd-multihost-noauth.xml | 3 +++
tests/xlconfigdata/test-spice-features.xml | 3 +++
tests/xlconfigdata/test-spice.xml | 3 +++
tests/xlconfigdata/test-vif-rate.xml | 3 +++
tests/xmconfigdata/test-escape-paths.xml | 3 +++
tests/xmconfigdata/test-fullvirt-default-feature.xml | 3 +++
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 3 +++
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 3 +++
tests/xmconfigdata/test-fullvirt-localtime.xml | 3 +++
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 3 +++
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 3 +++
tests/xmconfigdata/test-fullvirt-nohap.xml | 3 +++
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-file.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-null.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 3 +++
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 3 +++
tests/xmconfigdata/test-fullvirt-sound.xml | 3 +++
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 3 +++
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 3 +++
tests/xmconfigdata/test-fullvirt-utc.xml | 3 +++
tests/xmconfigdata/test-no-source-cdrom.xml | 3 +++
tests/xmconfigdata/test-paravirt-net-e1000.xml | 3 +++
tests/xmconfigdata/test-paravirt-net-vifname.xml | 3 +++
tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml | 3 +++
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 3 +++
tests/xmconfigdata/test-pci-devs.xml | 3 +++
73 files changed, 219 insertions(+)
diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml
index 4ac263e..a2668d1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml
@@ -34,6 +34,9 @@
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
index 17522f1..c4b22f6 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
@@ -50,6 +50,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='5925' autoport='yes' keymap='en-us'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
index 00907fe..17d4016 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
@@ -43,6 +43,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
index 7e014dc..20a0d76 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
@@ -46,6 +46,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
index 1fa8c14..13fb299 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
@@ -46,6 +46,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
index d82ca38..1380426 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
@@ -43,6 +43,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
index d5479dc..64111fe 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
@@ -44,6 +44,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
index 91afcc1..f362aee 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
@@ -48,6 +48,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
index b5bdf5c..4d3bdde 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
@@ -55,6 +55,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
index aca8f15..d3eaf82 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
@@ -51,6 +51,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
index ac754a2..0f209d6 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
@@ -51,6 +51,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
index 3ed8c77..b157f63 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
@@ -49,6 +49,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
index 649b5e6..d9cd840 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
@@ -51,6 +51,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
index ef84402..2cffa65 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
@@ -49,6 +49,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
index 07bd1fa..6e473d4 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
@@ -49,6 +49,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
index cd3031b..f03bd29 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
@@ -53,6 +53,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
index ab23196..2e9c629 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
@@ -53,6 +53,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
index fe89b9a..3f3f676 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
@@ -53,6 +53,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
index 344ea42..4f28511 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
@@ -51,6 +51,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
index caa856f..f934a85 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
<sound model='sb16'/>
<sound model='es1370'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
index caa856f..f934a85 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
<sound model='sb16'/>
<sound model='es1370'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
index bf710ec..8b5887e 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
@@ -44,6 +44,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
index 8e9fd80..3e4b366 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
@@ -44,6 +44,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
index 1d81991..9c2b9e3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
@@ -43,6 +43,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
index 1d81991..9c2b9e3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
@@ -43,6 +43,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml
index 1d81991..9c2b9e3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml
@@ -43,6 +43,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
index 310279d..97d9482 100644
--- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
@@ -48,6 +48,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
index eacfc97..dbdacf9 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
@@ -29,6 +29,9 @@
<graphics type='vnc' port='5925' autoport='no' listen='0.0.0.0' keymap='ja'>
<listen type='address' address='0.0.0.0'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
index f5b80c8..c415aab 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
@@ -29,6 +29,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'>
<listen type='address' address='0.0.0.0'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
index 0aebf20..c1acba1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
@@ -32,6 +32,9 @@
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
index 58b7dd0..45887e5 100644
--- a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
@@ -47,6 +47,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='ja'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.xml b/tests/xlconfigdata/test-disk-positional-parms-full.xml
index 7fd1899..3d4868c 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-full.xml
+++ b/tests/xlconfigdata/test-disk-positional-parms-full.xml
@@ -51,5 +51,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.xml b/tests/xlconfigdata/test-disk-positional-parms-partial.xml
index 7c42736..402f479 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-partial.xml
+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.xml
@@ -51,5 +51,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
index 1a27be6..686a409 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
@@ -48,5 +48,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
index 1a27be6..686a409 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
@@ -48,5 +48,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
index 1a27be6..686a409 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
@@ -48,5 +48,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml
index 1686807..5ec72c4 100644
--- a/tests/xlconfigdata/test-fullvirt-multiusb.xml
+++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml
@@ -47,5 +47,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml
index d9dad20..a997c7a 100644
--- a/tests/xlconfigdata/test-fullvirt-nohap.xml
+++ b/tests/xlconfigdata/test-fullvirt-nohap.xml
@@ -55,5 +55,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml
index 7fd1899..3d4868c 100644
--- a/tests/xlconfigdata/test-new-disk.xml
+++ b/tests/xlconfigdata/test-new-disk.xml
@@ -51,5 +51,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.xml b/tests/xlconfigdata/test-rbd-multihost-noauth.xml
index 560080f..f8f663f 100644
--- a/tests/xlconfigdata/test-rbd-multihost-noauth.xml
+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.xml
@@ -48,5 +48,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml
index 0f81f3d..f9eb857 100644
--- a/tests/xlconfigdata/test-spice-features.xml
+++ b/tests/xlconfigdata/test-spice-features.xml
@@ -47,5 +47,8 @@
<mouse mode='client'/>
<clipboard copypaste='yes'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml
index e997654..fc2fa3f 100644
--- a/tests/xlconfigdata/test-spice.xml
+++ b/tests/xlconfigdata/test-spice.xml
@@ -47,5 +47,8 @@
<mouse mode='server'/>
<clipboard copypaste='no'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-vif-rate.xml b/tests/xlconfigdata/test-vif-rate.xml
index 2d42fa7..0e13f2e 100644
--- a/tests/xlconfigdata/test-vif-rate.xml
+++ b/tests/xlconfigdata/test-vif-rate.xml
@@ -54,5 +54,8 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml
index 6aae9c7..6373fdf 100644
--- a/tests/xmconfigdata/test-escape-paths.xml
+++ b/tests/xmconfigdata/test-escape-paths.xml
@@ -53,6 +53,9 @@
</graphics>
<sound model='sb16'/>
<sound model='es1370'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml
index 2eacbd9..6f4dae6 100644
--- a/tests/xmconfigdata/test-fullvirt-default-feature.xml
+++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml
@@ -47,6 +47,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
index 2eacbd9..6f4dae6 100644
--- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml
+++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
@@ -47,6 +47,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
index 987096d..6015405 100644
--- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
+++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
@@ -47,6 +47,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml
index 29fcd56..5f81e25 100644
--- a/tests/xmconfigdata/test-fullvirt-localtime.xml
+++ b/tests/xmconfigdata/test-fullvirt-localtime.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
index 621955d..cb0615b 100644
--- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml
+++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
index bc9865b..d29892e 100644
--- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml
index 671c71b..f38366c 100644
--- a/tests/xmconfigdata/test-fullvirt-nohap.xml
+++ b/tests/xmconfigdata/test-fullvirt-nohap.xml
@@ -46,6 +46,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
index 081ad74..3269aee 100644
--- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
@@ -50,6 +50,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
index 074cbcb..a20d6c8 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
@@ -57,6 +57,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
index 88a0293..8344da3 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
@@ -53,6 +53,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml
index 7ac994f..b9439d7 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-file.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml
@@ -53,6 +53,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml
index bc47c4b..6e8196b 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-null.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml
@@ -51,6 +51,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
index afaa64f..da0c9bd 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
@@ -53,6 +53,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
index ac68710..acff588 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
@@ -51,6 +51,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
index cf30786..6909053 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
@@ -51,6 +51,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
index 4e943c1..a3fd449 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
@@ -55,6 +55,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
index f752be8..9dba76d 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
@@ -55,6 +55,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
index d70c5d8..3577f92 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
@@ -55,6 +55,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
index 9900179..919108b 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
@@ -53,6 +53,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml
index abbe8df..0e85953 100644
--- a/tests/xmconfigdata/test-fullvirt-sound.xml
+++ b/tests/xmconfigdata/test-fullvirt-sound.xml
@@ -47,6 +47,9 @@
</graphics>
<sound model='sb16'/>
<sound model='es1370'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
index 460ecc7..8eb5aa5 100644
--- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml
+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
@@ -46,6 +46,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
index e6e807a..dcdd951 100644
--- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml
+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
@@ -46,6 +46,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml
index bc9865b..d29892e 100644
--- a/tests/xmconfigdata/test-fullvirt-utc.xml
+++ b/tests/xmconfigdata/test-fullvirt-utc.xml
@@ -45,6 +45,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml
index 7600085..d4c2fd6 100644
--- a/tests/xmconfigdata/test-no-source-cdrom.xml
+++ b/tests/xmconfigdata/test-no-source-cdrom.xml
@@ -48,6 +48,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml
index 0db020f..ad44d11 100644
--- a/tests/xmconfigdata/test-paravirt-net-e1000.xml
+++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml
@@ -32,6 +32,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml
index ff17aee..e94b685 100644
--- a/tests/xmconfigdata/test-paravirt-net-vifname.xml
+++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml
@@ -33,6 +33,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
index ce7bfb9..3ca3023 100644
--- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
+++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
@@ -31,6 +31,9 @@
<graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml
index cba6dff..d97799a 100644
--- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml
+++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml
@@ -31,6 +31,9 @@
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'>
<listen type='address' address='127.0.0.1'/>
</graphics>
+ <video>
+ <model type='xen' heads='1' primary='yes'/>
+ </video>
<memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml
index 74f17b0..4c3f5f2 100644
--- a/tests/xmconfigdata/test-pci-devs.xml
+++ b/tests/xmconfigdata/test-pci-devs.xml
@@ -48,6 +48,9 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' heads='1' primary='yes'/>
+ </video>
<hostdev mode='subsystem' type='pci' managed='no'>
<source>
<address domain='0x0001' bus='0x0c' slot='0x1b' function='0x2'/>
--
2.4.10
8 years, 8 months
[libvirt] [PATCH 0/3] vz: simplify getting strings from vz sdk
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (3):
vz: simplify getting strings from vzsdk
vz: fix memory leak
vz: simplify getting fixed size strings from vzsdk
src/vz/vz_sdk.c | 203 +++++++++++++++++++++-----------------------------------
1 file changed, 77 insertions(+), 126 deletions(-)
--
1.8.3.1
8 years, 8 months