- 13 3月, 2014 1 次提交
-
-
由 Chunyan Liu 提交于
Add unit test for hostdev common library. Current tests are based on virpcimock.
-
- 11 3月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrange 提交于
GNULIB provides APIs for calculating md5 and sha256 hashes, but these APIs only return you raw byte arrays. Most users in libvirt want the hash in printable string format. Add some helper APIs in util/vircrypto.{c,h} for doing this. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 3月, 2014 1 次提交
-
-
由 Michael Chapman 提交于
Test it once with SELinux enabled and once with it disabled. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
- 03 3月, 2014 2 次提交
- 26 2月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Running ./autobuild.sh complained during the mingw cross-compile: CC libvirportallocatormock_la-virportallocatortest.lo ../../tests/virportallocatortest.c:32:20: fatal error: dlfcn.h: No such file or directory # include <dlfcn.h> ^ compilation terminated. With that fixed, the next failure was: CCLD qemuxml2argvmock.la libtool: link: libtool library `qemuxml2argvmock.la' must begin with `lib' libtool: link: Try `libtool --help --mode=link' for more information. While we don't need to limit all LD_PRELOAD tests to just Linux, we do need to limit them to platforms that actually support loading; we also need to avoid building qemu tests when qemu is not enabled. * tests/virportallocatortest.c: Make conditional on <dlfcn.h>. * tests/Makefile.am (test_libraries): Only build qemu mock library when building qemu tests. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 20 2月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainGetRootFilesystem method can be generalized to allow any filesystem path to be obtained. While doing this, start a new test case for purpose of testing various helper methods in the domain_conf.{c,h} files, such as this one. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 14 2月, 2014 3 次提交
-
-
由 Ján Tomko 提交于
also validate it against the RNG schema.
-
由 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 1 次提交
-
-
由 Guido Günther 提交于
and use it when available
-