This resizes (expands or shrinks) an existing LVM physical
volume to match the new size of the underlying device.");
- ("sfdisk_N", (RErr, [String "device"; Int "n";
+ ("sfdisk_N", (RErr, [String "device"; Int "partnum";
Int "cyls"; Int "heads"; Int "sectors";
String "line"]), 99, [DangerWillRobinson],
[],
See also: L<mkdtemp(3)>");
+ ("wc_l", (RInt "lines", [String "path"]), 118, [],
+ [InitBasicFS, Always, TestOutputInt (
+ [["mount_vfs"; "ro"; "squashfs"; "/dev/sdd"; "/"];
+ ["wc_l"; "/10klines"]], 10000)],
+ "count lines in a file",
+ "\
+This command counts the lines in a file, using the
+C<wc -l> external command.");
+
+ ("wc_w", (RInt "words", [String "path"]), 119, [],
+ [InitBasicFS, Always, TestOutputInt (
+ [["mount_vfs"; "ro"; "squashfs"; "/dev/sdd"; "/"];
+ ["wc_w"; "/10klines"]], 10000)],
+ "count words in a file",
+ "\
+This command counts the words in a file, using the
+C<wc -w> external command.");
+
+ ("wc_c", (RInt "chars", [String "path"]), 120, [],
+ [InitBasicFS, Always, TestOutputInt (
+ [["mount_vfs"; "ro"; "squashfs"; "/dev/sdd"; "/"];
+ ["wc_c"; "/100kallspaces"]], 102400)],
+ "count characters in a file",
+ "\
+This command counts the characters in a file, using the
+C<wc -c> external command.");
+
]
let all_functions = non_daemon_functions @ daemon_functions
failwithf "%s has a param/ret called 'value', which causes conflicts in the OCaml bindings, use something like 'val' or a more descriptive name" name;
if n = "int" || n = "char" || n = "short" || n = "long" then
failwithf "%s has a param/ret which conflicts with a C type (eg. 'int', 'char' etc.)" name;
- if n = "i" then
- failwithf "%s has a param/ret called 'i', which will cause some conflicts in the generated code" name;
+ if n = "i" || n = "n" then
+ failwithf "%s has a param/ret called 'i' or 'n', which will cause some conflicts in the generated code" name;
if n = "argv" || n = "args" then
failwithf "%s has a param/ret called 'argv' or 'args', which will cause some conflicts in the generated code" name
in
{
const char *str;
+ str = getenv (\"TEST_ONLY\");
+ if (str)
+ return strstr (str, \"%s\") == NULL;
str = getenv (\"SKIP_%s\");
if (str && strcmp (str, \"1\") == 0) return 1;
str = getenv (\"SKIP_TEST_%s\");
return 0;
}
-" test_name (String.uppercase test_name) (String.uppercase name);
+" test_name name (String.uppercase test_name) (String.uppercase name);
(match prereq with
| Disabled | Always -> ()
static int %s (void)
{
if (%s_skip ()) {
- printf (\"%%s skipped (reason: SKIP_TEST_* variable set)\\n\", \"%s\");
+ printf (\"%%s skipped (reason: environment variable set)\\n\", \"%s\");
return 0;
}