Commit Graph

4679 Commits

Author SHA1 Message Date
Richard W.M. Jones
6e5916e0f4 lua: examples: Boolean true shouldn't have quotes around it. 2012-11-18 19:24:20 +00:00
Richard W.M. Jones
6483c506b9 lua: Add another test to prove that the handles are really independent. 2012-11-18 16:45:44 +00:00
Richard W.M. Jones
6710296b7a lua: Don't use %m since Lua string formatter doesn't understand it.
Use %s + strerror as a replacement.
2012-11-18 16:45:08 +00:00
Richard W.M. Jones
4ba8b5a00d lua: Add some missing features.
- Remove default error handler.
- User cancel.
- Add the errno to the object which is thrown on error.

Still no events.
2012-11-17 21:28:43 +00:00
Richard W.M. Jones
a9c4efdcfd Version 1.19.60. 1.19.60 2012-11-17 20:03:57 +00:00
Richard W.M. Jones
ff8bfd3e92 Add Lua bindings.
These are relatively complete, although only lightly tested.  Missing:

 - events
 - last_errno
 - user_cancel
2012-11-17 20:02:42 +00:00
Richard W.M. Jones
4a2e8e8957 perl: Clean up and update the tests. 2012-11-17 18:14:20 +00:00
Richard W.M. Jones
3d0e937b84 perl: Small test of create with flags. 2012-11-17 17:55:06 +00:00
Richard W.M. Jones
43369e1bd4 sparsify: Better error when user specifies --compress + raw output (RHBZ#852194). 2012-11-15 16:37:23 +00:00
Richard W.M. Jones
2f321ced21 todo: We must implement ACLs and filesystem capabilities for SCAP.
Thanks Steve Grubb.
2012-11-15 15:35:46 +00:00
Richard W.M. Jones
a41629deb9 daemon: Perform device name translation on mke2fs journaldevice (RHBZ#876579).
Also various fixes:

 - remove fixed-size buffer
 - change if (err) free (err) -> free (err).
2012-11-15 10:16:28 +00:00
Richard W.M. Jones
5d9f10c312 recipes: Add sections about hexdumping, hexediting sectors. 2012-11-15 09:01:15 +00:00
Richard W.M. Jones
fd81d3f9b2 recipes: Add recipe for diffing two guests. 2012-11-14 22:34:06 +00:00
Richard W.M. Jones
5638cd3024 Version 1.19.59. 1.19.59 2012-11-13 15:36:30 +00:00
Richard W.M. Jones
e8ad3efbc4 dist: Add miscellaneous files to the tarball.
Lots of these had been omitted over time.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
2d89aef897 tests/protocol: Add test-qemudir-launchfail.sh to tarball (but don't run it).
This file was present in git, but missing from the tarball.

Don't actually run the test: it depends on details of how the
appliance is constructed which would fail for old-style appliances.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
715afda341 fish: Add test for remote events.
This test was present in git, but not included in the tarball,
nor in the tests that guestfish actually runs.

This fixes commit 17182af3a6.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
5c44c691f2 tests: Add a parallel launch test.
This is designed to reveal libvirt race conditions such as
bug 875741.

This is a "slow test" so it only runs if you do 'make check-slow'.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
ee5f18293b tests: Add 'make check-slow' rule to recursively run slow/long-running tests. 2012-11-13 15:26:29 +00:00
Richard W.M. Jones
cb4284b9e3 Add 'make help' rule.
This gives a short overview of the make targets.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
3636c5fcff tests: Replace 'make extra-tests' with individual tests.
'make extra-tests' was a monolithic set of tests that did all sorts of
things: valgrind, tests over local guests, tests with upstream qemu,
tests with upstream libvirt, tests with the appliance attach method.

This made it hard to perform individual tests, eg. just valgrind
testing.  It was also hard to maintain because the tests were not
located in the same directories as the programs and sometimes
duplicated tests that were run elsewhere.

This commit splits up 'make extra-tests' into 5 separate targets:

 make check-valgrind              # run a subset of tests under valgrind
 make check-valgrind-local-guests # test under valgrind with local guests
 make check-with-appliance        # test with attach-method == appliance
 make check-with-upstream-qemu    # test with an alternate/upstream qemu
 make check-with-upstream-libvirt # test with an alternate/upstream libvirt

(You can also still run 'make extra-tests' which is now simply
a rule that runs the above 5 targets in order).

This replaces everything that was in the tests/extra directory,
so that has now gone.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
c4a3ea066b extra-tests: Add $(libvirt_ro_uri) substitution to configure.
This is essentially just code motion.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
765d14dc05 Define whole valgrind command (as @VG@) in the configure script.
This is mostly just code motion, but it also changes the default
location where valgrind.log is written to be the top build directory
(instead of tests/extra/valgrind.log).
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
ab360c48d4 align: Add a test for virt-alignment-scan. 2012-11-13 15:26:29 +00:00
Richard W.M. Jones
ac2ddfd90a fish: Add simple tests of starting up, inspection, using the prepared disks. 2012-11-13 15:26:29 +00:00
Richard W.M. Jones
73631705cf inspector: Add some real virt-inspector tests. 2012-11-13 15:26:29 +00:00
Richard W.M. Jones
e884abfd06 extra-tests: Move valgrind suppressions file to top source directory.
This is just code motion.
2012-11-12 15:49:08 +00:00
Richard W.M. Jones
b2663be064 Various fixes to API support script.
Remove internal structures, fix it so it works with the new
code layout under src/
2012-11-12 13:40:43 +00:00
Richard W.M. Jones
02ecd048d3 lib: Split up huge src/guestfs.c into logical compilation units.
This file had grown by accretion to include:

 - code related to handles (now in src/handle.c)

 - safe allocation (src/alloc.c)

 - debug, errors, warnings (src/errors.c)

 - private data (src/private-data.c)

 - miscellaneous functions (src/canonical-name.c, src/utils.c)

This commit also removes about a dozen #include files which were
probably not really used.

This is just code motion.
2012-11-12 13:40:25 +00:00
Richard W.M. Jones
f9ab256f0e test-tool: Print cachedir and tmpdir.
This fixes commit 1efed122c0.
2012-11-10 22:03:25 +00:00
Richard W.M. Jones
2c9e532566 Update release notes. 2012-11-10 14:04:09 +00:00
Richard W.M. Jones
17090bd09f Version 1.19.58. 1.19.58 2012-11-10 11:25:26 +00:00
Richard W.M. Jones
fcf8032cbd lib: Fix memory leak in tmpdir/cachedir code (found by valgrind).
This fixes commit 1efed122c0.
2012-11-10 08:55:38 +00:00
Richard W.M. Jones
99377e2748 tests: Remove double-test for availability.
If you have a function which is in the X optgroup, and also has
IfAvailable X, then two tests for the optgroup are added to the
output.

Check for this case and give an error.

This also fixes existing APIs.
2012-11-09 22:48:47 +00:00
Richard W.M. Jones
a74f168168 tests: More efficient use of strings in the object code.
No functional change.
2012-11-09 22:48:47 +00:00
Richard W.M. Jones
a270faefef tests: Use guestfs_{push,pop}_error_handler.
Replace the custom error handler with calls to
guestfs_{push,pop}_error_handler only where necessary.  This
simplifies the generated code.
2012-11-09 22:48:47 +00:00
Richard W.M. Jones
2deb235cf4 tests: Cleanup code that prints each test name.
This is just code motion.
2012-11-09 22:48:47 +00:00
Richard W.M. Jones
56c7967cad tests: Change code for printing warnings about untested functions.
Just code cleanup, no functional change.
2012-11-09 20:19:30 +00:00
Richard W.M. Jones
04a8cffee7 tests: Remove dead code in generated output. 2012-11-09 20:19:08 +00:00
Richard W.M. Jones
599a1930b0 tests: Format the generated code properly.
This is just whitespace changes in the output.
2012-11-09 20:18:54 +00:00
Richard W.M. Jones
25ff0db3b4 fuse: Use guestfs_{push,pop}_error_handler so we can see errors in shutdown.
In the fork (usual) case, we still won't see any errors since stderr
has been redirected to /dev/null, but this way is still a little more
correct.
2012-11-09 19:53:39 +00:00
Richard W.M. Jones
2d220f5da2 tools: Modify existing tools to use guestfs_{push,pop}_error_handler.
This is a shorter and more convenient way to disable errors
temporarily across calls.
2012-11-09 19:51:09 +00:00
Richard W.M. Jones
b460d9f32e lib: Modify library code to use guestfs_{push,pop}_error_handler.
This is less efficient than directly manipulating g->error_cb, but
easier to maintain.
2012-11-09 19:51:08 +00:00
Richard W.M. Jones
a3b6751863 lib: Add new C API calls: guestfs_push_error_handler,
guestfs_pop_error_handler.

The addition of these calls makes it much simpler to temporarily
disable or ignore errors:

 guestfs_push_error_handler (g, NULL, NULL);
 guestfs_mkdir (g, "/foo"); /* We don't care if this fails. */
 guestfs_pop_error_handler (g);

Note these calls are used by the C API only.  They are not necessary
in other languages, because those map errors to exceptions.

The subsequent commits change existing code to use push/pop instead of
laboriously saving and restoring the error handler.
2012-11-09 19:50:57 +00:00
Richard W.M. Jones
2013e005bd lib: Break long line in definition of guestfs_set_error_handler.
This is just a whitespace change.
2012-11-09 19:50:57 +00:00
Richard W.M. Jones
692701f382 examples: Copy-editing instructions printed by the mount-local program. 2012-11-09 19:50:57 +00:00
Richard W.M. Jones
dedf10aaa9 header: Define LIBGUESTFS_HAVE_CREATE_FLAGS=1.
This fixes commit 9466060201.
2012-11-09 17:15:50 +01:00
Richard W.M. Jones
1586bbb951 fish: Update documentation for environment variables.
This fixes commit 1efed122c0.
2012-11-09 13:34:45 +00:00
Richard W.M. Jones
1efed122c0 lib: Rework temporary and cache directory code.
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.

The current code has evolved over time and has a number of problems:

(a) A single environment variable ($TMPDIR) controls the
location of several directories.

(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.

This commit fixes these issues.

(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:

  For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.

  For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.

The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).

(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.

This commit also:

 - reworks the internal tmpdir code

 - removes the internal (undocumented) guestfs_tmpdir call (replacing
   it with calls to the documented guestfs_get_tmpdir API instead)

 - changes the ./run script to set LIBGUESTFS_TMPDIR and
   LIBGUESTFS_CACHEDIR

 - adds a test

 - fixes a few places like libguestfs-make-fixed-appliance which
   depended on $TMPDIR
2012-11-09 13:11:53 +00:00
Richard W.M. Jones
e8d937bd73 lib: When parsing environment, handle LIBGUESTFS_TRACE first.
So that we can trace all the later calls.
2012-11-09 13:09:04 +00:00