| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 5489304c8d2836713ec58051c24514eba22b8c94)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 90d0beb3c528d91029349b64d0159836c776189b)
|
|
|
|
|
|
| |
By setting these variables, we can skip tests that fail on
RHEL 5.
(cherry picked from commit 145f35badfd9ca4a6d9f54f7732566a5e5114876)
|
|
|
|
|
|
|
|
|
| |
This is missing on RHEL 5.
This updates commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6.
Cherry picked from commit bc7f1a5ef156576c069f47ea33f4977979ac032d
and backported to libguestfs 1.16.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
and backported to libguestfs 1.16 branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Use a small sed script to canonicalize the device names.
(cherry picked from commit 320adf477805f703b0a1c79d86c3fb4078d11700)
|
|
|
|
| |
(cherry picked from commit 9a5c0d39081f9f40d7ad12fbb55fb6120046679c)
|
|
|
|
|
|
| |
Hard-coding it breaks virtio-scsi because the devices are called
/dev/sda etc.
(cherry picked from commit 7509cdf18e6d3fd96b10246f4d0417e5285e38f6)
|
|
|
|
| |
(cherry picked from commit 251b131e0a55cce21f6ee2240315903e34c4ffe1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 12c5394d4cb379890c9c69c16d1d735674a2e80d)
|
|
|
|
|
| |
This is used for testing file permissions and SELinux contexts.
(cherry picked from commit 03d321d0225512bdcd136ac7cb086c0b292a9c09)
|
|
|
|
| |
(cherry picked from commit c844a38d6e6990af00506afb434a6f7b40e5259f)
|
|
|
|
| |
(cherry picked from commit c253c69d0955242e5f23dc194ddbaf34764f79f7)
|
|
|
|
|
| |
This option didn't exist in RHEL 6 valgrind.
(cherry picked from commit 58a5b5bd944655b028c915a91dad2220176986db)
|
|
|
|
| |
(cherry picked from commit a97e9429ea888b4732bbbcfdd85b9368dd6ef96c)
|
|
|
|
|
|
| |
(RHBZ#811872).
(cherry picked from commit 96b6504b09461aeb6850bb2e7b870a0a4c2f5edf)
|
|
|
|
|
| |
https://www.redhat.com/archives/libvir-list/2012-April/msg00322.html
(cherry picked from commit de2dc9f71dd284e033e999a4d0541848a7201b02)
|
|
|
|
|
| |
This leaves files called 'vgdb-pipe-*' in .
(cherry picked from commit b10a3d718e4ff8957e8af4afafcd1680c386ad33)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means renaming various temporary files (eg. fstab.tmp) that
several of the scripts were using so they don't conflict
(eg. fstab.tmp.$$).
Also the rule:
fedora-md1.img fedora-md2.img: guest-aux/make-fedora-img.pl
causes the script to run twice in parallel when using 'make -jN'.
Replace this with a stamp file so it runs once:
fedora-md1.img fedora-md2.img: stamp-fedora-md.img
stamp-fedora-md.img: guest-aux/make-fedora-img.pl
(cherry picked from commit f2ac7c18a775dc10c3fa502f3de5ad01faa0efea)
|
|
|
|
|
|
| |
The return value of the pwrite-device command -- 4 (bytes) -- is
printed out. Hide it instead.
(cherry picked from commit 418a048215b17dcf1f0c74693831306cbcf0f194)
|
|
|
|
|
|
| |
The start_test_thread function never returns, it is always
cancelled by the main thread.
(cherry picked from commit b9cb387a109f4d09cdef84a62194201e78f97cb7)
|
|
|
|
| |
(cherry picked from commit 2c8ead5aa0e6b821bf2d21a89e437e9a6c0ed1ca)
|
|
|
|
| |
(cherry picked from commit 099e3dd9f129e05bff5512855ea89530a7999004)
|
|
|
|
|
| |
This fixes commit 2912e4e1173226f461517a0008664e01b5d3066d.
(cherry picked from commit 99702fe443383707b9d9c1b84570baf3bebf9253)
|
|
|
|
| |
(cherry picked from commit 2912e4e1173226f461517a0008664e01b5d3066d)
|
|
|
|
| |
(cherry picked from commit 10f240a07f156493eb0540a95f9a3deba36c6862)
|
|
|
|
| |
(cherry picked from commit c9ea94810e2f7a5fcce2a7136eb07ce795f49c53)
|
|
|
|
| |
(cherry picked from commit 6a70cb337cff736831b51bbc9c4331785d756c20)
|
|
|
|
|
|
| |
Test all the ways that the 'mount' command can fail. Ensure that none
of them result in failures or desynchronization.
(cherry picked from commit cd06ddf4422a31528f4a268dad813938947e1a0d)
|
|
|
|
|
|
|
|
|
|
| |
rhbz727178.sh exists, but historically was never added to the list of
tests, so it doesn't run. Create a special variable for this test and
ensure it is added to EXTRA_DIST.
Test was originally added in
commit d7356a2801130907997acd5c7502e8417566e782.
(cherry picked from commit 1b15e543a8efee027451dcfb68743d35eda95dfc)
|
|
|
|
|
|
| |
(RHBZ#788641)
(cherry picked from commit 24d7889eba3eb6ee2f37ed9d384aa8734ebad7b7)
|
|
|
|
| |
(cherry picked from commit 518edc506fbdd66dcdd5a558cd086cfa296585a2)
|
|
|
|
|
| |
Update suppressions file to match.
(cherry picked from commit 0559f038ada850f627529ece97f5a4e8721a7ecd)
|
|
|
|
| |
(cherry picked from commit 8fd5a377b8521d53f56b66136d686a31c7e302b6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed some uses of ${srcdir} in shell scripts.
That is almost always better written as $srcdir.
The patch below converts most such variable references.
Here are the few remaining candidates:
$ git grep -i -E '\$\{[a-zA-Z_0-9]+\}'|grep -v Makefile.in.in
configure.ac: JAR_INSTALL_DIR=\${prefix}/share/java
configure.ac: JNI_INSTALL_DIR=\${libdir}
debian/rules: for TEST in ${DEBIAN_SKIP_TEST}; do \
debian/rules:# mv $${mod} $$(dirname $${mod})/libguestfsmod.so; \
java/Makefile.am:libguestfs_jar_DATA = libguestfs-${VERSION}.jar
java/Makefile.am:libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files)
perl/lib/Sys/Guestfs/Lib.pm: "-f", '${Package} ${Version} ${Architecture} ${Status}\n',
perl/typemap: croak (\"${Package}::$func_name(): called on a closed handle\");
perl/typemap: croak (\"${Package}::$func_name(): $var is not a blessed HV reference\");
tests/data/Makefile.am: echo "$${i}abcdefghijklmnopqrstuvwxyz"; \
We could change all of those, too, except the ones in configure.ac
and Makefile.am, since they refer to Make variables. Even those
should be changed, but to use the preferred Makefile notation:
$(prefix), $(libdir), $(VERSION).
>From a86770ecd45666232a94d76c8725c8f9b1c76e3a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Mon, 23 Jan 2012 11:15:12 +0100
Subject: [PATCH libguestfs] maint: use $var notation rather than ${var} when
possible
The only case to avoid in a shell script is when the byte after the
"}" is word-constituent, and concatenating it would thus change the
name of the variable.
These changes were induced by running this command:
git grep -l -i -E '\$\{(srcdir|md)' \
|xargs perl -pi -e 's/\$\{(srcdir|md)\}($|\w)/\$$1$2/gi'
The "g" was needed because there was one line with two instances.
The "i" is to handle ${SRCDIR}. The ($|\w) ensures that concatenating
whatever follows the "}" won't change semantics.
* gobject/run-bindtests: Use "$srcdir", not "${srcdir}".
* haskell/run-bindtests: Likewise.
* java/run-bindtests: Likewise.
* ocaml/run-bindtests: Likewise.
* perl/run-bindtests: Likewise.
* python/run-bindtests: Likewise.
* ruby/run-bindtests: Likewise.
* tests/guests/guest-aux/make-debian-img.sh: Likewise, but $SRCDIR.
* tests/guests/guest-aux/make-ubuntu-img.sh: Likewise.
* tests/guests/guest-aux/make-windows-img.sh: Likewise.
* tests/md/test-mdadm.sh: Likewise, but $md.
|
|
|
|
| |
(Includes fix by RWMJ)
|
|
|
|
| |
Update all copyright dates to 2012.
|
|
|
|
|
| |
This tool allows you to easily reformat a disk, creating a blank disk
with optional partition, LVM and empty filesystem.
|
|
|
|
|
|
|
|
|
| |
If you have a lot of guests, running extra tests takes a lot of time,
but (arguably) you're not really doing any more detailed testing.
Thus pick up to 5 guests at random to test. A different random
selection is done on each run, ensuring that data-driven errors (eg in
inspection) will still be found eventually.
|
|
|
|
|
|
|
|
| |
Change the test for duplicate drives so that you're allowed to
add /dev/null multiple times. This corresponds to traditional
usage.
This amends commit be47b66c3033105a2b880dbc10bfc2b163b7eafe.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Change the g->path to restore a absolute path instead of the mixed.
2. Check that if the adding drive is duplicated with the added drive.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Make sure abs_path is NULL before it is assigned, so freeing it
will work along the error path.
- Fix the test which added /dev/null multiple times.
|
|
|
|
|
|
|
|
|
|
|
|
| |
extra-tests is depending on tests-guests.
We need guests/*.img when doing extra-tests.
/work/git/libguestfs/run valgrind --log-file=/work/git/libguestfs/tests/extra/valgrind.log --leak-check=full --error-exitcode=119 --suppressions=/work/git/libguestfs/tests/extra/suppressions ../../cat/virt-cat -a ../guests/fedora.img /etc/fstab >/dev/null
../guests/fedora.img: No such file or directory
make[1]: *** [test-tools-internal] Error 1
make[1]: Leaving directory `/work/git/libguestfs/tests/extra'
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
|
|
|
|
| |
This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.
|
|
|
|
| |
This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.
|
| |
|
| |
|
| |
|