When virt-sparsify receives a user quit signal (eg from ^C) it
currently kills virt-sparsify and qemu instantly, meaning any mount +
fstrim in progress is uncleanly stopped. The (minor) side effect of
this is that the guest filesystem may require a journal replay or fsck
on boot.
Let virt-sparsify capture the user quit signal and shut down
gracefully.
It is not thought that the previous behaviour could cause guest
corruption; see
https://lists.nongnu.org/archive/html/qemu-devel/2015-11/threads.html#00402
for discussion.
- include <sys/un.h> for sockaddr_un, on any OS (removing the Mac OS X
blocks)
- include <fcntl.h> for O_* flags
This commits reverts a couple of changes in these files done in
commit 3b17152ec3.
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.
Also move guestfs-performance to the right place on the website.
This updates commit 2eb01004bf
and commit d07515b947
and commit 74fba6e692
and commit 15b8b6453d.
Move the random set of HTML files we build from html/ into
the website/ directory.
Also in the website/ directory, put the index.html file from
http://libguestfs.org, which was previously not under version control.
It is generated from index.html.in so we can automatically add the
current version and release date.
Also in the website/ directory, put various CSS file, images, etc.
which are required by the website and were also previously not under
version control.
Change the 'make website' rule to 'make maintainer-upload-website'.
As the name suggests, it is only useful for the maintainer, and will
fail with an error for anyone else.
When I conceived commit dc1d0880b0, I
thought it would be a good idea to build test-data files, including
the phony guest images, during the 'make' phase. Previously these
were built early in the 'make check' phase.
However this has two disadvantages: (a) We run the appliance
unnecessarily during builds. For example, it is not necessary to
build the phony guests if we are going to do an 'installcheck'.
(b) Even if we are testing, the critical first time we run the
appliance is not in 'quickcheck' or 'tests/qemu', but some random
guest build.
Reorder the build sequence to fix this, and also a few other things.
This updates commit dc1d0880b0.
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.
Create a Windows module, analogous to the Linux module we already
have. Move utility functions related to Windows into this module.
In particular:
- detect_antivirus function moves here, and the Detect_antivirus
module goes away entirely
- copy_virtio_drivers / virtio_iso_path_matches_guest_os moves here,
and the virtio_iso_path_matches_guest_os can now be hidden
This is just refactoring, but allows us to make deeper changes to
copy_virtio_drivers.
The three utility functions xml_quote_attr, xml_quote_pcdata and
uri_escape were only used in a single module. Move them close to
where they are used.
This is just code refactoring.
Unfortunately Coccinelle places a Config module in the ocaml libdir,
and this confuses ocamlfind (only when Coccinelle is installed).
Since this is a private module that only libguestfs tools use
internally, just rename it from Config -> Guestfs_config.
Do this early since these tests generally don't depend on anything
else (the external program is either there or its not), and because
other things depend on some of these tests.