summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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). (cherry picked from commit f5194e6b0a470d6fe05eaa39b57eb9d0770bbe38)
* valgrind: Add suppression for memory leak in libdl:_dl_init function.Richard W.M. Jones2012-10-301-0/+8
| | | | (cherry picked from commit 2dab72794eef55f941cc61f1f34baa9fc7988298)
* valgrind: Fix FUSE memory leak suppression.Richard W.M. Jones2012-10-301-2/+10
| | | | (cherry picked from commit 626ca8e74f97a8c5fbe354211e81132976a21435)
* test-launch-race: Add comment.Richard W.M. Jones2012-10-011-1/+1
| | | | (cherry picked from commit 09c372ea250e8241d62e9fde70eabe7bdca83050)
* extra-tests: Clean up some comments about the upstream qemu tests.Richard W.M. Jones2012-09-191-3/+4
| | | | (cherry picked from commit 157b5006dbf2db2927e48ce592a83a279513d183)
* extra-tests: Add scripts used by these tests to EXTRA_DIST.Richard W.M. Jones2012-09-191-1/+4
| | | | (cherry picked from commit 7e4b197cb6a5071c13e407546a21f9b93fe3798d)
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-193-12/+0
| | | | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already. (cherry picked from commit cb13ffe190ac41a9b77fe27521838f495c1a5077)
* extra-tests: Write a qemu wrapper script on the fly.Richard W.M. Jones2012-09-192-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. (cherry picked from commit e6bd0b87eb753fa96b6533b0dbe498697701ad3a)
* extra-tests: The upstream qemu test now reruns all the extra tests.Richard W.M. Jones2012-09-193-10/+12
| | | | (cherry picked from commit 509dd90c43afed75b861b7d82ebe8739d3500d54)
* extra-tests: Fix libvirt URI so we can run tests with libvirt attach-method.Richard W.M. Jones2012-09-191-14/+10
| | | | (cherry picked from commit eeb0c598ec8caa50998336713ed4e62902e0a74d)
* syntax: Remove trailing whitespace.Richard W.M. Jones2012-09-191-1/+0
| | | | | Found by 'make syntax-check'. (cherry picked from commit 2cac8d490e9884a8c7376e49fd1cda2e3d3abec1)
* syntax: Replace test == with = or -eq as appropriate.Richard W.M. Jones2012-09-191-11/+11
| | | | | Found by 'make syntax-check'. (cherry picked from commit 6361810b53be4d5e0513b4f7c11d29cf1d6d3b45)
* syntax: Use STREQ/STRNEQ in place of strcmp.Richard W.M. Jones2012-09-191-1/+1
| | | | | Found by 'make syntax-check'. (cherry picked from commit b0cefb417d01c6dcb87cc6bafe9c19b98c690c9d)
* extra-tests: Don't use $QEMU as a variable.Richard W.M. Jones2012-09-182-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. (cherry picked from commit 81c682f1295a934d18bd4dc9e42b8e843df0c207)
* test-launch-race: Use /dev/null instead of hand-made zero-length file.Richard W.M. Jones2012-08-301-5/+2
| | | | | | There seems to be no reason why creating a zero-length file is necessary for this test. (cherry picked from commit 7f9f2818651860a15a7142d3761e3168e062c357)
* 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 (cherry picked from commit 04b475b41476b75ef3851fdd093a9868df0c7357)
* build: Use $(top_builddir)/run in Makefile.am's.Richard W.M. Jones2012-08-051-2/+2
| | | | | | | Not necessary, but this makes all invocations of 'run' consistent. There is no functional change. (cherry picked from commit 590774ed9e005dc85ca6851939e76d02da6624c8)
* tests: Skip regression test for 790721 if attach-method is not 'appliance'.Richard W.M. Jones2012-08-051-0/+25
| | | | (cherry picked from commit 2b059535b19125ca082f4354a7ff73f4f5a33822)
* tests/protocol: Skip these tests if default attach-method is not 'appliance'.Richard W.M. Jones2012-08-053-0/+15
| | | | (cherry picked from commit bc917a0efc03b8c28966c9ab474f525752ebe440)
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-08-052-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. Cherry picked from commit 2e4089f30007e79bc157c775cfd3b326d22f2992 and modified so that conflicts in the following files: po-docs/ja.po po-docs/libguestfs-docs.pot po-docs/uk.po were resolved by simply copying the files from the master branch.
* build: Return 77 from skipped tests.Richard W.M. Jones2012-08-0511-15/+15
| | | | (cherry picked from commit fc86db3b3bcd884ee37cef79e22b0324df9fcae6)
* tests: Better way to ensure 'g' is used and return success or error.Richard W.M. Jones2012-08-052-4/+2
| | | | (cherry picked from commit 7a0478bed0fe3ccbdf16087552f3d6ea196f29ec)
* tests/guests: Add temp files to CLEANFILES.Richard W.M. Jones2012-08-051-1/+1
| | | | (cherry picked from commit f883e4d8d3ea65c5cd4c2dc5d557989c00aafc56)
* extra-tests: Add a test using upstream qemu.Richard W.M. Jones2012-07-093-1/+75
| | | | (cherry picked from commit e6dec159488f589df62c9f59477281f8264a19c8)
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-062-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit ffbf1475f7ae7c462db289ad4834391469e72edd)
* tests: Add a test of /dev/disk/by-id paths (RHBZ#627675).Richard W.M. Jones2012-07-061-0/+8
| | | | (cherry picked from commit 5489304c8d2836713ec58051c24514eba22b8c94)
* tests: Use qemu-img to create an overlay for testing, instead of copying.Richard W.M. Jones2012-07-061-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 (cherry picked from commit 339f3647f889424af2a2256c4fcad0b44982c275)
* tests: Add thread IDs to test of bug 790721.Richard W.M. Jones2012-06-281-5/+10
| | | | (cherry picked from commit 90d0beb3c528d91029349b64d0159836c776189b)
* tests/xml: Fix compilation of test on RHEL 5 with old libvirt.Richard W.M. Jones2012-06-281-2/+9
| | | | | | | | | | | | Old <libvirt.h> had a conflicting definition of virDomainGetXMLDesc: fake_libvirt_xml.c:36: error: conflicting types for 'virDomainGetXMLDesc' /usr/include/libvirt/libvirt.h:715: error: previous declaration of 'virDomainGetXMLDesc' was here The difference is not material ('int' vs. 'unsigned int'). Avoid the error by not including <libvirt.h>. (cherry picked from commit 461455ca7cab93af09445d135483f5705589cc0c)
* tests: Add workaround for missing O_CLOEXEC.Richard W.M. Jones2012-06-281-0/+4
| | | | (cherry picked from commit 9e7644346dc4303316e59dda13ea5b2f60549626)
* tests: Fix broken workarounds for missing O_CLOEXEC.Richard W.M. Jones2012-06-282-2/+2
| | | | (cherry picked from commit 35882ba97722ddf9b4c55a332961b08ad8240dd7)
* tests: Add SKIP_TEST_* variables to allow these tests to be skipped.Richard W.M. Jones2012-06-286-0/+30
| | | | | | By setting these variables, we can skip tests that fail on RHEL 5. (cherry picked from commit 145f35badfd9ca4a6d9f54f7732566a5e5114876)
* build: Define abs_builddir if not defined already.Richard W.M. Jones2012-06-211-0/+3
| | | | | | | This is missing on RHEL 5. This updates commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6. (cherry picked from commit bc7f1a5ef156576c069f47ea33f4977979ac032d)
* tests: Replace truncate command with 'guestfish sparse'.Richard W.M. Jones2012-06-214-5/+5
| | | | | | | | | | | RHEL 5 didn't have the truncate command, but we can replace: truncate -s SIZE FILE with the roughly equivalent command: guestfish sparse FILE SIZE (cherry picked from commit 39df80dcc0e485e69048bddbf33c259ce532e50d)
* build: Define builddir and abs_srcdir when they are missing.Richard W.M. Jones2012-06-214-6/+12
| | | | | | | | | | | | | | | | | | | | | | RHEL 5-era autoconf did not define these, so define them manually when they are missing. Define builddir as '.' The scripts require this. It won't work in the srcdir != builddir case, but we don't care about that for RHEL 5. This commit also moves the builddir / abs_srcdir variable setting above the include of subdir-rules.mk, in case that include uses these variables. Useful script: for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do if ! grep -q '^abs_srcdir' $f; then echo missing in $f fi done (cherry picked from commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6)
* tests/md: Don't hard code /dev/vda in expected output of tests.Richard W.M. Jones2012-06-212-13/+14
| | | | | Use a small sed script to canonicalize the device names. (cherry picked from commit 320adf477805f703b0a1c79d86c3fb4078d11700)
* tests: Fix spelling in comment.Richard W.M. Jones2012-06-211-2/+2
| | | | (cherry picked from commit 9a5c0d39081f9f40d7ad12fbb55fb6120046679c)
* tests/lvm: Don't hard-code /dev/vda in test.Richard W.M. Jones2012-06-211-1/+1
| | | | | | Hard-coding it breaks virtio-scsi because the devices are called /dev/sda etc. (cherry picked from commit 7509cdf18e6d3fd96b10246f4d0417e5285e38f6)
* tests: Allow regression test for bug 690819 to be skipped.Richard W.M. Jones2012-06-211-0/+12
| | | | (cherry picked from commit 251b131e0a55cce21f6ee2240315903e34c4ffe1)
* tests: Add a test of non-ASCII character fidelity on various filesystem ↵Richard W.M. Jones2012-06-012-0/+491
| | | | | | | types (RHBZ#823887). Thanks Laszlo Ersek. (cherry picked from commit 8e8a5764293d1b6bc3dbfb9409722e4c13384aec)
* tests: Regression test for RHBZ#701814.Richard W.M. Jones2012-05-035-0/+255
| | | | | | | | | | | | | | | | | This commit adds a tests/xml directory, and an LD_PRELOAD module which can fake arbitrary libvirt XML from an external file (and is therefore a much more flexible test than using the libvirt test:// driver alone). Also added is one regression test for: https://bugzilla.redhat.com/show_bug.cgi?id=701814 Loading the given libvirt XML using Sys::Guestfs::Lib::open_guest used to fail with the error: format parameter is empty or contains disallowed characters at /home/rjones/d/libguestfs/perl/blib/lib/Sys/Guestfs/Lib.pm line 256. Thanks to Tom Horsley for supplying the test data.
* btrfs: Fix btrfs test so it works with btrfs-progs in Rawhide.Richard W.M. Jones2012-04-261-12/+12
| | | | See: http://bugzilla.redhat.com/816346
* btrfs: Enhance the btrfs device test.Richard W.M. Jones2012-04-251-2/+37
| | | | This enhances commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
* tests: Add some more substantial test data.Richard W.M. Jones2012-04-253-0/+2
| | | | | | | | | | | | | The two tarballs: 8252 bytes tests/data/filesanddirs-10M.tar.xz 41152 bytes tests/data/filesanddirs-100M.tar.xz contain, as their names suggest, highly compressed files and directories, with unpacked size respectively around 10M and 100M (the precise size after unpacking depends on the filesystem). These can be used for testing purposes.
* btrfs-device-delete: Use correct (sysroot-prefixed) path to filesystem.Richard W.M. Jones2012-04-251-3/+1
| | | | This fixes commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
* New btrfs APIs.Richard W.M. Jones2012-04-253-0/+183
| | | | | | | | | | | | | | | | Bind the easy parts of the 'btrfs' program. The new APIs are: btrfs-device-add: add devices to a btrfs filesystem btrfs-device-delete: remove devices from a btrfs filesystem btrfs-filesystem-sync: sync a btrfs filesystem btrfs-filesystem-balance: balance a btrfs filesystem btrfs-subvolume-create: create a btrfs snapshot btrfs-subvolume-delete: delete a btrfs snapshot btrfs-subvolume-list: list btrfs snapshots and subvolumes btrfs-subvolume-set-default: set default btrfs subvolume btrfs-subvolume-snapshot: create a writable btrfs snapshot
* guests: Add /etc/shadow file to fedora.img.Richard W.M. Jones2012-04-211-0/+5
| | | | This is used for testing file permissions and SELinux contexts.
* tests: Space before parens in perl code.Richard W.M. Jones2012-04-211-77/+77
|
* Remove obsolete valgrind rule from C API tests.Richard W.M. Jones2012-04-181-5/+0
|
* extra-tests: Check if valgrind supports --vgdb=no option.Richard W.M. Jones2012-04-181-3/+3
| | | | This option didn't exist in RHEL 6 valgrind.