Richard W.M. Jones
14fabcd88e
tests: Use new guestfs_add_drive_scratch API where possible in tests.
...
Replaces code such as:
fd = open "test1.img"
ftruncate fd, size
close fd
g.add_drive "test1.img"
with the shorter and simpler:
g.add_drive_scratch size
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
57064c12ae
fish: Link to the new 'scratch' command from the old 'sparse' command.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
0d97bcf8ae
tests/lvm: Remove some commented out debugging code.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
0f7642674b
tests/c-api: Use guestfs_add_drive_scratch API to create scratch drives.
...
Replaces the old custom code for making and deleting the drives.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
1b11a83d52
New API: add-drive-scratch.
...
This adds a temporary scratch drive to the handle.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
ecce45acc4
Revert "tests: Add a regression test for all disk_* info commands (RHBZ#981663)."
...
This reverts commit 2311fb0632 .
This is no longer needed, since now the disk_* info functions
are being properly tested by the C API tests.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
8a3ecfc04e
tests/c-api: Remove 'GETKEY:' hack since it's no longer used anywhere.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
89865011e4
tests: Better testing of guestfs_disk_* functions using blank disks from tests/data directory.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
48ed7abc21
tests/data: Add some blank disks in various sizes and formats for testing.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
b1d1a18af9
ocaml: Rewrite TESTS rule to be compatible with automake 1.13 parallel-tests.
...
Because of this bug in automake:
https://lists.gnu.org/archive/html/bug-automake/2013-01/threads.html#00103
this requires that we duplicate the lists of bytecode (bc) and native
code (opt) tests because we cannot use ordinary GNU make macros to
construct these lists.
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
7867c7cd8e
FAQ: Add section about different packaging strategies for libguestfs.
2013-07-20 16:31:41 +01:00
Richard W.M. Jones
ec4498fec1
Update API support.
2013-07-19 12:00:03 +01:00
Richard W.M. Jones
0fbd5703c8
Version 1.23.9.
1.23.9
2013-07-19 10:06:31 +01:00
Richard W.M. Jones
3201e75564
mkfs: Use -b size=<size> for xfs (RHBZ#981715).
2013-07-18 14:36:25 +01:00
Richard W.M. Jones
2311fb0632
tests: Add a regression test for all disk_* info commands (RHBZ#981663).
2013-07-18 13:59:51 +01:00
Richard W.M. Jones
28e0877682
info: Fix double-call to error function when qemu-img info command fails (RHBZ#981663).
...
Previously if the 'qemu-img info --output json' command failed, then
the stdout callback would be called first with a zero-length buffer.
Since a zero-length buffer cannot be valid JSON (in this context)
don't produce a separate error message.
However do catch the case when qemu-img info might produce no output
and no error (if that were to happen -- it does not happen at the
moment).
2013-07-18 13:59:51 +01:00
Richard W.M. Jones
d50cb7bbb4
info: disk-format et al: Fix error message when no file exists (RHBZ#981663).
...
$ guestfish disk-format /etc/nosuchfile
Instead of this obscure double error message:
libguestfs: error: qemu-img info: JSON parse error: parse error: premature EOF
(right here) ------^
libguestfs: error: qemu-img info: /etc/nosuchfile: qemu-img info exited with error status 1.
To see full error messages you may need to enable debugging.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You will now see this simpler error:
libguestfs: error: disk info: /etc/nosuchfile: No such file or directory
Thanks: Bo Fan.
2013-07-18 13:59:51 +01:00
Richard W.M. Jones
aecb5f4b33
cmd: Allow callers to override file-closing behaviour after fork.
...
This allows us to send file descriptors directly to child processes,
eg. using /dev/fd/<N>.
2013-07-18 13:59:51 +01:00
Richard W.M. Jones
758a2262f5
acls: Improve documentation for acl_set_file (RHBZ#985269).
...
Thanks: Bo Fan.
2013-07-18 10:03:13 +01:00
Richard W.M. Jones
ea817cdc60
library: Fix a few direct calls to perror(3).
...
Mainly in the FUSE code, left over from when this code lived in the
standalone guestmount program.
2013-07-17 17:00:01 +01:00
Richard W.M. Jones
ed2351e137
tests: Improve the testing of acl_set_file function.
...
See also: https://bugzilla.redhat.com/show_bug.cgi?id=985269
2013-07-17 12:52:41 +01:00
Richard W.M. Jones
a7b9d61cde
./run: Increase default timeout from 1h -> 4h.
...
1 hour was not long enough for the C API tests when run in Koji.
This update commit caab9f1e6f .
2013-07-11 21:05:56 +01:00
Richard W.M. Jones
ae78381287
launch: appliance: Fix a double-free if kernel linking fails (RHBZ#983218).
...
This also simplifies the code which takes the building_lock around
guestfs___build_appliance.
Thanks Attila Fazekas for the detailed bug report.
2013-07-11 19:15:56 +01:00
Richard W.M. Jones
caab9f1e6f
./run: Timeout tests after 1 hour.
...
No single test should run longer than 1 hour even on the slowest of
hardware. We are having a problem in Koji where a test hangs and then
we end up losing the output completely, so a timeout + print the log
to that point is much better.
2013-07-11 12:58:45 +01:00
Richard W.M. Jones
745e507c2f
./run: Add a better comment describing --test mode.
...
This is just code motion, there is no functional change.
2013-07-11 12:53:28 +01:00
Richard W.M. Jones
7e134f865f
Remove more temporary ($builddir/tmp) files when doing 'make clean'.
2013-07-09 14:32:14 +01:00
Richard W.M. Jones
0bc729e85b
golang: Fix it so it builds if libguestfs is not installed.
...
It was using the installed copy of libguestfs not the local copy.
We can't encode the paths in guestfs.go, since this source file gets
copied into the install directory where those paths would not make
sense. Instead we have to use CGO_CFLAGS and CGO_LDFLAGS to
communicate the right flags to go when doing the local build and test.
2013-07-09 14:11:12 +01:00
Richard W.M. Jones
2624315bf1
Version 1.23.8.
1.23.8
2013-07-09 11:59:04 +01:00
Richard W.M. Jones
d457df7dc2
tests: Add test for aug_ls.
2013-07-06 21:05:13 +01:00
Richard W.M. Jones
bf838e3333
tests: Test aug_insert, aug_clear and aug_save.
2013-07-06 20:56:11 +01:00
Richard W.M. Jones
48c16e5ef1
tests: Test aug_set.
2013-07-06 20:46:45 +01:00
Richard W.M. Jones
535963bac3
tests: Test result of aug_get properly.
...
Don't just check aug_get runs, check the resulting string is correct.
2013-07-06 20:46:45 +01:00
Richard W.M. Jones
86ca8af9f1
tests: c-api: Add a cleanup function for tests.
...
By specifying a cleanup function we can ensure that Augeas and hivex
functions can be tested.
There is no functional change here, verified by diffing the generated
file tests/c-api/tests.c before and after.
2013-07-06 20:46:45 +01:00
Richard W.M. Jones
b5a938f464
tests: Fix mix up of actual/expected in error messages.
2013-07-06 20:46:45 +01:00
Richard W.M. Jones
02123b7242
FAQ: Fix typo.
2013-07-06 15:08:13 +01:00
Richard W.M. Jones
4b838a4b28
FAQ: Explain qemu-nbd & libguestfs better.
2013-07-06 15:07:58 +01:00
Richard W.M. Jones
31ce47fe48
tests: Add basic Augeas tests.
2013-07-05 15:07:34 +01:00
Richard W.M. Jones
8c9a5d623e
hivex: Add some simple tests of the hivex_* APIs.
...
These are by no means comprehensive, but cover the basics.
The 'minimal' hive comes from hivex.
2013-07-05 14:58:26 +01:00
Richard W.M. Jones
c8f0a2eb76
daemon: hivex: Check that hivex_commit is passed an absolute path (RHBZ#981683).
...
You will now get an error like:
libguestfs: error: hivex_commit: do_hivex_commit: path must start with a / character
2013-07-05 14:27:38 +01:00
Richard W.M. Jones
280dbed9aa
filesystem-available: Clarify documentation for this test.
...
See:
https://bugzilla.redhat.com/show_bug.cgi?id=980358#c1
Thanks Bo Fan.
2013-07-05 13:59:21 +01:00
Richard W.M. Jones
06f2c1ad70
golang: Add examples and guestfs-golang(3) man page.
2013-07-04 15:48:47 +01:00
Richard W.M. Jones
43121a02e7
golang: Don't try to free the result of guestfs_last_error.
...
The return value is a constant string, part of the handle, and
it must not be freed by the golang code.
2013-07-04 15:29:02 +01:00
Richard W.M. Jones
bb09c4a448
golang: tests: Call or defer g.Close().
2013-07-04 14:52:44 +01:00
Richard W.M. Jones
58b51f5921
golang: Add bindtests.
2013-07-04 14:01:27 +01:00
Richard W.M. Jones
d48e4400fc
golang: Map OptString to *string, not string (since string is not nullable).
2013-07-04 14:01:27 +01:00
Richard W.M. Jones
86c1e53ee6
golang: Capitalize fields in OptArgs* structs.
...
Otherwise those fields aren't accessible outside the package. We
didn't catch this because all tests run in the same package.
2013-07-04 13:49:01 +01:00
Richard W.M. Jones
a31926bd75
golang: If 'go run' command fails, log the error message in config.log.
2013-07-04 13:12:00 +01:00
Richard W.M. Jones
8f504539f2
java: Fix typo in comment.
2013-07-04 13:11:45 +01:00
Richard W.M. Jones
4bb3aa7dde
Version 1.23.7.
1.23.7
2013-07-03 15:02:57 +01:00
Richard W.M. Jones
b6f01f3260
Add Go (language) bindings.
2013-07-03 15:02:57 +01:00