summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* build: Use $(top_builddir)/run in Makefile.am's.Richard W.M. Jones2012-07-261-2/+2
| | | | | Not necessary, but this makes all invocations of 'run' consistent. There is no functional change.
* tests: Skip regression test for 790721 if attach-method is not 'appliance'.Richard W.M. Jones2012-07-231-0/+25
|
* tests/protocol: Skip these tests if default attach-method is not 'appliance'.Richard W.M. Jones2012-07-233-0/+15
|
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-192-1/+1
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
* build: Return 77 from skipped tests.Richard W.M. Jones2012-07-1913-24/+24
|
* tests: Rewrite parallel mount-local test in C.Richard W.M. Jones2012-07-183-0/+531
|
* generator: Rename 'mkfs_opts' API to 'mkfs'.Richard W.M. Jones2012-07-143-12/+12
| | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers.
* generator: Rename 'add_drive_opts' API to 'add_drive'.Richard W.M. Jones2012-07-146-8/+8
| | | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers (except Haskell, PHP and GObject as discussed in earlier commit).
* tests: Better way to ensure 'g' is used and return success or error.Richard W.M. Jones2012-07-112-4/+2
|
* tests/guests: Add temp files to CLEANFILES.Richard W.M. Jones2012-07-101-1/+1
|
* extra-tests: Add a test using upstream qemu.Richard W.M. Jones2012-07-073-1/+75
|
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-034-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* tests: Add a test of /dev/disk/by-id paths (RHBZ#627675).Richard W.M. Jones2012-06-291-0/+8
|
* tests: Use qemu-img to create an overlay for testing, instead of copying.Richard W.M. Jones2012-06-291-9/+9
| | | | | | | | | | Replace: cp tests/guests/fedora.img test.img with the longer but possibly more space-efficient equivalent: qemu-img create -F raw -b tests/guests/fedora.img -f qcow2 test.qcow2
* tests: Reformat TESTS_ENVIRONMENT so all use a standard format.Richard W.M. Jones2012-06-283-7/+3
| | | | No functional change.