- 14 2月, 2014 2 次提交
-
-
由 Cédric Bosdonnat 提交于
-
由 Peter Krempa 提交于
Add APIs that will allow to use the storage driver to assist in operations on files even for remote filesystems without native representation as files in the host.
-
- 13 2月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
This function aims at converting LXC configuration into a libvirt domain XML description to help users migrate from LXC to libvirt. Here is an example of how the lxc configuration works: virsh -c lxc:/// domxml-from-native lxc-tools /var/lib/lxc/migrate_test/config It is possible that some parts couldn't be properly mapped into a domain XML fragment, so users should carefully review the result before creating the domain. fstab files in lxc.mount lines will need to be merged into the configuration file as lxc.mount.entry. As we can't know the amount of memory of the host, we have to set a default value for max_balloon that users will probably want to adjust.
-
- 11 2月, 2014 1 次提交
-
-
由 Pradipta Kr. Banerjee 提交于
This test creates a Fake NUMA topology with non-sequential cell ids to check if libvirt properly handles the same Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com>
-
- 06 2月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
When trying to introduce a test for previous patch, I've noticed that the command line is constructed using current time. This won't work in our test suite (unless you guys wants to set a specific time prior to each test run :) ). Therefore we need to mock calls to time(2) to return the same value every time it's called. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 2月, 2014 2 次提交
-
-
由 John Ferlan 提交于
Adding tests for new virKMod{Config|Load|Unload}() API's. A test for virKModIsBlacklisted() would require some setup which cannot be assumed.
-
由 Michal Privoznik 提交于
I've received a notice over IRC that on some systems, the virnetdevbandwidthtest is not linked with libxml: /usr/bin/ld: virnetdevbandwidthtest.o: undefined reference to symbol 'xmlStrEqual@@LIBXML2_2.4.30' /usr/lib/x86_64-linux-gnu/libxml2.so.2: error adding symbols: DSO missing from command line Trivial way avoiding this is to add LIBXML_LIBS to virnetdevbandwidthtest_LDADD.
-
- 30 1月, 2014 1 次提交
-
-
由 Osier Yang 提交于
This creates the basic unit tests for the scsi utils. Signed-off-by: NOsier Yang <jyang@redhat.com>
-
- 27 1月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
The only API tested so far would be virNetDevBandwidthMinimal. But there's more to come! Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 12月, 2013 1 次提交
-
-
由 Cédric Bosdonnat 提交于
These unit tests are aiming at providing some help during the domain events refactoring.
-
- 28 11月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Move the code for lxcContainerGetSubtree into the virfile module creating 2 new functions int virFileGetMountSubtree(const char *mtabpath, const char *prefix, char ***mountsret, size_t *nmountsret); int virFileGetMountReverseSubtree(const char *mtabpath, const char *prefix, char ***mountsret, size_t *nmountsret); Add a new virfiletest.c test case to validate the new code. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
While trying to debug a failure of virpcitest during 'make distcheck', I noticed that with a VPATH build, 'cd tests; ./virpcitest' fails for an entirely different reason. To reproduce the distcheck failure, I had to run 'cd tests; abs_srcdir=/path/to/src ./virpcitest'. But we document in HACKING that all of our tests are supposed to be runnable without requiring extra environment variables. The solution: hardcode the location of srcdir into the just-built binaries, rather than requiring make to prepopulate environment variables. With this, './virpcitest' passes even in a VPATH build (provided that $(srcdir) is writable; a followup patch will fix the conditions required by 'make distcheck'). [Note: the makefile must still pass on directory variables to the test environment of shell scripts, since those aren't compiled. So while this solves the case of a compiled test, it still requires environment variables to pass a VPATH build of any shell script test case that relies on srcdir.] * tests/Makefile.am (AM_CFLAGS): Define abs_srcdir in all compiled tests. * tests/testutils.h (abs_srcdir): Quit declaring. * tests/testutils.c (virtTestMain): Rely on define rather than environment variable. * tests/virpcimock.c (pci_device_new_from_stub): Rely on define. * tests/cputest.c (mymain): Adjust abs_top_srcdir default. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxmlnstest.c (mymain): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 11月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
The qemu monitor supports retrieval of actual CPUID bits presented to the guest using QMP monitor. Add APIs to extract these information and tests for them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 07 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Since 21685c95 we have tests/virpcitestdata dir containing the PCI config files for some dummy PCI devices that are used int virpcitest. However, the directory containing the config files is not distributed making 'make rpm' fail. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
This commit introduces yet another test under virpcitest: virPCIDeviceDetach. However, in order to be able to do this, the virpcimock needs to be extended to model the kernel behavior on PCI device binding and unbinding (create 'driver' symlinks under the device tree, check for device ID in driver's ID table, etc.) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Among with this test introduce virpcimock as we need to mock some syscalls, e.g. redirect open() of a file under /sys/bus/pci to a stub sysfs tree. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 10月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
As stated in the comment above introduction of the lv_abs_top_builddir variable, older automake doesn't provide abs_top_builddir variable. Hence, we are creating our own one with lv_ prefix. However, when exporting env variables to the tests, the variables are not evaluated but only substituted. Hence: LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" is set to "/src/.libs" with old automake (even though we *think* we've set the $abs_top_builddir variable just a few line above). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 10月, 2013 1 次提交
-
-
由 Daniel Hansel 提交于
Introduced by commit 3f029fb5 the RPM build was broken due to a missing LXC textcase. Signed-off-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com>
-
- 14 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The log message regex has been [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\+[0-9]{4}: [0-9]+: debug|info|warning|error : The precedence of '|' is high though, so this is equivalent to matching [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\+[0-9]{4}: [0-9]+: debug Or info Or warning Or error : Which is clearly not what it should have done. This caused the code to skip over things which are not log messages. The solution is to simply add brackets. A test case is also added to validate correctness. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 10月, 2013 1 次提交
-
-
由 Eric Blake 提交于
I tried to test ./configure --without-lxc --without-remote. First, the build failed with some odd errors, such as an inability to build xen, or link failures for virNetTLSInit. But when you think about it, once there is no remote code, all of libvirtd is useless, any stateful driver that depends on libvirtd is also not worth compiling, and any libraries used only by RPC code are not needed. So I patched configure.ac to make for some saner defaults when an explicit disable is attempted. Similarly, since we have migrated virnetdevbridge into generic code, the workaround for Linux kernel stupidity must not depend on stateful drivers being in use. Then there's 'make check' that needs segregation. Wow - quite a bit of cleanup to make --without-remote useful :) * configure.ac: Let --without-remote toggle defaults on stateful drivers and other libraries. Pick up Linux kernel workarounds even when qemu and lxc are not being compiled. * tests/Makefile.am (test_programs): Factor out programs that require remote. * src/libvirt_private.syms (rpc/virnet*.h): Move... * src/libvirt_remote.syms: ...into new file. * src/Makefile.am (SYM_FILES): Ship new syms file. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 01 10月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
This test is there to ensure that our capabilities detection code isn't broken somehow. How to gather test data: Firstly, the data is split into two separate files. The former (with suffix .replies) contains all the qemu replies. This is very fragile as introducing a new device can mean yet another monitor command and hence edit of this file in the future. But there's no better way of doing this. To get this data simply turn on debug logs and copy all the QEMU_MONITOR_IO_PROCESS lines. But be careful to not copy incomplete ones (yeah, we report some incomplete lines too). Long story short, at the libvirtd startup, a dummy qemu is spawn to get all the capabilities. The latter (with suffix .caps) contains capabilities XML. Just start a domain and copy the corresponding part from its state XML file. Including <qemuCaps> tag. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 9月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, we have functions to handle fc_host implemented just for linux. On all other platforms an error is thrown. It makes no sense to run the test on those platforms then. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Similar to commit 8f34f195. * tests/Makefile.am (virnetserverclienttest_CFLAGS): Add XDR_CFLAGS. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Start a test case for the virNetServerClient object, which initially checks the creation of a virIdentityPtr object. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 9月, 2013 1 次提交
-
-
由 Doug Goldstein 提交于
This splits up the version parsing code into a callable API like QEMU help/version string parsing so that we can test it as we need to add additional patterns for newer versions/products.
-
- 17 9月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
This test exercises the virDomain[Get|Set]Metadata API and tests it for regressions
-
- 10 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
If we use subdir-objects with automake, any reference to a cross-directory .c file will result in automake creating rules that track dependency in the cross directory. But this presents a problem during 'make distclean' - if the cross directory is cleaned up first, then the daemon directory will be left with dangling references to .Po dependency files that no longer exist. Meanwhile, referring to the cross-directory .c file means that we are compiling the file twice - once in src, and once in daemon. Better is to compile just once in src into a convenience library, and then use that library from daemon. The tests directory had a similar situation of a cross-directory .c file; to solve that, we actually need a convenience library. * daemon/Makefile.am (DAEMON_SOURCES): Drop .c files... (libvirtd_LDADD): ...and instead use library. (libvirtd_conf_la_SOURCES): Declare a new convenience library. (libvirtd_LDFLAGS): Drop duplicate flag. * tests/Makefile.am (libvirtdconftest_SOURCES): Drop .c file... (libvirtdconftest_LDADD): ..and instead use library. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2013 1 次提交
-
-
由 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>
-
- 28 8月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Add checks for updating sections of network definition via virNetworkDefUpdateSection. https://bugzilla.redhat.com/show_bug.cgi?id=989569
-
- 22 8月, 2013 2 次提交
-
-
由 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".
-
- 21 8月, 2013 1 次提交
-
-
由 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.
-
- 13 8月, 2013 3 次提交
-
-
由 Guido Günther 提交于
The Linux build revealed another missing direct link target, this time against selinux libs: http://honk.sigxcpu.org:8001/view/libvirt/job/libvirt-build-debian-sid-amd64/9/console
-
由 Guido Günther 提交于
otherwise having a strict --no-copy-dt-needed-entries fails in several places like: CCLD virdbustest /usr/bin/ld: virdbustest-virdbustest.o: undefined reference to symbol 'dbus_message_unref' /lib/x86_64-linux-gnu/libdbus-1.so.3: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
-
由 Eric Blake 提交于
The gnulib testsuite is relatively stable - the only times it is likely to have a test change from pass to fail is on a gnulib submodule update or a major system change (such as moving from Fedora 18 to 19, or other large change to libc). While it is an important test for end users on arbitrary machines (to make sure that the portability glue works for their machine), it mostly wastes time for development testing (as most developers aren't making any of the major changes that would cause gnulib tests to alter behavior). Thus, it pays to make the tests optional at configure time, defaulting to off for development, on for tarballs, with autobuilders requesting it to be on. It also helps to allow a make-time override, via VIR_TEST_EXPENSIVE=[01] (much the way automake sets up V=[01] for overriding the configure time default of how verbose to be). Automake has some pretty hard-coded magic with regards to the TESTS variable; I had quite a job figuring out how to keep 'make distcheck' passing regardless of the configure option setting in use, while still disabling the tests at runtime when I did not configure them on and did not use the override variable. Thankfully, we require GNU make, which lets me hide some information from Automake's magic handling of TESTS. * bootstrap.conf (bootstrap_epilogue): Munge gnulib test variable. * configure.ac (--enable-expensive-tests): Add new enable switch. (VIR_TEST_EXPENSIVE_DEFAULT, WITH_EXPENSIVE_TESTS): Set new witnesses. * gnulib/tests/Makefile.am (TESTS): Make tests conditional on configure settings and the VIR_TEST_EXPENSIVE variable. * tests/Makefile.am (TESTS_ENVIRONMENT): Expose VIR_TEST_EXPENSIVE to all tests. * autobuild.sh: Enable all tests during autobuilds. * libvirt.spec.in (%configure): Likewise. * mingw-libvirt.spec.in (%mingw_configure): Likewise. * docs/hacking.html.in: Document the option. * HACKING: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 8月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virnettlscontexttest.c tests both virNetTLSContext and virNetTLSSession functionality. Split into two separate tests, to make the code size more manageable Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 8月, 2013 1 次提交
-
-
由 Jincheng Miao 提交于
When building libvirt with -O0 flag in fedora 19, it will fail to generate qemuagenttest, a link error occurs like: ./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestFree': libvirt/tests/qemumonitortestutils.c:346: undefined reference to `qemuMonitorClose' ./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestNew': libvirt/tests/qemumonitortestutils.c:870: undefined reference to `qemuMonitorOpen' collect2: error: ld returned 1 exit status Fix it by listing libraries in the correct order to avoid lazy linkage. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 31 7月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Add a basic test framework with two simple tests to test guest agent interaction.
-
- 22 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
To register virtual machines and containers with systemd-machined, and thus have cgroups auto-created, we need to talk over DBus. This is somewhat tedious code, so introduce a dedicated function to isolate the DBus call in one place. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-