similar to: [PATCH] tests/c-api: cache available features

Displaying 20 results from an estimated 800 matches similar to: "[PATCH] tests/c-api: cache available features"

2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
Refactor the internal_feature_available to return the result for just one group, so it is easier to know on the library side what was the actual error, and which group refers to; drop internal_available, as no more needed after this. On the library side, implement in available and feature_available the real logic to iterate through the requested group, and error out or return whether the groups
2015 Nov 04
0
Re: [PATCH] tests/c-api: cache available features
On Wed, Nov 04, 2015 at 06:42:13PM +0100, Pino Toscano wrote: > Build a list of all the features used in action tests, and lazily read > them as needed. This reduces the number of guestfs_feature_available > calls for a full run from 117 to 18. ACK. But even better if you turned guestfs_feature_available into a non_daemon_function, added a new guestfs_internal_feature_available
2016 Jan 27
2
[PATCH 1/2] generator: add TestRunOrUnsupported test type
Create a new TestRunOrUnsupported test type, which represents a test sequence where a failure with ENOTSUP in the last command only marks the test as skipped. To be used mainly when testing features available only with some versions of helper tools used in the appliance, for example. --- generator/tests_c_api.ml | 26 ++++++++++++++++++++++++-- generator/types.ml | 5 +++++
2014 Mar 21
2
[PATCH] listfs: If LDM not available, don't inhibit partition detection (RHBZ#1079182).
If a disk has type 0x42 partition (which would indicate LDM), but LDM is not available then try parsing the partition anyway. It might be parseable as plain old NTFS. --- src/listfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/listfs.c b/src/listfs.c index bbdb0a2..ffb0adc 100644 --- a/src/listfs.c +++ b/src/listfs.c @@ -47,8 +47,11 @@
2016 Nov 08
0
[PATCH 2/3] Split internal stuff out of guestfs.h
Create a new guestfs-private.h header, and move there the definitions of all the actions with visibility VInternal, and all the private structs: they are not meant to be used, not even seen, outside of the library. Include the new header where needed, which means also a couple of places outside the library (but they are tests, so it is acceptable for now). The result of this is mostly motion of
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
If you have a struct containing ?field?, eg: type t = { field : int } then previously to pattern-match on this type, eg. in function parameters, you had to write: let f { field = field } = (* ... use field ... *) In OCaml >= 3.12 it is possible to abbreviate cases where the field being matched and the variable being bound have the same name, so now you can just write: let f {
2014 Feb 11
2
[PATCH] list-filesystems: Do not segfault if guestfs_btrfs_subvolume_list returns an error (RHBZ#1064008).
If calling guestfs_list_filesystems with a disk image containing a corrupt btrfs volume, the library would segfault. There was a missing check for a NULL return from guestfs_btrfs_subvolume_list. This adds a check, returning the real error up through the stack and out of guestfs_list_filesystems. This is potentially a denial of service if processing disk images from untrusted sources, but is
2013 Dec 23
2
[PATCH] tests/mountable: skip if btrfs is not available
This test uses btrfs, so skip it if the "btrfs" feature is not available. --- tests/mountable/test-internal-parse-mountable.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/mountable/test-internal-parse-mountable.c b/tests/mountable/test-internal-parse-mountable.c index ed3264e..bf03743 100644 --- a/tests/mountable/test-internal-parse-mountable.c +++
2016 Feb 23
0
[PATCH 1/4] generator: Add interfaces to all modules.
Be explicit about what is exported from each module in the generator. --- generator/Makefile.am | 26 +++++++++++++++++++++++++- generator/bindtests.mli | 30 ++++++++++++++++++++++++++++++ generator/c.mli | 41 +++++++++++++++++++++++++++++++++++++++++ generator/checks.mli | 18 ++++++++++++++++++ generator/csharp.mli | 19 +++++++++++++++++++ generator/customize.mli
2013 Dec 23
1
[PATCH] tests/mountable: skip if btrfs is not available
This test uses btrfs, so skip it if either the "btrfs" feature or the btrfs filesystem is not available. --- tests/mountable/test-internal-parse-mountable.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/mountable/test-internal-parse-mountable.c b/tests/mountable/test-internal-parse-mountable.c index ed3264e..0638fc0 100644 ---
2017 Jun 19
0
[PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
These won't be used by the daemon, so interferes with us using common/utils in the daemon, so they are moved to a different library. --- .gitignore | 8 +++--- Makefile.am | 4 ++- align/Makefile.am | 2 ++ align/scan.c | 1 + cat/Makefile.am | 10 ++++++++
2017 Jun 15
0
[PATCH v6 11/41] utils: Rename ‘guestfs-internal-frontend.h’ to ‘utils.h’.
--- .gitignore | 2 +- builder/index-validate.c | 2 +- builder/pxzcat-c.c | 2 +- common/edit/file-edit.c | 2 +- common/mlutils/c_utils-c.c | 2 +- common/options/options.h | 2 +- common/options/uri.c
2015 Nov 06
2
Re: [PATCH 2/2] actions: refactor available & feature_available
On Thu, Nov 05, 2015 at 04:56:43PM +0100, Pino Toscano wrote: > Refactor the internal_feature_available to return the result for just > one group, so it is easier to know on the library side what was the > actual error, and which group refers to; drop internal_available, as no > more needed after this. > > On the library side, implement in available and feature_available the
2017 Jun 19
0
[PATCH v7 12/13] utils: Rename ‘guestfs-internal-frontend.h’ to ‘guestfs-utils.h’.
The reason it's not just ‘utils.h’ is because Pino is worried that we might pick up /usr/include/utils.h from a rogue library. --- .gitignore | 2 +- builder/index-validate.c | 2 +- builder/pxzcat-c.c | 2 +- common/edit/file-edit.c
2016 Dec 08
3
[PATCH 1/2] Remove most instances of OCaml warning 52.
See: http://caml.inria.fr/pub/docs/manual-ocaml/comp.html#s:comp-warnings --- builder/index_parser.ml | 8 ++++---- generator/tests_c_api.ml | 4 ++-- mllib/common_utils.ml | 2 +- v2v/inspect_source.ml | 2 +- v2v/linux.ml | 2 +- v2v/xpath_helpers.ml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/builder/index_parser.ml b/builder/index_parser.ml
2012 Dec 14
1
[PATCH] Add support for getting and setting GPT partition type GUIDs
New APIs: part_set_gpt_type part_get_gpt_type --- appliance/packagelist.in | 1 + daemon/parted.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 30 +++++++++++ generator/tests_c_api.ml | 7 +++ generator/types.ml | 5 ++ src/MAX_PROC_NR | 2 +- 6 files changed, 173 insertions(+), 1 deletion(-) diff --git
2014 Oct 22
0
[PATCH] tests: c-api: add $datadir and $databuilddir
Modify "tests" to expand any kind of environment variable than just $srcdir; use $datadir and $databuilddir to point to the files in $srcdir/tests/data and $builddir/tests/data, so it is easier to point at the data for the tests. Most of the work (except the $databuilddir and the integration in the Makefile.am) has been done as part of larger changes by Richard W.M. Jones
2015 Dec 01
3
[PATCHv2] New API: part_expand_gpt.
This action moves second(backup) GPT header to the end of the disk. It is usable in in-place image expanding, since free space after second GPT header is unusable. To use additional space, we have to move second header. This is what sgdisk -e does. However, sgdisk -e may perform additional actions if the partition table has unexpected params (e.g. if we call sgdisk -e /dev/sda1, it may fix
2014 Feb 12
0
Re: [PATCH] list-filesystems: Do not segfault if guestfs_btrfs_subvolume_list returns an error (RHBZ#1064008).
On Tuesday 11 February 2014 20:16:56 Richard W.M. Jones wrote: > If calling guestfs_list_filesystems with a disk image containing a > corrupt btrfs volume, the library would segfault. There was a missing > check for a NULL return from guestfs_btrfs_subvolume_list. > > This adds a check, returning the real error up through the stack and > out of guestfs_list_filesystems. >