Replace the custom XSLT + script to turn output from $RUN_OUTPUT_FILE
(from previous run.in versions) with a OCaml script to analyze .trs and
.log files of the automake test framework.
The final result should be the same, just with classname= for each test
set to the "path" (subdirectories) to that test.
Use (implicitly) parallel tests on new enough automake. The tests run
a bit quicker with this change. On my laptop, I measured 27 mins down
to 18 mins.
Change the ./run function so that ./run --test no longer spools the
test output to a file. That is not necessary when using parallel
tests, since the test harness does the same thing.
Note: This commit removes the $RUN_OUTPUT_FILE functionality. We will
change the CI integration in a future commit so it uses the .trs and
.log files.
Various tests cannot be run in parallel just because they happen to
use conflicting names for temporary output files (eg. "test.out").
Change these tests to use unique temporary names, so the tests could
be run in parallel.
Remove man pages and other pages which 'make clean' did not remove
before.
To evaluate which pages could be removed, I did a full build and
check, and then ran 'make clean' followed by 'git clean -xdf'. By
examining the output of the git clean command I could see which files
were being missed.
Files that are _not_ removed by make clean or make distclean:
- generator-built files
- Makefile, Makefile.in, .deps, .depend
- any ./configure output files (maybe they should be?)
It's a nice idea, but has never actually found a problem. After using
afl to find bugs in qemu-img, it's pretty clear to me that no
successful approach could be run in the short time demanded by the
libguestfs test suite. Afl tests run for days, weeks or even months.
A better approach may be to use a proven fuzz tester (such as afl) on
the inspection code; or to run this code for days on end on a separate
testing machine.
This reverts commit c2dcd10964.
This test failed during release testing. It turned out to be because
the tests are run with LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 which
causes other messages to be printed.
Updates commit b5a6f899cd.
Create a new top-level directory called test-data, which will carry
all the test data which is large and/or shared between multiple tests.
There are actually several new subdirectories created:
test-data/binaries: The pre-built binary and library files for random
architectures that we use to test various architecture detection
features (was part of tests/data).
test-data/blank-disks: The blank disks which are used for disk format
detection (was part of tests/data).
test-data/files: Other miscellaneous test files from tests/data that
are not included in the above.
test-data/phony-guests: The phony guests (was tests/guests).
test-data: The top-level directory builds the 'test.iso' image file
that is used for testing the C API and in miscellaneous other tests.
Use FilenameList as type for lists of file names, as used in some
listing-alike APIs. This way we can ensure anything different than just
file names in those lists is rejected outright.
As a consequence, test-big-dirs.pl does not need to prepend the
directory name anymore before calling listing-alike APIs: previously
they didn't fail, but the returned lists contained only invalid
elements (and only their size was checked).
Furthermore, add a new regression test for it.
We have phony tools for v2v tests, introduced with
commit c1af1ba32f126b7be275bcc8cd4ea4e5af27a88e; make use of it also in
tests related to v2v outside the v2v directory.
The log file was not being closed at the right time, resulting in the
process running out of open files. Also the log filename buffer was
not freed.
This fixes commit 7bbf5cab28.
This option can be used to direct output from each individual
boot test to a different file. Usual usage is:
qemu-boot --log /tmp/output.% -v -x -n 1000
Calling _exit(2) in the child process has the side effect that
tmp/libguestfsXXXXXX is not cleaned up. Clean it up by ensuring the
handle is properly closed before _exit.
This test has been broken for a while. It is meant to test that when
the appliance cachedir is empty, two simultaneous runs of libguestfs
(both rebuilding the full appliance) will not cause conflicts, because
(eg) the locking in either supermin or libguestfs is not working.
However the test only set $TMPDIR, but the ./run script sets
$LIBGUESTFS_CACHEDIR which overrides $TMPDIR, so it was simply reusing
the existing appliance, and hence not testing anything.
Fix this by clearing $LIBGUESTFS_CACHEDIR.
Note the test now takes a lot longer to run since it does a full
appliance rebuild.
Instead of hardcoding the location of perl (assuming it is installed in
/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
This makes it possible to run these scripts also on installations with
perl in a different prefix than /usr.
Also, given that we want enable warnings on scripts, turn the -w
previously in shebang to explicit "use warnings;" in scripts which
didn't have it before.
We don't support RHEL 5 upstream (see the 'oldlinux' branch for a
version that works with RHEL 5). Therefore remove a bunch of hacks
that were only needed on RHEL 5.
Because of previous automated commits, such as changing 'guestfs___'
-> 'guestfs_int_', several function calls no longer lined up with
their parameters, and some lines were too long.
The bulk of this commit was done using emacs batch mode and the
technique described here:
http://www.cslab.pepperdine.edu/warford/BatchIndentationEmacs.html
The changes suggested by emacs were then reviewed by hand.
For raw, this allows "off" as a synonym for "sparse" (to make it
consistent with qcow2).
For qcow2, this allows "sparse" as a synonym for "off".
It also adds qcow2 "full" preallocation, which is actually mapped to
the qemu option "falloc" (see arguments about this on the qemu-devel
mailing list, which we lost).
This also updates the test.
Because this 'feature' is broken (since 2013):
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
we have to replace all instances of $(top_srcdir) in *_SOURCES lines
with a relative path. According to what I read, this shouldn't break
split builds, but I didn't test it.
The only things automake moans about now are:
* Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake line 3936.
- This is another bug in automake
* autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
- This is a feature, not a bug.
Run `qemu-nbd --help` to know whether it supports --format, and if so
pass it explicitly. This avoids warnings with newer qemu versions,
where they really recommends to explicit the format of disk images being
specified on command line.
"my" variable $output masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 66.
"my" variable @r masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 72.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This refines the previous commit by shutting down the daemon cleanly
at the end of the test (assuming the test was successful). It
repurposes the 'internal_exit' API for this, which was previously used
by the now defunct --enable-valgrind-daemon functionality.
This allows us to test the daemon running as a host process, allowing
us to meaningfully test it using valgrind.
This commit only adds a single test that check that the daemon starts
up, can be pinged, and exits.
Extract them to find out the architecture of the data they hold.
Useful to detect the architecture of e.g. compressed Linux modules.
Provide in the test.iso two samples (compressing existing test data) of
binaries compressed with gzip and xz.
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
The first step is to replace all guestfs___* (3 underscores) with
guestfs_int_*. We've used guestfs_int_* elsewhere already as a prefix
for internal identifiers.
This is an entirely mechanical change done using:
git ls-files | xargs perl -pi.bak -e 's/guestfs___/guestfs_int_/g'
Reference: http://stackoverflow.com/a/228797