- 05 9月, 2013 2 次提交
-
-
由 Li Zhang 提交于
This patch is to add cpu test casses for PPC CPU driver. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
-
由 Eric Blake 提交于
An rpm build with client_only set to 1 (for example, RHEL 5 on s390, or by modifying libvirt.spec.in) failed with TEST: fdstreamtest 1) Stream read blocking ... OK 2) Stream read non-blocking ... Unexpected EOF block 0 want 128 FAILED 3) Stream write blocking ... OK 4) Stream write non-blocking ... Failed to finish stream: internal error: libvirt: error : cannot execute binary /home/eblake/rpmbuild/BUILD/libvirt-1.1.1/tests/../src/libvirt_iohelper: No such file or directory Since the test depends on something that was only built for WITH_LIBVIRTD (see src/Makefile.am), we must do the same for the test. * tests/Makefile.am (test_programs): Make fdstreamtest conditional. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Automake has builtin support to prevent botched conditional nesting, but only if you use: if FOO else !FOO endif !FOO An example error message when using the wrong name: daemon/Makefile.am:378: error: else reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE daemon/Makefile.am:381: error: endif reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE As our makefiles tend to have quite a bit of nested conditionals, it's better to take advantage of the benefits of the build system double-checking that our conditionals are well-nested, but that requires a syntax check to enforce our usage style. Alas, unlike C preprocessor and spec files, we can't use indentation to make it easier to see how deeply nesting goes. * cfg.mk (sc_makefile_conditionals): New rule. * daemon/Makefile.am: Enforce the style. * gnulib/tests/Makefile.am: Likewise. * python/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * tools/Makefile.am: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 9月, 2013 5 次提交
-
-
由 Doug Goldstein 提交于
According to VMWare's documentation 'cdrom-raw' is an acceptable value for deviceType for a CD-ROM drive. The documentation states that the VMX configuration for a CD-ROM deviceType is as follows: ide|scsi(n):(n).deviceType = "cdrom-raw|atapi-cdrom|cdrom-image" From the documentation it appears the following is true: - cdrom-image = Provides the ISO to the VM - atapi-cdrom = Provides a NEC emulated ATAPI CD-ROM on top of the host CD-ROM - cdrom-raw = Passthru for a host CD-ROM drive. Allows CD-R burning from within the guest. A CD-ROM prior to this patch would always provide an 'atapi-cdrom' is modeled as: <disk type='block' device='cdrom'> <source dev='/dev/scd0'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> This patch allows the 'device' attribute to be set to 'lun' for a raw acccess CD-ROM such as: <disk type='block' device='lun'> <source dev='/dev/scd0'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk>
-
由 Cole Robinson 提交于
Starting with qemu 1.6, the qemu-system-arm vexpress-a9 model has a hardcoded virtio-mmio transport which enables attaching all virtio devices. On the command line, we have to use virtio-XXX-device rather than virtio-XXX-pci, thankfully s390 already set the precedent here so it's fairly straight forward. At the XML level, this adds a new device address type virtio-mmio. The controller and addressing don't have any subelements at the moment because we they aren't needed for this usecase, but could be added later if needed. Add a test case for an ARM guest with one of every virtio device enabled.
-
由 Cole Robinson 提交于
Similar to the chardev bit, ARM boards depend on the old style '-net nic' for actually instantiating net devices. But we can't block out -netdev altogether since it's needed for upcoming virtio support. And add tests for working ARM XML with console, disk, and networking.
-
由 Cole Robinson 提交于
And add test cases for a basic working ARM guest.
-
由 Cole Robinson 提交于
On my machine, a guest fails to boot if it has a sound card, but not graphical device/display is configured, because pulseaudio fails to initialize since it can't access $HOME. A workaround is removing the audio device, however on ARM boards there isn't any option to do that, so -nographic always fails. Set QEMU_AUDIO_DRV=none if no <graphics> are configured. Unfortunately this has massive test suite fallout. Add a qemu.conf parameter nographics_allow_host_audio, that if enabled will pass through QEMU_AUDIO_DRV from sysconfig (similar to vnc_allow_host_audio)
-
- 02 9月, 2013 2 次提交
-
-
由 Fred A. Kemp 提交于
Add an attribute named 'removable' to the 'target' element of disks, which controls the removable flag. For instance, on a Linux guest it controls the value of /sys/block/$dev/removable. This option is only valid for USB disks (i.e. bus='usb'), and its default value is 'off', which is the same behaviour as before. To achieve this, 'removable=on' (or 'off') is appended to the '-device usb-storage' parameter sent to qemu when adding a USB disk via '-disk'. A capability flag QEMU_CAPS_USB_STORAGE_REMOVABLE was added to keep track if this option is supported by the qemu version used. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=922495Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Fred A. Kemp 提交于
Allow use of the usb-storage device only if the new capability flag QEMU_CAPS_DEVICE_USB_STORAGE is set, which it is for qemu(-kvm) versions >= 0.12.1.2-rhel62-beta. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 30 8月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Ubuntu libdbus.so links with -Bsymbolic-functions, which means that we can only LD_PRELOAD functions that we directly call. Functions which libdbus.so calls internally can not be replaced. Thus we cannot use dbus_message_new_error or dbus_message_new_method_return Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 8月, 2013 2 次提交
-
-
由 Ján Tomko 提交于
Add checks for updating sections of network definition via virNetworkDefUpdateSection. https://bugzilla.redhat.com/show_bug.cgi?id=989569
-
由 Ján Tomko 提交于
This matches the style we use elsewhere and allows nat-network-dns-srv-record{,-minimal}.xml to be tested in network XML -> XML test.
-
- 27 8月, 2013 5 次提交
-
-
由 Ján Tomko 提交于
QEMU commit 3984890 introduced the "pci-hole64-size" property, to i440FX-pcihost and q35-pcihost with a default setting of 2 GB. Translate <pcihole64>x<pcihole64/> to: -global q35-pcihost.pci-hole64-size=x for q35 machines and -global i440FX-pcihost.pci-hole64-size=x for i440FX-based machines. Error out on other machine types or if the size was specified but the pcihost device lacks 'pci-hole64-size' property. https://bugzilla.redhat.com/show_bug.cgi?id=990418
-
由 Ján Tomko 提交于
<controller type='pci' index='0' model='pci-root'> <pcihole64 unit='KiB'>1048576</pcihole64> </controller> It can be used to adjust (or disable) the size of the 64-bit PCI hole. The size attribute is in kilobytes (different unit can be specified on input), but it gets rounded up to the nearest GB by QEMU. Disabling it will be needed for guests that crash with the 64-bit PCI hole (like Windows XP), see: https://bugzilla.redhat.com/show_bug.cgi?id=990418
-
由 Aline Manera 提交于
The ftp protocol is already recognized by qemu/KVM so add this support to libvirt as well. The xml should be as following: <disk type='network' device='cdrom'> <source protocol='ftp' name='/url/path'> <host name='host.name' port='21'/> </source> </disk> Signed-off-by: NAline Manera <alinefm@br.ibm.com>
-
由 Aline Manera 提交于
QEMU/KVM already allows a HTTP URL for the cdrom ISO image so add this support to libvirt as well. The xml should be as following: <disk type='network' device='cdrom'> <source protocol='http' name='/url/path'> <host name='host.name' port='80'/> </source> </disk> Signed-off-by: NAline Manera <alinefm@br.ibm.com>
-
由 Ján Tomko 提交于
qemu-img is going to switch the default for QCOW2 to QCOW2v3 (compat=1.1) Extend the probing for qemu-img command line options to check if -o compat is supported. If the volume definition specifies the qcow2 format but no compat level and -o compat is supported, specify -o compat=0.10 to create a QCOW2v2 image. https://bugzilla.redhat.com/show_bug.cgi?id=997977
-
- 26 8月, 2013 12 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
The driver is then passed to monitor event handlers.
-
由 Jiri Denemark 提交于
Some tests need the monitor to operate on an already existing VM object rather than on a new mock-up the monitor test normally creates.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
This is a generic XML usable for hotplugging various types of devices.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
We need to make sure a device is properly added/removed (or not) to a domain definition to check that a hotplug API did not lie to us.
-
由 Jiri Denemark 提交于
Each test case label now contains more data useful to identify the test.
-
由 Jiri Denemark 提交于
We will have to pass a mock-up of the driver when testing monitor events.
-
- 24 8月, 2013 1 次提交
-
-
由 Eric Blake 提交于
On IRC, someone complained that a system without xmllint installed failed a number of tests. * tests/schematestutils.sh: Probe for xmllint. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 23 8月, 2013 1 次提交
-
-
由 Nehal J Wani 提交于
In tests/qemuagenttest.c, the Timeout test should always be called last. Any additional tests should come before this. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 8月, 2013 3 次提交
-
-
由 Guido Günther 提交于
and use it when available
-
由 Martin Kletzander 提交于
Commit a0b6a36f is fixing what commit abfff210 broke, so to avoid having to deal with this issue again, herec comes "virsh-uriprecedence".
-
由 Peter Krempa 提交于
Re-arrange the code so that the returned bitmap is always initialized to NULL even on early failures and return an error message as some callers are already expecting it. Fix up the rest not to shadow the error.
-
- 21 8月, 2013 4 次提交
-
-
由 Claudio Bley 提交于
Only compile securityselinuxhelper.c if xattr support was detected to avoid this error: securityselinuxhelper.c:34:24: fatal error: attr/xattr.h: No such file or directory compilation terminated. Since all SELinux tests depend upon the securityselinuxhelper library, these test programs are now only build when xattr support is available.
-
由 Daniel P. Berrange 提交于
In commit f905cc99 a use of uninitialized data was fixed based on a coverity report. It turns out it was possible to trigger this issue by pointing libvirt at non-existent certificate files, typically causing a crash. This adds a test case for that scenario. With the above commit reverted, this new test case will crash with a SEGV. With the fix applied, it passes, reporting a normal libvirt error to the caller. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
Daniel Berrange (correctly) pointed out that we should do a better job of testing selinux labeling fallbacks on NFS disks that lack labeling support. * tests/securityselinuxhelper.c (includes): Makefile already guaranteed xattr support. Add additional headers. (init_syms): New function, borrowing from vircgroupmock.c. (setfilecon_raw, getfilecon_raw): Fake NFS failure. (statfs): Fake an NFS mount point. (security_getenforce, security_get_boolean_active): Don't let host environment affect test. * tests/securityselinuxlabeldata/nfs.data: New file. * tests/securityselinuxlabeldata/nfs.xml: New file. * tests/securityselinuxlabeltest.c (testSELinuxCreateDisks) (testSELinuxDeleteDisks): Setup and cleanup for fake NFS mount. (testSELinuxCheckLabels): Test handling of SELinux NFS denial. Fix memory leak. (testSELinuxLabeling): Avoid infinite loop on dirty tree. (mymain): Add new test.
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=924153 Commit 904e05a2 (v0.9.9) added a per-<disk> seclabel element with an attribute relabel='no' in order to try and minimize the impact of shutdown delays when an NFS server disappears. The idea was that if a disk is on NFS and can't be labeled in the first place, there is no need to attempt the (no-op) relabel on domain shutdown. Unfortunately, the way this was implemented was by modifying the domain XML so that the optimization would survive libvirtd restart, but in a way that is indistinguishable from an explicit user setting. Furthermore, once the setting is turned on, libvirt avoids attempts at labeling, even for operations like snapshot or blockcopy where the chain is being extended or pivoted onto non-NFS, where SELinux labeling is once again possible. As a result, it was impossible to do a blockcopy to pivot from an NFS image file onto a local file. The solution is to separate the semantics of a chain that must not be labeled (which the user can set even on persistent domains) vs. the optimization of not attempting a relabel on cleanup (a live-only annotation), and using only the user's explicit notation rather than the optimization as the decision on whether to skip a label attempt in the first place. When upgrading an older libvirtd to a newer, an NFS volume will still attempt the relabel; but as the avoidance of a relabel was only an optimization, this shouldn't cause any problems. In the ideal future, libvirt will eventually have XML describing EVERY file in the backing chain, with each file having a separate <seclabel> element. At that point, libvirt will be able to track more closely which files need a relabel attempt at shutdown. But until we reach that point, the single <seclabel> for the entire <disk> chain is treated as a hint - when a chain has only one file, then we know it is accurate; but if the chain has more than one file, we have to attempt relabel in spite of the attribute, in case part of the chain is local and SELinux mattered for that portion of the chain. * src/conf/domain_conf.h (_virSecurityDeviceLabelDef): Add new member. * src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML): Parse it, for live images only. (virSecurityDeviceLabelDefFormat): Output it. (virDomainDiskDefParseXML, virDomainChrSourceDefParseXML) (virDomainDiskSourceDefFormat, virDomainChrDefFormat) (virDomainDiskDefFormat): Pass flags on through. * src/security/security_selinux.c (virSecuritySELinuxRestoreSecurityImageLabelInt): Honor labelskip when possible. (virSecuritySELinuxSetSecurityFileLabel): Set labelskip, not norelabel, if labeling fails. (virSecuritySELinuxSetFileconHelper): Fix indentation. * docs/formatdomain.html.in (seclabel): Document new xml. * docs/schemas/domaincommon.rng (devSeclabel): Allow it in RNG. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.xml: * tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.args: * tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-*-labelskip.xml: New test files. * tests/qemuxml2argvtest.c (mymain): Run the new tests. * tests/qemuxml2xmltest.c (mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 8月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Coverity reported a memleak in the test added in 7efd5fd1. In case the code will be broken and the code will actually parse a faulty bitmap the resulting pointer would be leaked. Free it although that shouldn't ever happen.
-