summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* dist: Add miscellaneous files to the tarball.Richard W.M. Jones2012-11-131-0/+1
| | | | Lots of these had been omitted over time.
* tests/protocol: Add test-qemudir-launchfail.sh to tarball (but don't run it).Richard W.M. Jones2012-11-131-1/+2
| | | | | | | This file was present in git, but missing from the tarball. Don't actually run the test: it depends on details of how the appliance is constructed which would fail for old-style appliances.
* tests: Add a parallel launch test.Richard W.M. Jones2012-11-132-0/+200
| | | | | | | This is designed to reveal libvirt race conditions such as bug 875741. This is a "slow test" so it only runs if you do 'make check-slow'.
* tests: Add 'make check-slow' rule to recursively run slow/long-running tests.Richard W.M. Jones2012-11-131-5/+7
|
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-137-403/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* extra-tests: Add $(libvirt_ro_uri) substitution to configure.Richard W.M. Jones2012-11-131-11/+9
| | | | This is essentially just code motion.
* Define whole valgrind command (as @VG@) in the configure script.Richard W.M. Jones2012-11-131-6/+1
| | | | | | This is mostly just code motion, but it also changes the default location where valgrind.log is written to be the top build directory (instead of tests/extra/valgrind.log).
* extra-tests: Move valgrind suppressions file to top source directory.Richard W.M. Jones2012-11-122-217/+1
| | | | This is just code motion.
* tools: Modify existing tools to use guestfs_{push,pop}_error_handler.Richard W.M. Jones2012-11-093-15/+6
| | | | | This is a shorter and more convenient way to disable errors temporarily across calls.
* lib: Rework temporary and cache directory code.Richard W.M. Jones2012-11-092-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir. The current code has evolved over time and has a number of problems: (a) A single environment variable ($TMPDIR) controls the location of several directories. (b) It's hard for the library user to predict which directory libguestfs will use, unless the user simulates the same internal steps that libguestfs performs. This commit fixes these issues. (a) Now three environment variables control the location of all small temporary files, and the appliance cache: For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp. For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp. The user can also set these directories explicitly through API calls (guestfs_set_tmpdir and guestfs_set_cachedir). (b) The user can also retrieve the actual directories that libguestfs will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir. These functions are also used internally. This commit also: - reworks the internal tmpdir code - removes the internal (undocumented) guestfs_tmpdir call (replacing it with calls to the documented guestfs_get_tmpdir API instead) - changes the ./run script to set LIBGUESTFS_TMPDIR and LIBGUESTFS_CACHEDIR - adds a test - fixes a few places like libguestfs-make-fixed-appliance which depended on $TMPDIR
* tests: Allow more tests to be skipped.Richard W.M. Jones2012-10-303-0/+18
| | | | | Specifically tests which involve btrfs, because btrfs is currently broken upstream (RHBZ#863978).
* valgrind: Add suppression for memory leak in libdl:_dl_init function.Richard W.M. Jones2012-10-181-0/+8
|
* lib: Add a test for environment parsing functions.Richard W.M. Jones2012-10-152-2/+107
| | | | This updates commit 9466060201600db47016133d80af22eb38091a49.
* valgrind: Fix FUSE memory leak suppression.Richard W.M. Jones2012-10-141-2/+10
|
* tests: Fix test-qemudie-* so they re-adds the disk on second launch.Richard W.M. Jones2012-10-103-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ed7fda161e1f3d0beb02a368fcbcf5ed95dcdac1 changed the way that the drives are handled across appliance shutdowns. Previously during the following sequence of calls: create the handle add drive(s) launch kill subprocess launch the added drives are still in the handle at the second launch. After the above commit, the added drives are removed from the handle, which means the second launch happens with no drives (which could be an error). This was never actually defined either way, so in this case fix the test to re-add the drive before the second launch. Since hotplugging was added, it isn't really feasible to return to the original semantics, since users might remove drives, in which case we have lost information about those drives so we cannot restore them on the second launch. NOTE: PLEASE CALLERS DON'T DO THIS! Always use a new handle for each launch of the appliance.
* Add support for hotplugging (removing disks).Richard W.M. Jones2012-10-093-2/+149
| | | | | | | | New API: remove-drive. Note because of a bug in fuser, this only works with psmisc >= 22.20. This also updates the hotplugging tests.
* Add support for hotplugging (adding disks) to the libvirt attach-method.Richard W.M. Jones2012-10-082-0/+92
| | | | | | | | | | | | | When libvirt is used, we can allow disks to be hotplugged. guestfs_add_drive can be called after launch to hot-add a disk. When a disk is hot-added, we first ask libvirt to add the disk to the appliance, then we make an internal call into the appliance to get it to wait for the disk to appear (ie. udev_settle ()). Hot-added disks are tracked in the g->drives array. This also adds a test.
* launch: Add add_drive 'label' option.Richard W.M. Jones2012-10-082-0/+98
| | | | | | | | | | | | | | | | | | | | | New API: list-disk-labels Allow the user to pass an optional disk label when adding a drive. This is passed through to qemu / libvirt using the disk serial field, and from there to the appliance which exposes it through udev, creating a special alias of the device /dev/disk/guestfs/<label>. Partitions are named /dev/disk/guestfs/<label><partnum>. virtio-blk and virtio-scsi limit the serial field to 20 bytes. We further limit the name to maximum 20 ASCII characters in [a-zA-Z]. list-devices and list-partitions are not changed: these calls still return raw block device names. However a new call, list-disk-labels, returns a hash table allowing callers to map between disk labels, and block device and partition names. This commit also includes a test.
* tests: Fix rhbz690819.sh to skip when attach-method is libvirt.Richard W.M. Jones2012-10-061-0/+6
| | | | | | | This sets the iface parameter (implicitly), which is not supported yet by the libvirt backend. This updates commit 8e198dc1c50fcdba6720b23da478ef75cc979733.
* Revert "test-launch-race: Add SELinux label to $TMPDIR."Richard W.M. Jones2012-09-261-5/+0
| | | | | | Because RHBZ#860235 has been fixed in selinux-policy 3.11.1-25.fc18. This reverts commit 7fc838cca334ccf3d388c5598ff7fae88dbe4513.
* test-launch-race: Add SELinux label to $TMPDIR.Richard W.M. Jones2012-09-251-0/+5
| | | | | | This is a temporary workaround for https://bugzilla.redhat.com/show_bug.cgi?id=860235 which can be removed once this bug is fixed.
* Fix tests/bigdirs/test-big-dirs.pl to use mke2fsWanlong Gao2012-09-241-14/+4
| | | | | | | | | | | Let tests/bigdirs/test-big-dirs.pl uses mke2fs to create small inode ratio files. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> RWMJ: - Fix invocation of mke2fs with optional arguments. - Run the test to check it works.
* tests/bigdirs: Add empty TESTS= rule.Richard W.M. Jones2012-09-241-3/+4
| | | | | | Without this empty rule, automake doesn't generate the rest of the testing infrastructure, so you can't enable the test yourself by doing 'make check TESTS=test-big-dirs.pl'.
* test-launch-race: Add comment.Richard W.M. Jones2012-09-221-1/+1
|
* extra-tests: Re-run the tests against upstream libvirt.Richard W.M. Jones2012-09-182-0/+56
|
* extra-tests: Clean up some comments about the upstream qemu tests.Richard W.M. Jones2012-09-181-3/+4
|
* extra-tests: Add scripts used by these tests to EXTRA_DIST.Richard W.M. Jones2012-09-181-1/+5
|
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-173-12/+0
| | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already.
* extra-tests: Write a qemu wrapper script on the fly.Richard W.M. Jones2012-09-152-26/+13
| | | | | | | | | | | Passing the $upstream_qemu environment variable is not reliable when libvirt is involved: Environment variables are passed to the first instance of the session libvirtd, but because libvirt reuses the session libvirtd, subsequent environment variable settings are lost (this is filed as RHBZ#856619). Bypass all of this by writing a custom qemu-wrapper.sh which contains the hard-coded values we want.
* extra-tests: Rerun extra tests with regular appliance attach method.Richard W.M. Jones2012-09-152-1/+35
| | | | | If libvirt is being used as the backend, rerun all the extra-tests again using the regular appliance backend.
* extra-tests: The upstream qemu test now reruns all the extra tests.Richard W.M. Jones2012-09-153-10/+12
|
* extra-tests: Fix libvirt URI so we can run tests with libvirt attach-method.Richard W.M. Jones2012-09-151-14/+10
|
* syntax: Remove trailing whitespace.Richard W.M. Jones2012-09-151-1/+0
| | | | Found by 'make syntax-check'.
* syntax: Replace test == with = or -eq as appropriate.Richard W.M. Jones2012-09-151-11/+11
| | | | Found by 'make syntax-check'.
* syntax: Use STREQ/STRNEQ in place of strcmp.Richard W.M. Jones2012-09-151-1/+1
| | | | Found by 'make syntax-check'.
* test-9p: Disable this test with libvirt.Richard W.M. Jones2012-09-141-2/+2
| | | | | This test doesn't work with sVirt if SELinux is enforcing, because qemu won't be able to access the 9p-exported directory on the host.
* extra-tests: Don't use $QEMU as a variable.Richard W.M. Jones2012-09-052-6/+13
| | | | | | Since 'QEMU' is set (overwritten) by the autoconf-generated Makefile, this test would always test installed qemu, not upstream qemu, making it pretty useless. Use another name for this variable.
* tests/rsync: Allow rsync test to be skipped by setting SKIP_TEST_RSYNC_SH=1.Richard W.M. Jones2012-08-311-0/+5
|
* tests/mount-local: Link test program with gnulib.Richard W.M. Jones2012-08-311-1/+2
|
* tests/big-dirs: Don't run this test by default.Richard W.M. Jones2012-08-301-5/+6
|
* remove ulockmgr from fuse LDFLAGSOlaf Hering2012-08-291-1/+1
| | | | | | | | | | libguestfs fails to build with --enable-fuse on openSuSE 11.4 and earlier because the included fuse version does not include libulockmgr.so. configure already used pkgconfig to retrieve the correct CFLAGS, so there is no need to hardcode -lulockmgr. With this change the build succeeds again. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* Replace mount-options with mount where appropriate.Richard W.M. Jones2012-08-1810-20/+20
| | | | | | Since our minimum supported version is now 1.16 and mount was fixed in 1.13.16, it is now safe to replace mount-options + empty options with mount wherever it occurs.
* tests: Add a test for large directories.Richard W.M. Jones2012-08-172-0/+119
| | | | | | | | This also tests the reimplemented APIs: - ls - lstatlist - lxattrlist - readlinklist
* test-launch-race: Use /dev/null instead of hand-made zero-length file.Richard W.M. Jones2012-08-151-5/+2
| | | | | There seems to be no reason why creating a zero-length file is necessary for this test.
* Add optional compress flag to tar-in, tar-out APIs.Richard W.M. Jones2012-08-141-4/+4
| | | | | | | | | | The compress flag can be used to control compression, one of: (none), "compress", "gzip", "bzip2", "xz", "lzop". Thus these calls can now be used instead of tgz-in/tgz-out/txz-in/txz-out, and also support more compression types. Mark these APIs as once_had_no_optargs so that compatibility code is generated.
* tests/9p: Add test to EXTRA_DIST.1.19.29Richard W.M. Jones2012-08-111-0/+2
| | | | This fixes commit 499497fab03716278cb5214a8aa89a35618e06c6.
* New APIs: rsync, rsync-in, rsync-outRichard W.M. Jones2012-08-112-0/+126
| | | | Implement rsync.
* tests/extra: Add workaround for memory leak in libvirt.Richard W.M. Jones2012-08-111-1/+13
| | | | See: https://bugzilla.redhat.com/show_bug.cgi?id=847429
* 9p: Add a regression test for 9p functionality in qemu.Richard W.M. Jones2012-07-302-0/+78
|
* tests: Consistent use of $(top_builddir)/run --test when building test guests.Richard W.M. Jones2012-07-264-21/+9
|