| 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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 9e7644346dc4303316e59dda13ea5b2f60549626)
|
|
|
|
| |
(cherry picked from commit 35882ba97722ddf9b4c55a332961b08ad8240dd7)
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
types (RHBZ#823887).
Thanks Laszlo Ersek.
(cherry picked from commit 8e8a5764293d1b6bc3dbfb9409722e4c13384aec)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
See: http://bugzilla.redhat.com/816346
|
|
|
|
| |
This enhances commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This fixes commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This is used for testing file permissions and SELinux contexts.
|
| |
|
| |
|
|
|
|
| |
This option didn't exist in RHEL 6 valgrind.
|
|
|
|
| |
This fixes commit a9bd90abfb3d4519278dfff305b8b7033ae6d76a.
|
| |
|
| |
|
|
|
|
| |
(RHBZ#811872).
|
|
|
|
| |
https://www.redhat.com/archives/libvir-list/2012-April/msg00322.html
|
|
|
|
| |
This leaves files called 'vgdb-pipe-*' in .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
The return value of the pwrite-device command -- 4 (bytes) -- is
printed out. Hide it instead.
|
| |
|
| |
|
|
|
|
|
| |
The start_test_thread function never returns, it is always
cancelled by the main thread.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The presumption is that all file descriptors should be created with
the close-on-exec flag set. The only exception are file descriptors
that we want passed through to exec'd subprocesses (mainly pipes and
stdin/stdout/stderr).
For open calls, we pass O_CLOEXEC as an extra flag, eg:
fd = open ("foo", O_RDONLY|O_CLOEXEC);
This is a Linux-ism, but using a macro we can easily make it portable.
For sockets, similarly:
sock = socket (..., SOCK_STREAM|SOCK_CLOEXEC, ...);
For accepted sockets, we use the Linux accept4 system call which
allows flags to be supplied, but we use the Gnulib 'accept4' module to
make this portable.
For dup, dup2, we use the Linux dup3 system call, and the Gnulib
modules 'dup3' and 'cloexec'.
|
| |
|
| |
|
|
|
|
| |
This fixes commit 2912e4e1173226f461517a0008664e01b5d3066d.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Currently only ext2/3/4 and (newly) NTFS are supported.
This change also deprecates set-e2label.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Test all the ways that the 'mount' command can fail. Ensure that none
of them result in failures or desynchronization.
|
|
|
|
|
|
|
|
|
| |
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.
|