search for: generate_test_command_call

Displaying 20 results from an estimated 31 matches for "generate_test_command_call".

2016 Jan 27
2
[PATCH 1/2] generator: add TestRunOrUnsupported test type
...#include <sys/types.h> #include <sys/stat.h> +#include <errno.h> #include \"guestfs.h\" #include \"guestfs-internal-frontend.h\" @@ -335,6 +336,23 @@ and generate_test_perform name i test_name test = let seq, last = get_seq_last seq in List.iter (generate_test_command_call test_name) seq; generate_test_command_call test_name ~expect_error:true last + + | TestRunOrUnsupported seq -> + pr " /* TestRunOrUnsupported for %s (%d) */\n" name i; + let seq, last = get_seq_last seq in + List.iter (generate_test_command_call test_name) seq; + gen...
2009 Aug 17
1
two more warning-avoidance patches
...rator.ml @@ -5274,7 +5274,7 @@ static void print_error (guestfs_h *g, void *data, const char *msg) } /* FIXME: nearly identical code appears in fish.c */ -static void print_strings (char const *const *argv) +static void print_strings (char *const *argv) { int argc; @@ -5869,7 +5869,7 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = fun i str -> pr " const char *%s_%d = \"%s\";\n" n i (c_quote str); ) strs; - pr " const char *%s[] = {\n" n; + pr " const char *const %s[]...
2012 Dec 14
1
[PATCH] Add support for getting and setting GPT partition type GUIDs
...y name i test_name init test = ["umount_all"]; ["lvm_remove_all"]; ["part_disk"; "/dev/sda"; "mbr"]] + | InitGPT -> + pr " /* InitGPT for %s: create /dev/sda1 */\n" test_name; + List.iter (generate_test_command_call test_name) + [["blockdev_setrw"; "/dev/sda"]; + ["umount_all"]; + ["lvm_remove_all"]; + ["part_disk"; "/dev/sda"; "gpt"]] | InitBasicFS -> pr " /* InitBasicFS for %s: create...
2011 Nov 10
5
[PATCH v2] Add tune2fs command.
The changes since the previous patch: - safe ADD_ARG macro for adding arguments to a fixed size stack array - support for testing functions that return RHashtable, ie. tune2fs-l. - add tests that set (tune2fs) and get (tune2fs-l) various parameters. - only one 'intervalbetweenchecks' parameter (in seconds) Rich.
2011 Nov 09
6
[PATCH] Add tune2fs support to libguestfs.
At the moment OpenStack uses kpartx and nbd to resize filesystems and inject files to guests. I sincerely hope they don't allow untrusted users to upload guest images / AMIs :-( To fix this I'm looking into adding libguestfs support as an optional backend in OpenStack. The only missing feature in libguestfs is the ability to call tune2fs on a filesystem. This patch series adds tune2fs
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...r as the same thing. Really we should + * make InitNone do nothing at all, but the tests may + * need to be checked to make sure this is OK. + *) | InitEmpty -> pr " /* InitNone|InitEmpty for %s */\n" test_name; List.iter (generate_test_command_call test_name) - [["blockdev_setrw"; "/dev/sda"]; - ["umount_all"]; - ["lvm_remove_all"]] + [["blockdev_setrw"; "/dev/sda"]; + ["umount_all"]; + ["lvm_remove_all"]] | InitBasicFS ->...
2016 Dec 08
3
[PATCH 1/2] Remove most instances of OCaml warning 52.
...ot parse 'hidden' field for '%s'\n") prog n; corrupt_file () in diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 8b98927..4a70433 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -557,13 +557,13 @@ and generate_test_command_call ?(expect_error = false) ?(do_return = true) ?test | Int _, arg, _ -> let i = try int_of_string arg - with Failure "int_of_string" -> + with Failure _ -> failwithf "%s: expecting an int, but got '%s'" test_name arg in...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2014 Oct 22
0
[PATCH] tests: c-api: add $datadir and $databuilddir
...; ["is_file"; "/hivex_commit2_copy"; "false"]]), [["hivex_close"]] diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 88aa07e..86bf08e 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -385,17 +385,16 @@ and generate_test_command_call ?(expect_error = false) ?test ?ret test_name cmd= | String _, arg, sym | OptString _, arg, sym | Key _, arg, sym - | GUID _, arg, sym -> - pr " const char *%s = \"%s\";\n" sym (c_quote arg); + | GUID _, arg, sym + | FileIn _, arg, sym -> +...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...ringList n | DeviceList n | RelativePathnameList n -> pr " free (%s);\n" n ) args; diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 1522eff..c5af42f 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -419,7 +419,8 @@ and generate_test_command_call ?(expect_error = false) ?test ?ret test_name cmd= | DeviceList _, "", sym -> pr " const char *const %s[1] = { NULL };\n" sym | StringList _, arg, sym - | DeviceList _, arg, sym -> + | DeviceList _, arg, sym + | RelativePathnameList _, arg, sym -&...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...| StringList n | DeviceList n | FilenameList n -> pr " free (%s);\n" n ) args; diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 1522eff..6be753f 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -419,7 +419,8 @@ and generate_test_command_call ?(expect_error = false) ?test ?ret test_name cmd= | DeviceList _, "", sym -> pr " const char *const %s[1] = { NULL };\n" sym | StringList _, arg, sym - | DeviceList _, arg, sym -> + | DeviceList _, arg, sym + | FilenameList _, arg, sym ->...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...t return 0; } -" test_name name (String.uppercase test_name) (String.uppercase name); +" test_name name + (String.uppercase_ascii test_name) + (String.uppercase_ascii name); if not_disabled then ( generate_test_perform name i test_name test; @@ -441,7 +444,7 @@ and generate_test_command_call ?(expect_error = false) ?(do_return = true) ?test | StringList _, arg, sym | DeviceList _, arg, sym | FilenameList _, arg, sym -> - let strs = string_split " " arg in + let strs = String.nsplit " " arg in iteri ( fun i str ->...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...g _ | Bool _ | Int _ | Int64 _ | BufferIn _ | Pointer _ -> () | StringList n | DeviceList n -> diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index e97e4ef..9cc047c 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -793,6 +793,7 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = | OptString n, "NULL" -> () | Pathname n, arg | Device n, arg + | Mountable n, arg | Dev_or_Path n, arg | String n, arg | OptString n, arg @@ -902,7 +903,7 @@ and generate_test_co...
2014 Oct 05
0
[PATCH v5 2/7] tests/c-api: Convert the C API tests to use the test harness.
...t;; + "test-pwd"; + ]; + }; + "inspector", { defaults with check = [ diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 88aa07e..86bf08e 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -385,17 +385,16 @@ and generate_test_command_call ?(expect_error = false) ?test ?ret test_name cmd= | String _, arg, sym | OptString _, arg, sym | Key _, arg, sym - | GUID _, arg, sym -> - pr " const char *%s = \"%s\";\n" sym (c_quote arg); + | GUID _, arg, sym + | FileIn _, arg, sym -> +...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2015 Aug 06
0
[PATCH v4 02/17] tests/c-api: Convert the C API tests to use the test harness.
...t;; + "test-pwd"; + ]; + }; + "inspector", { defaults with check = [ diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 1522eff..5062ce1 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -403,17 +403,16 @@ and generate_test_command_call ?(expect_error = false) ?test ?ret test_name cmd= | String _, arg, sym | OptString _, arg, sym | Key _, arg, sym - | GUID _, arg, sym -> - pr " const char *%s = \"%s\";\n" sym (c_quote arg); + | GUID _, arg, sym + | FileIn _, arg, sym -> +...
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.