summaryrefslogtreecommitdiffstats
path: root/regressions
Commit message (Collapse)AuthorAgeFilesLines
* tests: Split regressions -> various subdirectories of tests/Richard W.M. Jones2011-12-2245-2752/+0
|
* tests: Rename capitests -> tests/c-api.Richard W.M. Jones2011-12-221-2/+0
|
* fish: Allow events to be processed in guestfish.Richard W.M. Jones2011-12-162-0/+89
| | | | | | | | Add 'event', 'list-events' and 'delete-event' commands so that event handlers can be registered, listed and deleted in guestfish. The event handler is a shell script snippet or host command. Cc: Pádraig Brady <P@draigBrady.com>
* inspection: Add a test for MD device mapping in fstabMatthew Booth2011-12-022-0/+75
| | | | | | | Check that we properly handle fstab entries of the form /dev/md0 and /dev/md/foo. RWMJ: Add a skip to test if the Augeas lens is not available.
* regressions: Allow test-launch-race.pl to be skipped.Richard W.M. Jones2011-11-241-0/+3
| | | | | export SKIP_TEST_LAUNCH_RACE_PL=1 will cause this test to be skipped.
* New API: md-stop for stopping MD devicesWanlong Gao2011-11-241-0/+13
| | | | | | | | This API is used to stop a md device. When we want to move a device to another md array, we should stop the md device which contained this device first. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* Rename mdadm_ apis to md_Matthew Booth2011-11-243-15/+15
| | | | | | | | | This change renames the following 2 apis: * mdadm_create -> md_create * mdadm_detail -> md_detail This is more consistent with list_md_devices, and removes a reference to an implementation detail from the api.
* New API: mdadm-detail.Matthew Booth2011-11-171-1/+59
|
* Update list-filesystems to check md devices.Matthew Booth2011-11-112-0/+77
|
* New API: list-md-devices.Matthew Booth2011-11-112-0/+60
| | | | | | | Return a list of Linux MD devices detected in the guest. This API complements list_devices, list_partitions, list_lvs and list_dm_devices.
* New API: mdadm-create for creating MD devices.Richard W.M. Jones2011-11-112-0/+96
|
* Update FSF address.Matthew Booth2011-11-0838-38/+38
|
* add-domain: Add readonlydisk optional argument (RHBZ#747290).Richard W.M. Jones2011-10-262-6/+30
| | | | | | | | | | | | | | | This optional argument controls how <readonly/> disks in the libvirt XML are handled. It can be set to one of: "write" (default) - add them R/W "read" - add them R/O "error" - throw an error if asked to add them R/W "ignore" - ignore these disks I have added limited regression tests for this feature. However libvirt's test:/// XML does not allow you to specify that a domain starts off shut down, so we cannot fully test this. Instead I tested it by hand.
* inspect: Handle cciss devices in /etc/fstabMatthew Booth2011-10-191-0/+32
|
* inspect: Add drive naming hintsMatthew Booth2011-10-191-4/+32
| | | | | | | | | | | We currently use a heuristic to guess how drive names we find referenced in the guest map to drive names in the appliance. If this heuristic fails it can cause inspection to fail. This change adds a new 'name' option to add_drive_opts, which allows the user to explicitly pass the name of a drive to libguestfs if it is known. This change also updates the fstab-parsing inspection code to use this information if it is available.
* launch: Store drive information in guestfs_hMatthew Booth2011-10-192-3/+3
| | | | | | | | | | | | | | | | | | This is a NFC on its own, but provides a place-holder for drive metadata which can be used after launch. Fixes by RWMJ: - Fix the tests: this requires a new internal function 'debug-drives' that dumps out the g->drives information so it can be checked in two of the tests. Previously these tests used 'debug-cmdline'. - Test file existence / use_cache_off in the add_drive_opts function, not when launching qemu in the child process. - Call free along error paths. - Add comments.
* Remove old regression test that mainly tested a buggy API.Richard W.M. Jones2011-09-012-44/+0
| | | | | | The guestfs_ll command currently lists files in the appliance if you prefix filenames with "/..". However this is a bug, not a feature, and we should not be testing it.
* protocol: Fix case where download can fail for small files.Richard W.M. Jones2011-08-181-6/+20
| | | | | | | | | | | | | There is another case where downloads of small files could fail if the library side (writer) fails. In this case the library would send back a cancellation, but it would be received after the daemon had finished sending the whole file (because the file is small enough). The daemon would reenter the main loop and immediately get an unexpected cancel message, causing the daemon to die. This commit also makes test-cancellation-download-librarycancels.sh more robust. We use Monte-Carlo testing with a range of file sizes. Small file sizes should trigger the error case.
* build: Set TMPDIR for local testing.Richard W.M. Jones2011-08-081-0/+1
| | | | | | This avoids conflicts with the globally installed libguestfs appliance, or lets us build in multiple local directories at the same time without conflicts.
* fish: Fix regression tests for new guestfish line numbers.Richard W.M. Jones2011-08-051-1/+1
| | | | This updates commit 319e946b92e175c05cdd1fdcb85c9b86f5631011.
* Add regression test to catch missing libraries in the appliance.Richard W.M. Jones2011-08-021-0/+49
| | | | Related to RHBZ#727178.
* Fix test-guestfish-escapes regression test to work with debug/trace enabled.Richard W.M. Jones2011-07-151-2/+7
| | | | | | | | If debugging or tracing is enabled, extra messages are sent to stderr which mess with this test. Remove the extra messages before checking stderr. This updates commit 617e7f6bafa7de2303c08e1715004aae3141c389.
* fish: Handle backslash escapes in guestfish double-quoted strings.Richard W.M. Jones2011-07-142-0/+79
|
* part-get-bootable: Fix when partitions are missing or unordered (RHBZ#602997).Richard W.M. Jones2011-07-122-0/+72
|
* New API: list-dm-devices (RHBZ#688062).Richard W.M. Jones2011-07-122-0/+112
| | | | List device mapper devices.
* mkfs: Force mke2fs to create a filesystem even on raw IDE device (RHBZ#690819).Richard W.M. Jones2011-03-252-1/+39
| | | | Notes: Labels: bugfix, RHBZ#690819
* proto: Fix both-ends-cancel case.Richard W.M. Jones2011-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where both ends cancel at the same time (eg. both ends realize there are errors before or during the transfer), previously we skipped sending back an error from the daemon, on the spurious basis that the library would not need it (the library is cancelling because of its own error). However this is wrong: we should always send back an error message from the daemon in order to preserve synchronization of the protocol. A simple test case is: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory libguestfs: error: unexpected procedure number (66/282) (Notice two things: there are errors at both ends, and the loss of synchronization). After applying this commit, the loss of synchronization does not occur and we just see the library error: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory The choice of displaying the library or the daemon error is fairly arbitrary in this case -- it would be valid to display either or even to combine them into one error. Displaying the library error only makes the code considerably simpler. This commit also (re-)enables a test for this case.
* proto: Fix FileIn ops that abort during the chunk upload stage.Richard W.M. Jones2011-03-184-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a previous, incorrect attempt to fix RHBZ#576879 we tried to prevent the daemon from sending an error reply if the daemon had cancelled the transfer. This is wrong: the daemon should send an error reply in these cases. A simple test case is this: guestfish -N fs -m /dev/sda1 upload big-file / (This fails because the target "/" is a directory, not a file.) Prior to this commit, libguestfs would hang instead of printing an error. With this commit, libguestfs prints an error. What is happening is: (1) Library is uploading a file (2) In the middle of the long upload, daemon detects an error. Daemon cancels. (3) Library detects cancel, sends cancel chunk, then waits for the error reply from the daemon. (4) Daemon is supposed to send an error reply message. Because step (4) wasn't happening, uploads that failed like this would hang in the library (waiting for the error message, while the daemon was waiting for the next request). This also adds a regression test. This temporarily breaks the "both ends cancel" case (RHBZ#576879c5). Therefore the test for that is disabled, and this is fixed in the next patch in the series. This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63.
* regressions: Enable both tests for bug 576879 (not fixed).Richard W.M. Jones2011-03-181-2/+2
|
* regressions: Rename the file we are uploading too.Richard W.M. Jones2011-03-171-1/+1
| | | | This updates commit cbd8da6d4dd2e4cbc3b87fbc7cb7d6129eb69172.
* regressions: Split the test rhbz576879.sh into two halves.Richard W.M. Jones2011-03-173-20/+36
| | | | | | | We suspect that there are in fact two separate bugs. In any case it makes sense for the two tests to be done separately. Note that these tests still fail.
* regressions: Fix rhbz557655.sh so it works with tracing enabled.Richard W.M. Jones2011-02-031-0/+1
|
* Fix test-guestfish-a.sh regression test for new trace format.Richard W.M. Jones2011-01-281-5/+5
| | | | This fixes commit 1d999540bddd7aea7c2d0fef8b15223d4acc645f.
* fish: Don't fail if some mountpoints in /etc/fstab are bogus (RHBZ#668574).Richard W.M. Jones2011-01-112-0/+71
| | | | | | | | | | | | | | | | | Fix guestfish (and other C tools) so that they ignore errors when /etc/fstab contains bogus entries. Update the documentation for inspect-get-mountpoints to emphasize that callers must be aware of this when mounting the returned values. Add a regression test. Update the example code ("inspect_vm") to reflect the way this API ought to be called. For more detail see: https://bugzilla.redhat.com/show_bug.cgi?id=668574
* fish: fails to tilde expand '~' when $HOME env is unset (RHBZ#617440).Richard W.M. Jones2011-01-042-0/+71
| | | | This also adds a regression test.
* ubuntu: Allow test-luks.sh to be bypassed to workaround Ubuntu bug.Richard W.M. Jones2010-12-071-0/+5
| | | | This is necessary because of too old cryptsetup on Ubuntu.
* regressions: Disable test for 576879.Richard W.M. Jones2010-12-062-6/+10
| | | | | This test has worked only intermittently for a while. Disable it. The upstream bug has been reopened.
* regressions: Fix test-launch-race to work in non-supermin case.Richard W.M. Jones2010-11-241-2/+6
|
* Generate a dummy 'Fedora' fedora.img in images directory for use by tests.Richard W.M. Jones2010-11-111-12/+16
| | | | | | | | We were generating this dummy 'Fedora' image already in the tools directory. It contains just enough Fedora-like files to fool our inspection code and thus to test the tools. This is general enough that we can use it everywhere.
* fish: Use core add-domain API to implement '-d' option.Richard Jones2010-11-111-6/+6
| | | | | | This also makes libxml2 and libvirt into optional dependencies. If they are missing then the core API will print an error, as will the '-d' option to guestfish.
* New API: add-domainRichard Jones2010-11-112-0/+80
| | | | | | | | | | | | | | | | | | | This new API allows you to add the disks from a libvirt domain. In guestfish you can use the 'domain' command to access the API, eg: ><fs> domain Fedora14 libvirturi:qemu:///system 1 The returned number is the number of disks that were added. Also here is a proposed (but commented out) low-level API which would allow you to add a domain from a virDomainPtr. However there are several problems with this API -- see discussion on the list: https://www.redhat.com/archives/libguestfs/2010-November/thread.html#00028
* Ensure atomic creation of a cached applianceMatthew Booth2010-10-282-0/+61
| | | | | | | | | | | | | | | | | | | | Cached appliances are discovered by their predictable path. Previously we were creating a cached appliance directly in this predictable path. This had at least 2 undesirable effects: * Interrupting appliance creation would leave a corrupt appliance * 2 processes could simultaneously attempt to create the same appliance, causing corruption. This patch causes the cached appliance to be created in a temporary directory, and then renamed to the predictable path. As rename is an atomic operation, this makes the whole creation atomic. This patch also changes the predictable path to have a prefix of 'guestfs.'. This will make it simpler for system administrators to clean up old cached appliances. This patch resolves RHBZ#639405
* Disable test for RHBZ#576879 comment 5.Richard W.M. Jones2010-10-271-0/+5
| | | | This test has started to hang, for reasons we don't understand.
* fish: Specify format of disks (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-222-9/+39
| | | | | | | | For libvirt guests, the disk format is copied from libvirt (if libvirt knows it). For command line disk images, you can use --format to override format auto-detection.
* generator: Optional arguments, add-drive-opts (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-222-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large commit changes the generator so that optional arguments can be supported for functions. The model for arguments (known as the "style") is changed from (ret, args) to (ret, args, optargs) where optargs is a more limited list of arguments. One function has been added which takes optional arguments, it is "add-drive-opts", modelled as: (RErr, [String "filename"], #required [Bool "readonly"; String "format"; String "iface"]) #optional Note that this function is processed in the library (does not go over the RPC protocol to the daemon). This has allowed us to simplify the current implementation by omitting changes related to RPC or the daemon, although we plan to add these at some point in the future. From C this function can be called in 3 different ways as in these examples: guestfs_add_drive_opts (g, filename, GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -1); (the argument(s) between 'filename' and '-1' are the optional ones). guestfs_add_drive_opts_va (g, filename, args); where 'args' is a va_list. This works like the first version. struct guestfs_add_drive_opts_argv optargs = { .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK, .readonly = 1, } guestfs_add_drive_opts_argv (g, filename, &optargs); This last form lets you construct lists of optional arguments, and is used by guestfish and the language bindings. In guestfish optional arguments are used like this: add-drive-opts filename readonly:true In OCaml these are mapped naturally to OCaml optional arguments, eg: g#add_drive_opts ~readonly:true filename; In Perl these are mapped to extra arguments, eg: $g->add_drive_opts ($filename, readonly => 1); In Python these are mapped to optional arguments, eg: g.add_drive_opts ("file", readonly = 1, format = "qcow2") In Ruby these are mapped to a final hash argument, eg: g.add_drive_opts("file", {}) g.add_drive_opts("file", :readonly => 1) g.add_drive_opts("file", :readonly => 1, :iface => "virtio") In PHP these are mapped to extra parameters. This is not quite accurate since you cannot omit arbitrary optional parameters, but there's not much than can be done within the limitations of PHP as a language. Unimplemented in: Haskell, C#, Java.
* test-copy: Skip this test if /dev/fd is missing, because of broken mock 1.1.4.Richard W.M. Jones2010-10-021-0/+8
|
* regressions: Test just-built guestfish.Richard W.M. Jones2010-09-222-2/+3
| | | | | | Instead of testing the installed /usr/bin/guestfish. This fixes commit ddda0f7bd00a37274dae38f4ce93955b8cfdf7d7.
* Test guestfish -a and guestfish -d options.Richard W.M. Jones2010-09-223-0/+82
| | | | | Since these options were both broken in released version 1.5.17, best to have a regression test to catch this in future.
* syntax: Replace -a and -o with && and || for portability.Richard Jones2010-09-111-6/+7
|
* syntax: Use exit (EXIT_SUCCESS) instead of hard-coded number.Richard Jones2010-09-101-1/+1
|