diff --git a/generator/actions.ml b/generator/actions.ml index 43a72f45a..7d6fddd5e 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -25,7 +25,8 @@ open Utils * this struct by writing '{ defaults with name = &c }' *) let defaults = { name = ""; style = RErr, [], []; proc_nr = None; - tests = []; shortdesc = ""; longdesc = ""; + tests = []; test_excuse = ""; + shortdesc = ""; longdesc = ""; protocol_limit_warning = false; fish_alias = []; fish_output = None; visibility = VPublic; deprecated_by = None; optional = None; @@ -311,7 +312,7 @@ the qemu binary at the same time as the handle is created." }; blocking = false; tests = [ InitNone, Always, TestRun ( - [["get_qemu"]]) + [["get_qemu"]]), [] ]; shortdesc = "get the qemu binary"; longdesc = "\ @@ -340,7 +341,7 @@ Setting C to C restores the default path." }; blocking = false; tests = [ InitNone, Always, TestRun ( - [["get_path"]]) + [["get_path"]]), [] ]; shortdesc = "get the search path"; longdesc = "\ @@ -373,7 +374,6 @@ are passed (libguestfs always adds a few of its own)." }; * function can return NULL in normal operations, which the * test framework interprets as an error. *) - tests = []; shortdesc = "get the additional kernel options"; longdesc = "\ Return the additional kernel options which are added to the @@ -402,7 +402,7 @@ disabled by default)." }; blocking = false; tests = [ InitNone, Always, TestResultTrue ( - [["get_autosync"]]) + [["get_autosync"]]), [] ]; shortdesc = "get autosync mode"; longdesc = "\ @@ -439,7 +439,7 @@ This returns the verbose messages flag." }; blocking = false; tests = [ InitNone, Always, TestResultTrue ( - [["is_ready"]]) + [["is_ready"]]), [] ]; shortdesc = "is ready to accept commands"; longdesc = "\ @@ -454,7 +454,7 @@ For more information on states, see L." }; blocking = false; tests = [ InitNone, Always, TestResultFalse ( - [["is_config"]]) + [["is_config"]]), [] ]; shortdesc = "is in configuration state"; longdesc = "\ @@ -470,7 +470,7 @@ For more information on states, see L." }; blocking = false; tests = [ InitNone, Always, TestResultFalse ( - [["is_launching"]]) + [["is_launching"]]), [] ]; shortdesc = "is launching subprocess"; longdesc = "\ @@ -486,7 +486,7 @@ For more information on states, see L." }; blocking = false; tests = [ InitNone, Always, TestResultFalse ( - [["is_busy"]]) + [["is_busy"]]), [] ]; shortdesc = "is busy processing a command"; longdesc = "\ @@ -531,7 +531,7 @@ see L." }; blocking = false; tests = [ InitNone, Always, TestResult ( - [["get_memsize"]], "ret >= 256") + [["get_memsize"]], "ret >= 256"), [] ]; shortdesc = "get memory allocated to the qemu subprocess"; longdesc = "\ @@ -550,7 +550,6 @@ see L." }; style = RInt "pid", [], []; fish_alias = ["pid"]; blocking = false; - tests = []; shortdesc = "get PID of qemu subprocess"; longdesc = "\ Return the process ID of the qemu subprocess. If there is no @@ -564,7 +563,7 @@ This is an internal call used for debugging and testing." }; blocking = false; tests = [ InitNone, Always, TestResult ( - [["version"]], "ret->major == 1") + [["version"]], "ret->major == 1"), [] ]; shortdesc = "get the library version number"; longdesc = "\ @@ -635,7 +634,7 @@ see L." }; tests = [ InitNone, Always, TestResultFalse ( [["set_trace"; "false"]; - ["get_trace"]]) + ["get_trace"]]), [] ]; shortdesc = "enable or disable command traces"; longdesc = "\ @@ -743,29 +742,29 @@ to specify the QEMU interface emulation to use at run time." }; style = RString "arch", [Pathname "filename"], []; tests = [ InitISOFS, Always, TestResultString ( - [["file_architecture"; "/bin-i586-dynamic"]], "i386"); + [["file_architecture"; "/bin-i586-dynamic"]], "i386"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/bin-sparc-dynamic"]], "sparc"); + [["file_architecture"; "/bin-sparc-dynamic"]], "sparc"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/bin-win32.exe"]], "i386"); + [["file_architecture"; "/bin-win32.exe"]], "i386"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/bin-win64.exe"]], "x86_64"); + [["file_architecture"; "/bin-win64.exe"]], "x86_64"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/bin-x86_64-dynamic"]], "x86_64"); + [["file_architecture"; "/bin-x86_64-dynamic"]], "x86_64"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/lib-i586.so"]], "i386"); + [["file_architecture"; "/lib-i586.so"]], "i386"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/lib-sparc.so"]], "sparc"); + [["file_architecture"; "/lib-sparc.so"]], "sparc"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/lib-win32.dll"]], "i386"); + [["file_architecture"; "/lib-win32.dll"]], "i386"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/lib-win64.dll"]], "x86_64"); + [["file_architecture"; "/lib-win64.dll"]], "x86_64"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/lib-x86_64.so"]], "x86_64"); + [["file_architecture"; "/lib-x86_64.so"]], "x86_64"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/initrd-x86_64.img"]], "x86_64"); + [["file_architecture"; "/initrd-x86_64.img"]], "x86_64"), []; InitISOFS, Always, TestResultString ( - [["file_architecture"; "/initrd-x86_64.img.gz"]], "x86_64"); + [["file_architecture"; "/initrd-x86_64.img.gz"]], "x86_64"), []; ]; shortdesc = "detect the architecture of a binary file"; longdesc = "\ @@ -1953,7 +1952,7 @@ See L." }; deprecated_by = Some "get_backend"; tests = [ InitNone, Always, TestRun ( - [["get_attach_method"]]) + [["get_attach_method"]]), [] ]; shortdesc = "get the backend"; longdesc = "\ @@ -1981,7 +1980,7 @@ See L." }; blocking = false; tests = [ InitNone, Always, TestRun ( - [["get_backend"]]) + [["get_backend"]]), [] ]; shortdesc = "get the backend"; longdesc = "\ @@ -2234,7 +2233,7 @@ See L for full documentation." }; { defaults with name = "umount_local"; style = RErr, [], [OBool "retry"]; - tests = [] (* tests in fuse subdirectory *); + test_excuse = "tests in fuse subdirectory"; shortdesc = "unmount a locally mounted filesystem"; longdesc = "\ If libguestfs is exporting the filesystem on a local @@ -2312,7 +2311,7 @@ but note that any errors are ignored in that case." }; style = RString "content", [Pathname "path"], []; tests = [ InitISOFS, Always, TestResultString ( - [["cat"; "/known-2"]], "abcdef\n") + [["cat"; "/known-2"]], "abcdef\n"), [] ]; shortdesc = "list the contents of a file"; longdesc = "\ @@ -2329,18 +2328,18 @@ or C functions." }; tests = [ InitBasicFS, Always, TestResult ( [["find"; "/"]], - "is_string_list (ret, 1, \"lost+found\")"); + "is_string_list (ret, 1, \"lost+found\")"), []; InitBasicFS, Always, TestResult ( [["touch"; "/a"]; ["mkdir"; "/b"]; ["touch"; "/b/c"]; ["find"; "/"]], - "is_string_list (ret, 4, \"a\", \"b\", \"b/c\", \"lost+found\")"); + "is_string_list (ret, 4, \"a\", \"b\", \"b/c\", \"lost+found\")"), []; InitScratchFS, Always, TestResult ( [["mkdir_p"; "/find/b/c"]; ["touch"; "/find/b/c/d"]; ["find"; "/find/b/"]], - "is_string_list (ret, 2, \"c\", \"c/d\")") + "is_string_list (ret, 2, \"c\", \"c/d\")"), [] ]; shortdesc = "find all files and directories"; longdesc = "\ @@ -2375,7 +2374,7 @@ The returned list is sorted." }; tests = [ InitISOFS, Always, TestResult ( [["read_file"; "/known-4"]], - "compare_buffers (ret, size, \"abc\\ndef\\nghi\", 11) == 0") + "compare_buffers (ret, size, \"abc\\ndef\\nghi\", 11) == 0"), [] ]; shortdesc = "read a file"; longdesc = "\ @@ -2391,42 +2390,42 @@ handle files that contain embedded ASCII NUL characters." }; tests = [ InitISOFS, Always, TestResult ( [["read_lines"; "/known-4"]], - "is_string_list (ret, 3, \"abc\", \"def\", \"ghi\")"); + "is_string_list (ret, 3, \"abc\", \"def\", \"ghi\")"), []; InitISOFS, Always, TestResult ( [["read_lines"; "/empty"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines1"; "\n"]; ["read_lines"; "/read_lines1"]], - "is_string_list (ret, 1, \"\")"); + "is_string_list (ret, 1, \"\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines2"; "\r\n"]; ["read_lines"; "/read_lines2"]], - "is_string_list (ret, 1, \"\")"); + "is_string_list (ret, 1, \"\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines3"; "\n\r\n"]; ["read_lines"; "/read_lines3"]], - "is_string_list (ret, 2, \"\", \"\")"); + "is_string_list (ret, 2, \"\", \"\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines4"; "a"]; ["read_lines"; "/read_lines4"]], - "is_string_list (ret, 1, \"a\")"); + "is_string_list (ret, 1, \"a\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines5"; "a\nb"]; ["read_lines"; "/read_lines5"]], - "is_string_list (ret, 2, \"a\", \"b\")"); + "is_string_list (ret, 2, \"a\", \"b\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines6"; "a\nb\n"]; ["read_lines"; "/read_lines6"]], - "is_string_list (ret, 2, \"a\", \"b\")"); + "is_string_list (ret, 2, \"a\", \"b\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines7"; "a\nb\r\n"]; ["read_lines"; "/read_lines7"]], - "is_string_list (ret, 2, \"a\", \"b\")"); + "is_string_list (ret, 2, \"a\", \"b\")"), []; InitScratchFS, Always, TestResult ( [["write"; "/read_lines8"; "a\nb\r\n\n"]; ["read_lines"; "/read_lines8"]], - "is_string_list (ret, 3, \"a\", \"b\", \"\")"); + "is_string_list (ret, 3, \"a\", \"b\", \"\")"), []; ]; shortdesc = "read file as lines"; longdesc = "\ @@ -2446,22 +2445,22 @@ function and split the buffer into lines yourself." }; tests = [ InitScratchFS, Always, TestResultString ( [["write"; "/write"; "new file contents"]; - ["cat"; "/write"]], "new file contents"); + ["cat"; "/write"]], "new file contents"), []; InitScratchFS, Always, TestResultString ( [["write"; "/write2"; "\nnew file contents\n"]; - ["cat"; "/write2"]], "\nnew file contents\n"); + ["cat"; "/write2"]], "\nnew file contents\n"), []; InitScratchFS, Always, TestResultString ( [["write"; "/write3"; "\n\n"]; - ["cat"; "/write3"]], "\n\n"); + ["cat"; "/write3"]], "\n\n"), []; InitScratchFS, Always, TestResultString ( [["write"; "/write4"; ""]; - ["cat"; "/write4"]], ""); + ["cat"; "/write4"]], ""), []; InitScratchFS, Always, TestResultString ( [["write"; "/write5"; "\n\n\n"]; - ["cat"; "/write5"]], "\n\n\n"); + ["cat"; "/write5"]], "\n\n\n"), []; InitScratchFS, Always, TestResultString ( [["write"; "/write6"; "\n"]; - ["cat"; "/write6"]], "\n") + ["cat"; "/write6"]], "\n"), [] ]; shortdesc = "create a new file"; longdesc = "\ @@ -2479,7 +2478,7 @@ See also C." }; ["write_append"; "/write_append"; "line2\n"]; ["write_append"; "/write_append"; "line3a"]; ["write_append"; "/write_append"; "line3b\n"]; - ["cat"; "/write_append"]], "line1\nline2\nline3aline3b\n") + ["cat"; "/write_append"]], "line1\nline2\nline3aline3b\n"), [] ]; shortdesc = "append content to end of file"; longdesc = "\ @@ -2565,7 +2564,7 @@ list a directory contents without making many round-trips." }; ["touch"; "/ls/newer"]; ["touch"; "/ls/newest"]; ["ls"; "/ls"]], - "is_string_list (ret, 3, \"new\", \"newer\", \"newest\")") + "is_string_list (ret, 3, \"new\", \"newer\", \"newest\")"), [] ]; shortdesc = "list the files in a directory"; longdesc = "\ @@ -2594,11 +2593,11 @@ data." }; style = RString "format", [String "filename"], []; tests = [ InitEmpty, Always, TestResultString ( - [["disk_format"; "GETKEY:test1"]], "raw"); + [["disk_format"; "GETKEY:test1"]], "raw"), []; InitEmpty, Always, TestResultString ( - [["disk_format"; "GETKEY:test2"]], "raw"); + [["disk_format"; "GETKEY:test2"]], "raw"), []; InitEmpty, Always, TestResultString ( - [["disk_format"; "GETKEY:test3"]], "raw"); + [["disk_format"; "GETKEY:test3"]], "raw"), []; ]; shortdesc = "detect the disk format of a disk image"; longdesc = "\ @@ -2616,11 +2615,11 @@ See also: L" }; style = RInt64 "size", [String "filename"], []; tests = [ InitEmpty, Always, TestResult ( - [["disk_virtual_size"; "GETKEY:test1"]], "ret == UINT64_C (524288000)"); + [["disk_virtual_size"; "GETKEY:test1"]], "ret == UINT64_C (524288000)"), []; InitEmpty, Always, TestResult ( - [["disk_virtual_size"; "GETKEY:test2"]], "ret == UINT64_C (52428800)"); + [["disk_virtual_size"; "GETKEY:test2"]], "ret == UINT64_C (52428800)"), []; InitEmpty, Always, TestResult ( - [["disk_virtual_size"; "GETKEY:test3"]], "ret == UINT64_C (10485760)"); + [["disk_virtual_size"; "GETKEY:test3"]], "ret == UINT64_C (10485760)"), []; ]; shortdesc = "return virtual size of a disk"; longdesc = "\ @@ -2635,11 +2634,11 @@ circumstances. See L." }; style = RBool "backingfile", [String "filename"], []; tests = [ InitEmpty, Always, TestResultFalse ( - [["disk_has_backing_file"; "GETKEY:test1"]]); + [["disk_has_backing_file"; "GETKEY:test1"]]), []; InitEmpty, Always, TestResultFalse ( - [["disk_has_backing_file"; "GETKEY:test2"]]); + [["disk_has_backing_file"; "GETKEY:test2"]]), []; InitEmpty, Always, TestResultFalse ( - [["disk_has_backing_file"; "GETKEY:test3"]]); + [["disk_has_backing_file"; "GETKEY:test3"]]), []; ]; shortdesc = "return whether disk has a backing file"; longdesc = "\ @@ -2653,7 +2652,6 @@ circumstances. See L." }; name = "remove_drive"; style = RErr, [String "label"], []; blocking = false; - tests = []; shortdesc = "remove a disk image"; longdesc = "\ This function is conceptually the opposite of C. @@ -2673,7 +2671,6 @@ disk is in use and stop you from doing this." }; name = "set_libvirt_supported_credentials"; style = RErr, [StringList "creds"], []; blocking = false; - tests = []; shortdesc = "set libvirt credentials supported by calling program"; longdesc = "\ Call this function before setting an event handler for @@ -2713,7 +2710,6 @@ See L for documentation and example code." }; name = "get_libvirt_requested_credentials"; style = RStringList "creds", [], []; blocking = false; - tests = []; shortdesc = "get list of credentials requested by libvirt"; longdesc = "\ This should only be called during the event callback @@ -2729,7 +2725,6 @@ See L for documentation and example code." }; name = "get_libvirt_requested_credential_prompt"; style = RString "prompt", [Int "index"], []; blocking = false; - tests = []; shortdesc = "prompt of i'th requested credential"; longdesc = "\ Get the prompt (provided by libvirt) for the C'th @@ -2742,7 +2737,6 @@ See L for documentation and example code." }; name = "get_libvirt_requested_credential_challenge"; style = RString "challenge", [Int "index"], []; blocking = false; - tests = []; shortdesc = "challenge of i'th requested credential"; longdesc = "\ Get the challenge (provided by libvirt) for the C'th @@ -2755,7 +2749,6 @@ See L for documentation and example code." }; name = "get_libvirt_requested_credential_defresult"; style = RString "defresult", [Int "index"], []; blocking = false; - tests = []; shortdesc = "default result of i'th requested credential"; longdesc = "\ Get the default result (provided by libvirt) for the C'th @@ -2768,7 +2761,6 @@ See L for documentation and example code." }; name = "set_libvirt_requested_credential"; style = RErr, [Int "index"; BufferIn "cred"], []; blocking = false; - tests = []; shortdesc = "pass requested credential back to libvirt"; longdesc = "\ After requesting the C'th credential from the user, @@ -2780,7 +2772,6 @@ See L for documentation and example code." }; name = "parse_environment"; style = RErr, [], []; blocking = false; - tests = []; shortdesc = "parse the environment and set handle flags accordingly"; longdesc = "\ Parse the program's environment and set flags in the handle @@ -2799,7 +2790,6 @@ C." }; name = "parse_environment_list"; style = RErr, [StringList "environment"], []; blocking = false; - tests = []; shortdesc = "parse the environment and set handle flags accordingly"; longdesc = "\ Parse the list of strings in the argument C @@ -2934,7 +2924,7 @@ it is set to the empty string (but never C)." }; blocking = false; tests = [ InitNone, Always, TestRun ( - [["get_program"]]) + [["get_program"]]), [] ]; shortdesc = "get the program name"; longdesc = "\ @@ -2957,7 +2947,7 @@ let daemon_functions = [ ["mkfs"; "ext2"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["mount"; "/dev/sda1"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents") + ["cat"; "/new"]], "new file contents"), [] ]; shortdesc = "mount a guest disk at a position in the filesystem"; longdesc = "\ @@ -2988,7 +2978,7 @@ first parameter if you don't want any options)." }; style = RErr, [], []; proc_nr = Some 2; tests = [ - InitEmpty, Always, TestRun [["sync"]] + InitEmpty, Always, TestRun [["sync"]], [] ]; shortdesc = "sync disks, writes are flushed through to the disk image"; longdesc = "\ @@ -3005,7 +2995,7 @@ closing the handle." }; tests = [ InitScratchFS, Always, TestResultTrue ( [["touch"; "/touch"]; - ["exists"; "/touch"]]) + ["exists"; "/touch"]]), [] ]; shortdesc = "update file timestamps or create a new file"; longdesc = "\ @@ -3020,9 +3010,7 @@ file types such as directories, symbolic links, block special etc." }; name = "ll"; style = RString "listing", [Pathname "directory"], []; proc_nr = Some 5; - tests = []; (* XXX Tricky to test because it depends on the exact format - * of the 'ls -l' command, which changes between F10 and F11. - *) + test_excuse = "tricky to test because it depends on the exact format of the 'ls -l' command, which changed between Fedora 10 and Fedora 11"; shortdesc = "list the files in a directory (long format)"; longdesc = "\ List the files in C (relative to the root directory, @@ -3038,7 +3026,7 @@ is I intended that you try to parse the output string." }; tests = [ InitEmpty, Always, TestResult ( [["list_devices"]], - "is_device_list (ret, 4, \"/dev/sda\", \"/dev/sdb\", \"/dev/sdc\", \"/dev/sdd\")") + "is_device_list (ret, 4, \"/dev/sda\", \"/dev/sdb\", \"/dev/sdc\", \"/dev/sdd\")"), [] ]; shortdesc = "list the block devices"; longdesc = "\ @@ -3055,14 +3043,14 @@ See also C." }; tests = [ InitBasicFS, Always, TestResult ( [["list_partitions"]], - "is_device_list (ret, 2, \"/dev/sda1\", \"/dev/sdb1\")"); + "is_device_list (ret, 2, \"/dev/sda1\", \"/dev/sdb1\")"), []; InitEmpty, Always, TestResult ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["list_partitions"]], - "is_device_list (ret, 4, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\", \"/dev/sdb1\")") + "is_device_list (ret, 4, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\", \"/dev/sdb1\")"), [] ]; shortdesc = "list the partitions"; longdesc = "\ @@ -3082,7 +3070,7 @@ See also C." }; optional = Some "lvm2"; tests = [ InitBasicFSonLVM, Always, TestResult ( - [["pvs"]], "is_device_list (ret, 1, \"/dev/sda1\")"); + [["pvs"]], "is_device_list (ret, 1, \"/dev/sda1\")"), []; InitEmpty, Always, TestResult ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; @@ -3092,7 +3080,7 @@ See also C." }; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; ["pvs"]], - "is_device_list (ret, 3, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\")") + "is_device_list (ret, 3, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\")"), [] ]; shortdesc = "list the LVM physical volumes (PVs)"; longdesc = "\ @@ -3111,7 +3099,7 @@ See also C." }; optional = Some "lvm2"; tests = [ InitBasicFSonLVM, Always, TestResult ( - [["vgs"]], "is_string_list (ret, 1, \"VG\")"); + [["vgs"]], "is_string_list (ret, 1, \"VG\")"), []; InitEmpty, Always, TestResult ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; @@ -3123,7 +3111,7 @@ See also C." }; ["vgcreate"; "VG1"; "/dev/sda1 /dev/sda2"]; ["vgcreate"; "VG2"; "/dev/sda3"]; ["vgs"]], - "is_string_list (ret, 2, \"VG1\", \"VG2\")") + "is_string_list (ret, 2, \"VG1\", \"VG2\")"), [] ]; shortdesc = "list the LVM volume groups (VGs)"; longdesc = "\ @@ -3143,7 +3131,7 @@ See also C." }; tests = [ InitBasicFSonLVM, Always, TestResult ( [["lvs"]], - "is_string_list (ret, 1, \"/dev/VG/LV\")"); + "is_string_list (ret, 1, \"/dev/VG/LV\")"), []; InitEmpty, Always, TestResult ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; @@ -3158,7 +3146,7 @@ See also C." }; ["lvcreate"; "LV2"; "VG1"; "50"]; ["lvcreate"; "LV3"; "VG2"; "50"]; ["lvs"]], - "is_string_list (ret, 3, \"/dev/VG1/LV1\", \"/dev/VG1/LV2\", \"/dev/VG2/LV3\")") + "is_string_list (ret, 3, \"/dev/VG1/LV1\", \"/dev/VG1/LV2\", \"/dev/VG2/LV3\")"), [] ]; shortdesc = "list the LVM logical volumes (LVs)"; longdesc = "\ @@ -3210,8 +3198,7 @@ of the L command. The \"full\" version includes all fields." }; [["mkdir"; "/etc"]; ["write"; "/etc/hostname"; "hostname-test.example.org"]; ["aug_init"; "/"; "0"]; - ["aug_get"; "/files/etc/hostname/hostname"]; - ["aug_close"]]) + ["aug_get"; "/files/etc/hostname/hostname"]]), [["aug_close"]] ]; shortdesc = "create a new Augeas handle"; longdesc = "\ @@ -3424,12 +3411,12 @@ C and sorting the resulting nodes into alphabetical order." }; InitScratchFS, Always, TestRun [["mkdir"; "/rm"]; ["touch"; "/rm/new"]; - ["rm"; "/rm/new"]]; + ["rm"; "/rm/new"]], []; InitScratchFS, Always, TestLastFail - [["rm"; "/nosuchfile"]]; + [["rm"; "/nosuchfile"]], []; InitScratchFS, Always, TestLastFail [["mkdir"; "/rm2"]; - ["rm"; "/rm2"]] + ["rm"; "/rm2"]], [] ]; shortdesc = "remove a file"; longdesc = "\ @@ -3442,13 +3429,13 @@ Remove the single file C." }; tests = [ InitScratchFS, Always, TestRun [["mkdir"; "/rmdir"]; - ["rmdir"; "/rmdir"]]; + ["rmdir"; "/rmdir"]], []; InitScratchFS, Always, TestLastFail - [["rmdir"; "/rmdir2"]]; + [["rmdir"; "/rmdir2"]], []; InitScratchFS, Always, TestLastFail [["mkdir"; "/rmdir3"]; ["touch"; "/rmdir3/new"]; - ["rmdir"; "/rmdir3/new"]] + ["rmdir"; "/rmdir3/new"]], [] ]; shortdesc = "remove a directory"; longdesc = "\ @@ -3464,7 +3451,7 @@ Remove the single directory C." }; ["mkdir"; "/rm_rf/foo"]; ["touch"; "/rm_rf/foo/bar"]; ["rm_rf"; "/rm_rf"]; - ["exists"; "/rm_rf"]] + ["exists"; "/rm_rf"]], [] ]; shortdesc = "remove a file or directory recursively"; longdesc = "\ @@ -3479,9 +3466,9 @@ command." }; tests = [ InitScratchFS, Always, TestResultTrue [["mkdir"; "/mkdir"]; - ["is_dir"; "/mkdir"; ""]]; + ["is_dir"; "/mkdir"; ""]], []; InitScratchFS, Always, TestLastFail - [["mkdir"; "/mkdir2/foo/bar"]] + [["mkdir"; "/mkdir2/foo/bar"]], [] ]; shortdesc = "create a directory"; longdesc = "\ @@ -3494,20 +3481,20 @@ Create a directory named C." }; tests = [ InitScratchFS, Always, TestResultTrue [["mkdir_p"; "/mkdir_p/foo/bar"]; - ["is_dir"; "/mkdir_p/foo/bar"; ""]]; + ["is_dir"; "/mkdir_p/foo/bar"; ""]], []; InitScratchFS, Always, TestResultTrue [["mkdir_p"; "/mkdir_p2/foo/bar"]; - ["is_dir"; "/mkdir_p2/foo"; ""]]; + ["is_dir"; "/mkdir_p2/foo"; ""]], []; InitScratchFS, Always, TestResultTrue [["mkdir_p"; "/mkdir_p3/foo/bar"]; - ["is_dir"; "/mkdir_p3"; ""]]; + ["is_dir"; "/mkdir_p3"; ""]], []; (* Regression tests for RHBZ#503133: *) InitScratchFS, Always, TestRun [["mkdir"; "/mkdir_p4"]; - ["mkdir_p"; "/mkdir_p4"]]; + ["mkdir_p"; "/mkdir_p4"]], []; InitScratchFS, Always, TestLastFail [["touch"; "/mkdir_p5"]; - ["mkdir_p"; "/mkdir_p5"]] + ["mkdir_p"; "/mkdir_p5"]], [] ]; shortdesc = "create a directory and parents"; longdesc = "\ @@ -3518,7 +3505,6 @@ as necessary. This is like the C shell command." }; name = "chmod"; style = RErr, [Int "mode"; Pathname "path"], []; proc_nr = Some 34; - tests = [] (* XXX Need stat command to test *); shortdesc = "change file mode"; longdesc = "\ Change the mode (permissions) of C to C. Only @@ -3534,7 +3520,6 @@ The mode actually set is affected by the umask." }; name = "chown"; style = RErr, [Int "owner"; Int "group"; Pathname "path"], []; proc_nr = Some 35; - tests = [] (* XXX Need stat command to test *); shortdesc = "change file owner and group"; longdesc = "\ Change the file owner to C and group to C. @@ -3549,9 +3534,9 @@ yourself (Augeas support makes this relatively easy)." }; proc_nr = Some 36; tests = [ InitISOFS, Always, TestResultTrue ( - [["exists"; "/empty"]]); + [["exists"; "/empty"]]), []; InitISOFS, Always, TestResultTrue ( - [["exists"; "/directory"]]) + [["exists"; "/directory"]]), [] ]; shortdesc = "test if file or directory exists"; longdesc = "\ @@ -3567,11 +3552,11 @@ See also C, C, C." }; once_had_no_optargs = true; tests = [ InitISOFS, Always, TestResultTrue ( - [["is_file"; "/known-1"; ""]]); + [["is_file"; "/known-1"; ""]]), []; InitISOFS, Always, TestResultFalse ( - [["is_file"; "/directory"; ""]]); + [["is_file"; "/directory"; ""]]), []; InitISOFS, Always, TestResultTrue ( - [["is_file"; "/abssymlink"; "true"]]) + [["is_file"; "/abssymlink"; "true"]]), [] ]; shortdesc = "test if a regular file"; longdesc = "\ @@ -3592,9 +3577,9 @@ See also C." }; once_had_no_optargs = true; tests = [ InitISOFS, Always, TestResultFalse ( - [["is_dir"; "/known-3"; ""]]); + [["is_dir"; "/known-3"; ""]]), []; InitISOFS, Always, TestResultTrue ( - [["is_dir"; "/directory"; ""]]) + [["is_dir"; "/directory"; ""]]), [] ]; shortdesc = "test if a directory"; longdesc = "\ @@ -3623,7 +3608,7 @@ See also C." }; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; ["pvs"]], - "is_device_list (ret, 3, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\")") + "is_device_list (ret, 3, \"/dev/sda1\", \"/dev/sda2\", \"/dev/sda3\")"), [] ]; shortdesc = "create an LVM physical volume"; longdesc = "\ @@ -3648,7 +3633,7 @@ as C." }; ["vgcreate"; "VG1"; "/dev/sda1 /dev/sda2"]; ["vgcreate"; "VG2"; "/dev/sda3"]; ["vgs"]], - "is_string_list (ret, 2, \"VG1\", \"VG2\")") + "is_string_list (ret, 2, \"VG1\", \"VG2\")"), [] ]; shortdesc = "create an LVM volume group"; longdesc = "\ @@ -3677,7 +3662,7 @@ from the non-empty list of physical volumes C." }; ["lvcreate"; "LV4"; "VG2"; "50"]; ["lvcreate"; "LV5"; "VG2"; "50"]; ["lvs"]], - "is_string_list (ret, 5, \"/dev/VG1/LV1\", \"/dev/VG1/LV2\", \"/dev/VG2/LV3\", \"/dev/VG2/LV4\", \"/dev/VG2/LV5\")") + "is_string_list (ret, 5, \"/dev/VG1/LV1\", \"/dev/VG1/LV2\", \"/dev/VG2/LV3\", \"/dev/VG2/LV4\", \"/dev/VG2/LV5\")"), [] ]; shortdesc = "create an LVM logical volume"; longdesc = "\ @@ -3724,7 +3709,7 @@ C" }; (* Regression test for RHBZ#597135. *) tests = [ InitScratchFS, Always, TestLastFail - [["write_file"; "/write_file"; "abc"; "10000"]] + [["write_file"; "/write_file"; "abc"; "10000"]], [] ]; shortdesc = "create a file"; longdesc = "\ @@ -3750,13 +3735,13 @@ characters does I work, even if the length is specified." }; [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ext2"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["mount"; "/dev/sda1"; "/"]; - ["mounts"]], "is_device_list (ret, 1, \"/dev/sda1\")"); + ["mounts"]], "is_device_list (ret, 1, \"/dev/sda1\")"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ext2"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["mount"; "/dev/sda1"; "/"]; ["umount"; "/"; "false"; "false"]; - ["mounts"]], "is_string_list (ret, 0)") + ["mounts"]], "is_string_list (ret, 0)"), [] ]; shortdesc = "unmount a filesystem"; longdesc = "\ @@ -3770,7 +3755,7 @@ contains the filesystem." }; proc_nr = Some 46; tests = [ InitScratchFS, Always, TestResult ( - [["mounts"]], "is_device_list (ret, 1, \"/dev/sdb1\")") + [["mounts"]], "is_device_list (ret, 1, \"/dev/sdb1\")"), [] ]; shortdesc = "show mounted filesystems"; longdesc = "\ @@ -3789,7 +3774,7 @@ See also: C" }; tests = [ InitScratchFS, Always, TestResult ( [["umount_all"]; - ["mounts"]], "is_string_list (ret, 0)"); + ["mounts"]], "is_string_list (ret, 0)"), []; (* check that umount_all can unmount nested mounts correctly: *) InitEmpty, Always, TestResult ( [["part_init"; "/dev/sda"; "mbr"]; @@ -3806,7 +3791,7 @@ See also: C" }; ["mount"; "/dev/sda3"; "/mp1/mp2"]; ["mkdir"; "/mp1/mp2/mp3"]; ["umount_all"]; - ["mounts"]], "is_string_list (ret, 0)") + ["mounts"]], "is_string_list (ret, 0)"), [] ]; shortdesc = "unmount all filesystems"; longdesc = "\ @@ -3830,15 +3815,15 @@ and physical volumes." }; proc_nr = Some 49; tests = [ InitISOFS, Always, TestResultString ( - [["file"; "/empty"]], "empty"); + [["file"; "/empty"]], "empty"), []; InitISOFS, Always, TestResultString ( - [["file"; "/known-1"]], "ASCII text"); + [["file"; "/known-1"]], "ASCII text"), []; InitISOFS, Always, TestLastFail ( - [["file"; "/notexists"]]); + [["file"; "/notexists"]]), []; InitISOFS, Always, TestResultString ( - [["file"; "/abssymlink"]], "symbolic link"); + [["file"; "/abssymlink"]], "symbolic link"), []; InitISOFS, Always, TestResultString ( - [["file"; "/directory"]], "directory") + [["file"; "/directory"]], "directory"), [] ]; shortdesc = "determine file type"; longdesc = "\ @@ -3869,67 +3854,67 @@ C, C (etc), C." }; [["mkdir"; "/command"]; ["upload"; "test-command"; "/command/test-command"]; ["chmod"; "0o755"; "/command/test-command"]; - ["command"; "/command/test-command 1"]], "Result1"); + ["command"; "/command/test-command 1"]], "Result1"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command2"]; ["upload"; "test-command"; "/command2/test-command"]; ["chmod"; "0o755"; "/command2/test-command"]; - ["command"; "/command2/test-command 2"]], "Result2\n"); + ["command"; "/command2/test-command 2"]], "Result2\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command3"]; ["upload"; "test-command"; "/command3/test-command"]; ["chmod"; "0o755"; "/command3/test-command"]; - ["command"; "/command3/test-command 3"]], "\nResult3"); + ["command"; "/command3/test-command 3"]], "\nResult3"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command4"]; ["upload"; "test-command"; "/command4/test-command"]; ["chmod"; "0o755"; "/command4/test-command"]; - ["command"; "/command4/test-command 4"]], "\nResult4\n"); + ["command"; "/command4/test-command 4"]], "\nResult4\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command5"]; ["upload"; "test-command"; "/command5/test-command"]; ["chmod"; "0o755"; "/command5/test-command"]; - ["command"; "/command5/test-command 5"]], "\nResult5\n\n"); + ["command"; "/command5/test-command 5"]], "\nResult5\n\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command6"]; ["upload"; "test-command"; "/command6/test-command"]; ["chmod"; "0o755"; "/command6/test-command"]; - ["command"; "/command6/test-command 6"]], "\n\nResult6\n\n"); + ["command"; "/command6/test-command 6"]], "\n\nResult6\n\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command7"]; ["upload"; "test-command"; "/command7/test-command"]; ["chmod"; "0o755"; "/command7/test-command"]; - ["command"; "/command7/test-command 7"]], ""); + ["command"; "/command7/test-command 7"]], ""), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command8"]; ["upload"; "test-command"; "/command8/test-command"]; ["chmod"; "0o755"; "/command8/test-command"]; - ["command"; "/command8/test-command 8"]], "\n"); + ["command"; "/command8/test-command 8"]], "\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command9"]; ["upload"; "test-command"; "/command9/test-command"]; ["chmod"; "0o755"; "/command9/test-command"]; - ["command"; "/command9/test-command 9"]], "\n\n"); + ["command"; "/command9/test-command 9"]], "\n\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command10"]; ["upload"; "test-command"; "/command10/test-command"]; ["chmod"; "0o755"; "/command10/test-command"]; - ["command"; "/command10/test-command 10"]], "Result10-1\nResult10-2\n"); + ["command"; "/command10/test-command 10"]], "Result10-1\nResult10-2\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command11"]; ["upload"; "test-command"; "/command11/test-command"]; ["chmod"; "0o755"; "/command11/test-command"]; - ["command"; "/command11/test-command 11"]], "Result11-1\nResult11-2"); + ["command"; "/command11/test-command 11"]], "Result11-1\nResult11-2"), []; InitScratchFS, Always, TestLastFail ( [["mkdir"; "/command12"]; ["upload"; "test-command"; "/command12/test-command"]; ["chmod"; "0o755"; "/command12/test-command"]; - ["command"; "/command12/test-command"]]); + ["command"; "/command12/test-command"]]), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/pwd"]; ["upload"; "test-pwd"; "/pwd/test-pwd"]; ["chmod"; "0o755"; "/pwd/test-pwd"]; - ["command"; "/pwd/test-pwd"]], "/"); + ["command"; "/pwd/test-pwd"]], "/"), []; ]; shortdesc = "run a command from the guest filesystem"; longdesc = "\ @@ -3974,67 +3959,67 @@ locations." }; ["upload"; "test-command"; "/command_lines/test-command"]; ["chmod"; "0o755"; "/command_lines/test-command"]; ["command_lines"; "/command_lines/test-command 1"]], - "is_string_list (ret, 1, \"Result1\")"); + "is_string_list (ret, 1, \"Result1\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines2"]; ["upload"; "test-command"; "/command_lines2/test-command"]; ["chmod"; "0o755"; "/command_lines2/test-command"]; ["command_lines"; "/command_lines2/test-command 2"]], - "is_string_list (ret, 1, \"Result2\")"); + "is_string_list (ret, 1, \"Result2\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines3"]; ["upload"; "test-command"; "/command_lines3/test-command"]; ["chmod"; "0o755"; "/command_lines3/test-command"]; ["command_lines"; "/command_lines3/test-command 3"]], - "is_string_list (ret, 2, \"\", \"Result3\")"); + "is_string_list (ret, 2, \"\", \"Result3\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines4"]; ["upload"; "test-command"; "/command_lines4/test-command"]; ["chmod"; "0o755"; "/command_lines4/test-command"]; ["command_lines"; "/command_lines4/test-command 4"]], - "is_string_list (ret, 2, \"\", \"Result4\")"); + "is_string_list (ret, 2, \"\", \"Result4\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines5"]; ["upload"; "test-command"; "/command_lines5/test-command"]; ["chmod"; "0o755"; "/command_lines5/test-command"]; ["command_lines"; "/command_lines5/test-command 5"]], - "is_string_list (ret, 3, \"\", \"Result5\", \"\")"); + "is_string_list (ret, 3, \"\", \"Result5\", \"\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines6"]; ["upload"; "test-command"; "/command_lines6/test-command"]; ["chmod"; "0o755"; "/command_lines6/test-command"]; ["command_lines"; "/command_lines6/test-command 6"]], - "is_string_list (ret, 4, \"\", \"\", \"Result6\", \"\")"); + "is_string_list (ret, 4, \"\", \"\", \"Result6\", \"\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines7"]; ["upload"; "test-command"; "/command_lines7/test-command"]; ["chmod"; "0o755"; "/command_lines7/test-command"]; ["command_lines"; "/command_lines7/test-command 7"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines8"]; ["upload"; "test-command"; "/command_lines8/test-command"]; ["chmod"; "0o755"; "/command_lines8/test-command"]; ["command_lines"; "/command_lines8/test-command 8"]], - "is_string_list (ret, 1, \"\")"); + "is_string_list (ret, 1, \"\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines9"]; ["upload"; "test-command"; "/command_lines9/test-command"]; ["chmod"; "0o755"; "/command_lines9/test-command"]; ["command_lines"; "/command_lines9/test-command 9"]], - "is_string_list (ret, 2, \"\", \"\")"); + "is_string_list (ret, 2, \"\", \"\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines10"]; ["upload"; "test-command"; "/command_lines10/test-command"]; ["chmod"; "0o755"; "/command_lines10/test-command"]; ["command_lines"; "/command_lines10/test-command 10"]], - "is_string_list (ret, 2, \"Result10-1\", \"Result10-2\")"); + "is_string_list (ret, 2, \"Result10-1\", \"Result10-2\")"), []; InitScratchFS, Always, TestResult ( [["mkdir"; "/command_lines11"]; ["upload"; "test-command"; "/command_lines11/test-command"]; ["chmod"; "0o755"; "/command_lines11/test-command"]; ["command_lines"; "/command_lines11/test-command 11"]], - "is_string_list (ret, 2, \"Result11-1\", \"Result11-2\")") + "is_string_list (ret, 2, \"Result11-1\", \"Result11-2\")"), [] ]; shortdesc = "run a command, returning lines"; longdesc = "\ @@ -4049,7 +4034,7 @@ See also: C" }; proc_nr = Some 52; tests = [ InitISOFS, Always, TestResult ( - [["stat"; "/empty"]], "ret->size == 0") + [["stat"; "/empty"]], "ret->size == 0"), [] ]; shortdesc = "get file information"; longdesc = "\ @@ -4063,7 +4048,7 @@ This is the same as the C system call." }; proc_nr = Some 53; tests = [ InitISOFS, Always, TestResult ( - [["lstat"; "/empty"]], "ret->size == 0") + [["lstat"; "/empty"]], "ret->size == 0"), [] ]; shortdesc = "get file information for a symbolic link"; longdesc = "\ @@ -4081,7 +4066,7 @@ This is the same as the C system call." }; proc_nr = Some 54; tests = [ InitISOFS, Always, TestResult ( - [["statvfs"; "/"]], "ret->namemax == 255") + [["statvfs"; "/"]], "ret->namemax == 255"), [] ]; shortdesc = "get file system statistics"; longdesc = "\ @@ -4099,7 +4084,7 @@ This is the same as the C system call." }; InitScratchFS, Always, TestResult ( [["tune2fs_l"; "/dev/sdb1"]], "check_hash (ret, \"Filesystem magic number\", \"0xEF53\") == 0 && "^ - "check_hash (ret, \"Filesystem OS type\", \"Linux\") == 0"); + "check_hash (ret, \"Filesystem OS type\", \"Linux\") == 0"), []; ]; shortdesc = "get ext2/ext3/ext4 superblock details"; longdesc = "\ @@ -4118,7 +4103,7 @@ that libguestfs was built against, and the filesystem itself." }; tests = [ InitEmpty, Always, TestResultTrue ( [["blockdev_setro"; "/dev/sda"]; - ["blockdev_getro"; "/dev/sda"]]) + ["blockdev_getro"; "/dev/sda"]]), [] ]; shortdesc = "set block device to read-only"; longdesc = "\ @@ -4133,7 +4118,7 @@ This uses the L command." }; tests = [ InitEmpty, Always, TestResultFalse ( [["blockdev_setrw"; "/dev/sda"]; - ["blockdev_getro"; "/dev/sda"]]) + ["blockdev_getro"; "/dev/sda"]]), [] ]; shortdesc = "set block device to read-write"; longdesc = "\ @@ -4148,7 +4133,7 @@ This uses the L command." }; tests = [ InitEmpty, Always, TestResultTrue ( [["blockdev_setro"; "/dev/sda"]; - ["blockdev_getro"; "/dev/sda"]]) + ["blockdev_getro"; "/dev/sda"]]), [] ]; shortdesc = "is block device set to read-only"; longdesc = "\ @@ -4163,7 +4148,7 @@ This uses the L command." }; proc_nr = Some 59; tests = [ InitEmpty, Always, TestResult ( - [["blockdev_getss"; "/dev/sda"]], "ret == 512") + [["blockdev_getss"; "/dev/sda"]], "ret == 512"), [] ]; shortdesc = "get sectorsize of block device"; longdesc = "\ @@ -4179,8 +4164,7 @@ This uses the L command." }; name = "blockdev_getbsz"; style = RInt "blocksize", [Device "device"], []; proc_nr = Some 60; - (* cannot be tested because output differs depending on page size *) - tests = []; + test_excuse = "cannot be tested because output differs depending on page size"; shortdesc = "get blocksize of block device"; longdesc = "\ This returns the block size of a device. @@ -4209,7 +4193,7 @@ This uses the L command." }; proc_nr = Some 62; tests = [ InitEmpty, Always, TestResult ( - [["blockdev_getsz"; "/dev/sda"]], "ret == 1024000") + [["blockdev_getsz"; "/dev/sda"]], "ret == 1024000"), [] ]; shortdesc = "get total size of device in 512-byte sectors"; longdesc = "\ @@ -4228,7 +4212,7 @@ This uses the L command." }; proc_nr = Some 63; tests = [ InitEmpty, Always, TestResult ( - [["blockdev_getsize64"; "/dev/sda"]], "ret == UINT64_C (524288000)") + [["blockdev_getsize64"; "/dev/sda"]], "ret == UINT64_C (524288000)"), [] ]; shortdesc = "get total size of device in bytes"; longdesc = "\ @@ -4244,7 +4228,7 @@ This uses the L command." }; proc_nr = Some 64; tests = [ InitEmpty, Always, TestRun - [["blockdev_flushbufs"; "/dev/sda"]] + [["blockdev_flushbufs"; "/dev/sda"]], [] ]; shortdesc = "flush device buffers"; longdesc = "\ @@ -4259,7 +4243,7 @@ This uses the L command." }; proc_nr = Some 65; tests = [ InitEmpty, Always, TestRun - [["blockdev_rereadpt"; "/dev/sda"]] + [["blockdev_rereadpt"; "/dev/sda"]], [] ]; shortdesc = "reread partition table"; longdesc = "\ @@ -4278,7 +4262,7 @@ This uses the L command." }; [["mkdir"; "/upload"]; ["upload"; "$srcdir/../../COPYING.LIB"; "/upload/COPYING.LIB"]; ["checksum"; "md5"; "/upload/COPYING.LIB"]], - Digest.to_hex (Digest.file "COPYING.LIB")) + Digest.to_hex (Digest.file "COPYING.LIB")), [] ]; shortdesc = "upload a file from the local machine"; longdesc = "\ @@ -4302,7 +4286,7 @@ See also C." }; ["download"; "/download/COPYING.LIB"; "testdownload.tmp"]; ["upload"; "testdownload.tmp"; "/download/upload"]; ["checksum"; "md5"; "/download/upload"]], - Digest.to_hex (Digest.file "COPYING.LIB")) + Digest.to_hex (Digest.file "COPYING.LIB")), [] ]; shortdesc = "download a file to the local machine"; longdesc = "\ @@ -4319,24 +4303,24 @@ See also C, C." }; proc_nr = Some 68; tests = [ InitISOFS, Always, TestResultString ( - [["checksum"; "crc"; "/known-3"]], "2891671662"); + [["checksum"; "crc"; "/known-3"]], "2891671662"), []; InitISOFS, Always, TestLastFail ( - [["checksum"; "crc"; "/notexists"]]); + [["checksum"; "crc"; "/notexists"]]), []; InitISOFS, Always, TestResultString ( - [["checksum"; "md5"; "/known-3"]], "46d6ca27ee07cdc6fa99c2e138cc522c"); + [["checksum"; "md5"; "/known-3"]], "46d6ca27ee07cdc6fa99c2e138cc522c"), []; InitISOFS, Always, TestResultString ( - [["checksum"; "sha1"; "/known-3"]], "b7ebccc3ee418311091c3eda0a45b83c0a770f15"); + [["checksum"; "sha1"; "/known-3"]], "b7ebccc3ee418311091c3eda0a45b83c0a770f15"), []; InitISOFS, Always, TestResultString ( - [["checksum"; "sha224"; "/known-3"]], "d2cd1774b28f3659c14116be0a6dc2bb5c4b350ce9cd5defac707741"); + [["checksum"; "sha224"; "/known-3"]], "d2cd1774b28f3659c14116be0a6dc2bb5c4b350ce9cd5defac707741"), []; InitISOFS, Always, TestResultString ( - [["checksum"; "sha256"; "/known-3"]], "75bb71b90cd20cb13f86d2bea8dad63ac7194e7517c3b52b8d06ff52d3487d30"); + [["checksum"; "sha256"; "/known-3"]], "75bb71b90cd20cb13f86d2bea8dad63ac7194e7517c3b52b8d06ff52d3487d30"), []; InitISOFS, Always, TestResultString ( - [["checksum"; "sha384"; "/known-3"]], "5fa7883430f357b5d7b7271d3a1d2872b51d73cba72731de6863d3dea55f30646af2799bef44d5ea776a5ec7941ac640"); + [["checksum"; "sha384"; "/known-3"]], "5fa7883430f357b5d7b7271d3a1d2872b51d73cba72731de6863d3dea55f30646af2799bef44d5ea776a5ec7941ac640"), []; InitISOFS, Always, TestResultString ( - [["checksum"; "sha512"; "/known-3"]], "2794062c328c6b216dca90443b7f7134c5f40e56bd0ed7853123275a09982a6f992e6ca682f9d2fba34a4c5e870d8fe077694ff831e3032a004ee077e00603f6"); + [["checksum"; "sha512"; "/known-3"]], "2794062c328c6b216dca90443b7f7134c5f40e56bd0ed7853123275a09982a6f992e6ca682f9d2fba34a4c5e870d8fe077694ff831e3032a004ee077e00603f6"), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestResultString ( - [["checksum"; "sha512"; "/abssymlink"]], "5f57d0639bc95081c53afc63a449403883818edc64da48930ad6b1a4fb49be90404686877743fbcd7c99811f3def7df7bc22635c885c6a8cf79c806b43451c1a") + [["checksum"; "sha512"; "/abssymlink"]], "5f57d0639bc95081c53afc63a449403883818edc64da48930ad6b1a4fb49be90404686877743fbcd7c99811f3def7df7bc22635c885c6a8cf79c806b43451c1a"), [] ]; shortdesc = "compute MD5, SHAx or CRC checksum of file"; longdesc = "\ @@ -4395,15 +4379,15 @@ To get the checksums for many files, use C." }; InitScratchFS, Always, TestResultString ( [["mkdir"; "/tar_in"]; ["tar_in"; "$srcdir/../data/helloworld.tar"; "/tar_in"; "NOARG"]; - ["cat"; "/tar_in/hello"]], "hello\n"); + ["cat"; "/tar_in/hello"]], "hello\n"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/tar_in_gz"]; ["tar_in"; "$srcdir/../data/helloworld.tar.gz"; "/tar_in_gz"; "gzip"]; - ["cat"; "/tar_in_gz/hello"]], "hello\n"); + ["cat"; "/tar_in_gz/hello"]], "hello\n"), []; InitScratchFS, IfAvailable "xz", TestResultString ( [["mkdir"; "/tar_in_xz"]; ["tar_in"; "$srcdir/../data/helloworld.tar.xz"; "/tar_in_xz"; "xz"]; - ["cat"; "/tar_in_xz/hello"]], "hello\n") + ["cat"; "/tar_in_xz/hello"]], "hello\n"), [] ]; shortdesc = "unpack tarfile to directory"; longdesc = "\ @@ -4460,7 +4444,7 @@ instead of user/group names. InitScratchFS, Always, TestResultString ( [["mkdir"; "/tgz_in"]; ["tgz_in"; "$srcdir/../data/helloworld.tar.gz"; "/tgz_in"]; - ["cat"; "/tgz_in/hello"]], "hello\n") + ["cat"; "/tgz_in/hello"]], "hello\n"), [] ]; shortdesc = "unpack compressed tarball to directory"; longdesc = "\ @@ -4486,12 +4470,12 @@ it to local file C." }; InitBasicFS, Always, TestLastFail ( [["umount"; "/"; "false"; "false"]; ["mount_ro"; "/dev/sda1"; "/"]; - ["touch"; "/new"]]); + ["touch"; "/new"]]), []; InitBasicFS, Always, TestResultString ( [["write"; "/new"; "data"]; ["umount"; "/"; "false"; "false"]; ["mount_ro"; "/dev/sda1"; "/"]; - ["cat"; "/new"]], "data") + ["cat"; "/new"]], "data"), [] ]; shortdesc = "mount a guest disk, read-only"; longdesc = "\ @@ -4551,7 +4535,7 @@ to find out what you can do." }; ["lvcreate"; "LV2"; "VG"; "50"]; ["lvremove"; "/dev/VG/LV1"]; ["lvs"]], - "is_string_list (ret, 1, \"/dev/VG/LV2\")"); + "is_string_list (ret, 1, \"/dev/VG/LV2\")"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; @@ -4560,7 +4544,7 @@ to find out what you can do." }; ["lvcreate"; "LV2"; "VG"; "50"]; ["lvremove"; "/dev/VG"]; ["lvs"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; @@ -4569,7 +4553,7 @@ to find out what you can do." }; ["lvcreate"; "LV2"; "VG"; "50"]; ["lvremove"; "/dev/VG"]; ["vgs"]], - "is_string_list (ret, 1, \"VG\")") + "is_string_list (ret, 1, \"VG\")"), [] ]; shortdesc = "remove an LVM logical volume"; longdesc = "\ @@ -4593,7 +4577,7 @@ the VG name, C." }; ["lvcreate"; "LV2"; "VG"; "50"]; ["vgremove"; "VG"]; ["lvs"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; @@ -4602,7 +4586,7 @@ the VG name, C." }; ["lvcreate"; "LV2"; "VG"; "50"]; ["vgremove"; "VG"]; ["vgs"]], - "is_string_list (ret, 0)") + "is_string_list (ret, 0)"), [] ]; shortdesc = "remove an LVM volume group"; longdesc = "\ @@ -4626,7 +4610,7 @@ group (if any)." }; ["vgremove"; "VG"]; ["pvremove"; "/dev/sda1"]; ["lvs"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; @@ -4636,7 +4620,7 @@ group (if any)." }; ["vgremove"; "VG"]; ["pvremove"; "/dev/sda1"]; ["vgs"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; @@ -4646,7 +4630,7 @@ group (if any)." }; ["vgremove"; "VG"]; ["pvremove"; "/dev/sda1"]; ["pvs"]], - "is_string_list (ret, 0)") + "is_string_list (ret, 0)"), [] ]; shortdesc = "remove an LVM physical volume"; longdesc = "\ @@ -4665,7 +4649,7 @@ to remove those first." }; tests = [ InitBasicFS, Always, TestResultString ( [["set_e2label"; "/dev/sda1"; "testlabel"]; - ["get_e2label"; "/dev/sda1"]], "testlabel") + ["get_e2label"; "/dev/sda1"]], "testlabel"), [] ]; shortdesc = "set the ext2/3/4 filesystem label"; longdesc = "\ @@ -4694,16 +4678,16 @@ C." }; (let uuid = uuidgen () in [ InitBasicFS, Always, TestResultString ( [["set_e2uuid"; "/dev/sda1"; uuid]; - ["get_e2uuid"; "/dev/sda1"]], uuid); + ["get_e2uuid"; "/dev/sda1"]], uuid), []; InitBasicFS, Always, TestResultString ( [["set_e2uuid"; "/dev/sda1"; "clear"]; - ["get_e2uuid"; "/dev/sda1"]], ""); + ["get_e2uuid"; "/dev/sda1"]], ""), []; (* We can't predict what UUIDs will be, so just check the commands run. *) InitBasicFS, Always, TestRun ( - [["set_e2uuid"; "/dev/sda1"; "random"]]); + [["set_e2uuid"; "/dev/sda1"; "random"]]), []; InitBasicFS, Always, TestRun ( - [["set_e2uuid"; "/dev/sda1"; "time"]]) + [["set_e2uuid"; "/dev/sda1"; "time"]]), [] ]); shortdesc = "set the ext2/3/4 filesystem UUID"; longdesc = "\ @@ -4726,7 +4710,7 @@ to return the existing UUID of a filesystem." }; InitNone, Always, TestResultString ( [["mke2journal"; "1024"; "/dev/sdc"]; ["set_e2uuid"; "/dev/sdc"; uuid]; - ["get_e2uuid"; "/dev/sdc"]], uuid) + ["get_e2uuid"; "/dev/sdc"]], uuid), [] ]); shortdesc = "get the ext2/3/4 filesystem UUID"; longdesc = "\ @@ -4741,11 +4725,11 @@ C." }; tests = [ InitBasicFS, Always, TestResult ( [["umount"; "/dev/sda1"; "false"; "false"]; - ["fsck"; "ext2"; "/dev/sda1"]], "ret == 0"); + ["fsck"; "ext2"; "/dev/sda1"]], "ret == 0"), []; InitBasicFS, Always, TestResult ( [["umount"; "/dev/sda1"; "false"; "false"]; ["zero"; "/dev/sda1"]; - ["fsck"; "ext2"; "/dev/sda1"]], "ret == 8") + ["fsck"; "ext2"; "/dev/sda1"]], "ret == 8"), [] ]; shortdesc = "run the filesystem checker"; longdesc = "\ @@ -4785,7 +4769,7 @@ This command is entirely equivalent to running C." }; tests = [ InitBasicFS, Always, TestRun ( [["umount"; "/dev/sda1"; "false"; "false"]; - ["zero"; "/dev/sda1"]]) + ["zero"; "/dev/sda1"]]), [] ]; shortdesc = "write zeroes to the device"; longdesc = "\ @@ -4816,7 +4800,7 @@ C" }; [["mkdir_p"; "/boot/grub"]; ["write"; "/boot/grub/device.map"; "(hd0) /dev/sda"]; ["grub_install"; "/"; "/dev/sda"]; - ["is_dir"; "/boot"; ""]]) + ["is_dir"; "/boot"; ""]]), [] ]; shortdesc = "install GRUB 1"; longdesc = "\ @@ -4865,18 +4849,18 @@ replacing C with the name of the installation device. [["mkdir"; "/cp"]; ["write"; "/cp/old"; "file content"]; ["cp"; "/cp/old"; "/cp/new"]; - ["cat"; "/cp/new"]], "file content"); + ["cat"; "/cp/new"]], "file content"), []; InitScratchFS, Always, TestResultTrue ( [["mkdir"; "/cp2"]; ["write"; "/cp2/old"; "file content"]; ["cp"; "/cp2/old"; "/cp2/new"]; - ["is_file"; "/cp2/old"; ""]]); + ["is_file"; "/cp2/old"; ""]]), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/cp3"]; ["write"; "/cp3/old"; "file content"]; ["mkdir"; "/cp3/dir"]; ["cp"; "/cp3/old"; "/cp3/dir/new"]; - ["cat"; "/cp3/dir/new"]], "file content") + ["cat"; "/cp3/dir/new"]], "file content"), [] ]; shortdesc = "copy a file"; longdesc = "\ @@ -4893,7 +4877,7 @@ either a destination filename or destination directory." }; ["mkdir"; "/cp_a2"]; ["write"; "/cp_a1/file"; "file content"]; ["cp_a"; "/cp_a1"; "/cp_a2"]; - ["cat"; "/cp_a2/cp_a1/file"]], "file content") + ["cat"; "/cp_a2/cp_a1/file"]], "file content"), [] ]; shortdesc = "copy a file or directory recursively"; longdesc = "\ @@ -4909,12 +4893,12 @@ recursively using the C command." }; [["mkdir"; "/mv"]; ["write"; "/mv/old"; "file content"]; ["mv"; "/mv/old"; "/mv/new"]; - ["cat"; "/mv/new"]], "file content"); + ["cat"; "/mv/new"]], "file content"), []; InitScratchFS, Always, TestResultFalse ( [["mkdir"; "/mv2"]; ["write"; "/mv2/old"; "file content"]; ["mv"; "/mv2/old"; "/mv2/new"]; - ["is_file"; "/mv2/old"; ""]]) + ["is_file"; "/mv2/old"; ""]]), [] ]; shortdesc = "move a file"; longdesc = "\ @@ -4929,7 +4913,7 @@ See also: C." }; proc_nr = Some 90; tests = [ InitEmpty, Always, TestRun ( - [["drop_caches"; "3"]]) + [["drop_caches"; "3"]]), [] ]; shortdesc = "drop kernel page cache, dentries and inodes"; longdesc = "\ @@ -4949,7 +4933,7 @@ so that the maximum guest memory is freed." }; proc_nr = Some 91; tests = [ InitEmpty, Always, TestRun ( - [["dmesg"]]) + [["dmesg"]]), [] ]; shortdesc = "return kernel messages"; longdesc = "\ @@ -4968,7 +4952,7 @@ running the program." }; proc_nr = Some 92; tests = [ InitEmpty, Always, TestRun ( - [["ping_daemon"]]) + [["ping_daemon"]]), [] ]; shortdesc = "ping the guest daemon"; longdesc = "\ @@ -4986,15 +4970,15 @@ or attached block device(s) in any other way." }; [["mkdir"; "/equal"]; ["write"; "/equal/file1"; "contents of a file"]; ["cp"; "/equal/file1"; "/equal/file2"]; - ["equal"; "/equal/file1"; "/equal/file2"]]); + ["equal"; "/equal/file1"; "/equal/file2"]]), []; InitScratchFS, Always, TestResultFalse ( [["mkdir"; "/equal2"]; ["write"; "/equal2/file1"; "contents of a file"]; ["write"; "/equal2/file2"; "contents of another file"]; - ["equal"; "/equal2/file1"; "/equal2/file2"]]); + ["equal"; "/equal2/file1"; "/equal2/file2"]]), []; InitScratchFS, Always, TestLastFail ( [["mkdir"; "/equal3"]; - ["equal"; "/equal3/file1"; "/equal3/file2"]]) + ["equal"; "/equal3/file1"; "/equal3/file2"]]), [] ]; shortdesc = "test if two files have equal contents"; longdesc = "\ @@ -5011,13 +4995,13 @@ The external L program is used for the comparison." }; tests = [ InitISOFS, Always, TestResult ( [["strings"; "/known-5"]], - "is_string_list (ret, 2, \"abcdefghi\", \"jklmnopqr\")"); + "is_string_list (ret, 2, \"abcdefghi\", \"jklmnopqr\")"), []; InitISOFS, Always, TestResult ( [["strings"; "/empty"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestRun ( - [["strings"; "/abssymlink"]]) + [["strings"; "/abssymlink"]]), [] ]; shortdesc = "print the printable strings in a file"; longdesc = "\ @@ -5032,11 +5016,11 @@ the list of printable strings found." }; tests = [ InitISOFS, Always, TestResult ( [["strings_e"; "b"; "/known-5"]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitScratchFS, Always, TestResult ( [["write"; "/strings_e"; "\000h\000e\000l\000l\000o\000\n\000w\000o\000r\000l\000d\000\n"]; ["strings_e"; "b"; "/strings_e"]], - "is_string_list (ret, 2, \"hello\", \"world\")") + "is_string_list (ret, 2, \"hello\", \"world\")"), [] ]; shortdesc = "print the printable strings in a file"; longdesc = "\ @@ -5086,15 +5070,15 @@ The returned strings are transcoded to UTF-8." }; protocol_limit_warning = true; tests = [ InitISOFS, Always, TestResultString ( - [["hexdump"; "/known-4"]], "00000000 61 62 63 0a 64 65 66 0a 67 68 69 |abc.def.ghi|\n0000000b\n"); + [["hexdump"; "/known-4"]], "00000000 61 62 63 0a 64 65 66 0a 67 68 69 |abc.def.ghi|\n0000000b\n"), []; (* Test for RHBZ#501888c2 regression which caused large hexdump * commands to segfault. *) InitISOFS, Always, TestRun ( - [["hexdump"; "/100krandom"]]); + [["hexdump"; "/100krandom"]]), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestRun ( - [["hexdump"; "/abssymlink"]]) + [["hexdump"; "/abssymlink"]]), [] ]; shortdesc = "dump a file in hexadecimal"; longdesc = "\ @@ -5115,7 +5099,7 @@ the human-readable, canonical hex dump of the file." }; ["umount"; "/dev/sda1"; "false"; "false"]; ["zerofree"; "/dev/sda1"]; ["mount"; "/dev/sda1"; "/"]; - ["cat"; "/new"]], "test file") + ["cat"; "/new"]], "test file"), [] ]; shortdesc = "zero unused inodes and disk blocks on ext2/3 filesystem"; longdesc = "\ @@ -5243,14 +5227,14 @@ are activated or deactivated." }; ["e2fsck"; "/dev/VG/LV"; "false"; "true"]; ["resize2fs"; "/dev/VG/LV"]; ["mount"; "/dev/VG/LV"; "/"]; - ["cat"; "/new"]], "test content"); + ["cat"; "/new"]], "test content"), []; InitNone, Always, TestRun ( (* Make an LV smaller to test RHBZ#587484. *) [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; ["vgcreate"; "VG"; "/dev/sda1"]; ["lvcreate"; "LV"; "VG"; "20"]; - ["lvresize"; "/dev/VG/LV"; "10"]]) + ["lvresize"; "/dev/VG/LV"; "10"]]), [] ]; shortdesc = "resize an LVM logical volume"; longdesc = "\ @@ -5286,7 +5270,7 @@ even if the filesystem appears to be clean (I<-f>)." }; proc_nr = Some 109; tests = [ InitNone, Always, TestRun ( - [["sleep"; "1"]]) + [["sleep"; "1"]]), [] ]; shortdesc = "sleep for some seconds"; longdesc = "\ @@ -5301,11 +5285,11 @@ Sleep for C seconds." }; InitNone, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ntfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; - ["ntfs_3g_probe"; "true"; "/dev/sda1"]], "ret == 0"); + ["ntfs_3g_probe"; "true"; "/dev/sda1"]], "ret == 0"), []; InitNone, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ext2"; "/dev/sda1"; ""; "NOARG"; ""; ""]; - ["ntfs_3g_probe"; "true"; "/dev/sda1"]], "ret == 12") + ["ntfs_3g_probe"; "true"; "/dev/sda1"]], "ret == 12"), [] ]; shortdesc = "probe NTFS volume"; longdesc = "\ @@ -5325,7 +5309,6 @@ L manual page." }; name = "sh"; style = RString "output", [String "command"], []; proc_nr = Some 111; - tests = [] (* XXX needs tests *); shortdesc = "run a command via the shell"; longdesc = "\ This call runs a command from the guest filesystem via the @@ -5345,7 +5328,6 @@ All the provisos about C apply to this call." }; name = "sh_lines"; style = RStringList "lines", [String "command"], []; proc_nr = Some 112; - tests = [] (* XXX needs tests *); shortdesc = "run a command via the shell returning lines"; longdesc = "\ This is the same as C, but splits the result @@ -5368,19 +5350,19 @@ See also: C" }; ["touch"; "/glob_expand/b/c/d"]; ["touch"; "/glob_expand/b/c/e"]; ["glob_expand"; "/glob_expand/b/c/*"]], - "is_string_list (ret, 2, \"/glob_expand/b/c/d\", \"/glob_expand/b/c/e\")"); + "is_string_list (ret, 2, \"/glob_expand/b/c/d\", \"/glob_expand/b/c/e\")"), []; InitScratchFS, Always, TestResult ( [["mkdir_p"; "/glob_expand2/b/c"]; ["touch"; "/glob_expand2/b/c/d"]; ["touch"; "/glob_expand2/b/c/e"]; ["glob_expand"; "/glob_expand2/*/c/*"]], - "is_string_list (ret, 2, \"/glob_expand2/b/c/d\", \"/glob_expand2/b/c/e\")"); + "is_string_list (ret, 2, \"/glob_expand2/b/c/d\", \"/glob_expand2/b/c/e\")"), []; InitScratchFS, Always, TestResult ( [["mkdir_p"; "/glob_expand3/b/c"]; ["touch"; "/glob_expand3/b/c/d"]; ["touch"; "/glob_expand3/b/c/e"]; ["glob_expand"; "/glob_expand3/*/x/*"]], - "is_string_list (ret, 0)") + "is_string_list (ret, 0)"), [] ]; shortdesc = "expand a wildcard path"; longdesc = "\ @@ -5406,7 +5388,7 @@ C etc functions instead." }; optional = Some "scrub"; tests = [ InitNone, Always, TestRun ( (* use /dev/sdc because it's smaller *) - [["scrub_device"; "/dev/sdc"]]) + [["scrub_device"; "/dev/sdc"]]), [] ]; shortdesc = "scrub (securely wipe) a device"; longdesc = "\ @@ -5424,7 +5406,7 @@ manual page for more details." }; tests = [ InitScratchFS, Always, TestRun ( [["write"; "/scrub_file"; "content"]; - ["scrub_file"; "/scrub_file"]]) + ["scrub_file"; "/scrub_file"]]), [] ]; shortdesc = "scrub (securely wipe) a file"; longdesc = "\ @@ -5460,7 +5442,7 @@ manual page for more details." }; tests = [ InitScratchFS, Always, TestRun ( [["mkdir"; "/mkdtemp"]; - ["mkdtemp"; "/mkdtemp/tmpXXXXXX"]]) + ["mkdtemp"; "/mkdtemp/tmpXXXXXX"]]), [] ]; shortdesc = "create a temporary directory"; longdesc = "\ @@ -5489,10 +5471,10 @@ See also: L" }; proc_nr = Some 118; tests = [ InitISOFS, Always, TestResult ( - [["wc_l"; "/10klines"]], "ret == 10000"); + [["wc_l"; "/10klines"]], "ret == 10000"), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestResult ( - [["wc_l"; "/abssymlink"]], "ret == 10000") + [["wc_l"; "/abssymlink"]], "ret == 10000"), [] ]; shortdesc = "count lines in a file"; longdesc = "\ @@ -5505,7 +5487,7 @@ C external command." }; proc_nr = Some 119; tests = [ InitISOFS, Always, TestResult ( - [["wc_w"; "/10klines"]], "ret == 10000") + [["wc_w"; "/10klines"]], "ret == 10000"), [] ]; shortdesc = "count words in a file"; longdesc = "\ @@ -5518,7 +5500,7 @@ C external command." }; proc_nr = Some 120; tests = [ InitISOFS, Always, TestResult ( - [["wc_c"; "/100kallspaces"]], "ret == 102400") + [["wc_c"; "/100kallspaces"]], "ret == 102400"), [] ]; shortdesc = "count characters in a file"; longdesc = "\ @@ -5533,11 +5515,11 @@ C external command." }; tests = [ InitISOFS, Always, TestResult ( [["head"; "/10klines"]], - "is_string_list (ret, 10, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\", \"3abcdefghijklmnopqrstuvwxyz\", \"4abcdefghijklmnopqrstuvwxyz\", \"5abcdefghijklmnopqrstuvwxyz\", \"6abcdefghijklmnopqrstuvwxyz\", \"7abcdefghijklmnopqrstuvwxyz\", \"8abcdefghijklmnopqrstuvwxyz\", \"9abcdefghijklmnopqrstuvwxyz\")"); + "is_string_list (ret, 10, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\", \"3abcdefghijklmnopqrstuvwxyz\", \"4abcdefghijklmnopqrstuvwxyz\", \"5abcdefghijklmnopqrstuvwxyz\", \"6abcdefghijklmnopqrstuvwxyz\", \"7abcdefghijklmnopqrstuvwxyz\", \"8abcdefghijklmnopqrstuvwxyz\", \"9abcdefghijklmnopqrstuvwxyz\")"), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestResult ( [["head"; "/abssymlink"]], - "is_string_list (ret, 10, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\", \"3abcdefghijklmnopqrstuvwxyz\", \"4abcdefghijklmnopqrstuvwxyz\", \"5abcdefghijklmnopqrstuvwxyz\", \"6abcdefghijklmnopqrstuvwxyz\", \"7abcdefghijklmnopqrstuvwxyz\", \"8abcdefghijklmnopqrstuvwxyz\", \"9abcdefghijklmnopqrstuvwxyz\")") + "is_string_list (ret, 10, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\", \"3abcdefghijklmnopqrstuvwxyz\", \"4abcdefghijklmnopqrstuvwxyz\", \"5abcdefghijklmnopqrstuvwxyz\", \"6abcdefghijklmnopqrstuvwxyz\", \"7abcdefghijklmnopqrstuvwxyz\", \"8abcdefghijklmnopqrstuvwxyz\", \"9abcdefghijklmnopqrstuvwxyz\")"), [] ]; shortdesc = "return first 10 lines of a file"; longdesc = "\ @@ -5552,13 +5534,13 @@ a list of strings." }; tests = [ InitISOFS, Always, TestResult ( [["head_n"; "3"; "/10klines"]], - "is_string_list (ret, 3, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\")"); + "is_string_list (ret, 3, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\")"), []; InitISOFS, Always, TestResult ( [["head_n"; "-9997"; "/10klines"]], - "is_string_list (ret, 3, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\")"); + "is_string_list (ret, 3, \"0abcdefghijklmnopqrstuvwxyz\", \"1abcdefghijklmnopqrstuvwxyz\", \"2abcdefghijklmnopqrstuvwxyz\")"), []; InitISOFS, Always, TestResult ( [["head_n"; "0"; "/10klines"]], - "is_string_list (ret, 0)") + "is_string_list (ret, 0)"), [] ]; shortdesc = "return first N lines of a file"; longdesc = "\ @@ -5578,7 +5560,7 @@ If the parameter C is zero, this returns an empty list." }; tests = [ InitISOFS, Always, TestResult ( [["tail"; "/10klines"]], - "is_string_list (ret, 10, \"9990abcdefghijklmnopqrstuvwxyz\", \"9991abcdefghijklmnopqrstuvwxyz\", \"9992abcdefghijklmnopqrstuvwxyz\", \"9993abcdefghijklmnopqrstuvwxyz\", \"9994abcdefghijklmnopqrstuvwxyz\", \"9995abcdefghijklmnopqrstuvwxyz\", \"9996abcdefghijklmnopqrstuvwxyz\", \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")") + "is_string_list (ret, 10, \"9990abcdefghijklmnopqrstuvwxyz\", \"9991abcdefghijklmnopqrstuvwxyz\", \"9992abcdefghijklmnopqrstuvwxyz\", \"9993abcdefghijklmnopqrstuvwxyz\", \"9994abcdefghijklmnopqrstuvwxyz\", \"9995abcdefghijklmnopqrstuvwxyz\", \"9996abcdefghijklmnopqrstuvwxyz\", \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")"), [] ]; shortdesc = "return last 10 lines of a file"; longdesc = "\ @@ -5593,13 +5575,13 @@ a list of strings." }; tests = [ InitISOFS, Always, TestResult ( [["tail_n"; "3"; "/10klines"]], - "is_string_list (ret, 3, \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")"); + "is_string_list (ret, 3, \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")"), []; InitISOFS, Always, TestResult ( [["tail_n"; "-9998"; "/10klines"]], - "is_string_list (ret, 3, \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")"); + "is_string_list (ret, 3, \"9997abcdefghijklmnopqrstuvwxyz\", \"9998abcdefghijklmnopqrstuvwxyz\", \"9999abcdefghijklmnopqrstuvwxyz\")"), []; InitISOFS, Always, TestResult ( [["tail_n"; "0"; "/10klines"]], - "is_string_list (ret, 0)") + "is_string_list (ret, 0)"), [] ]; shortdesc = "return last N lines of a file"; longdesc = "\ @@ -5615,9 +5597,7 @@ If the parameter C is zero, this returns an empty list." }; name = "df"; style = RString "output", [], []; proc_nr = Some 125; - tests = [] (* XXX Tricky to test because it depends on the exact format - * of the 'df' command and other imponderables. - *); + test_excuse = "tricky to test because it depends on the exact format of the 'df' command and other imponderables"; shortdesc = "report file system disk space usage"; longdesc = "\ This command runs the C command to report disk space used. @@ -5630,9 +5610,7 @@ Use C from programs." }; name = "df_h"; style = RString "output", [], []; proc_nr = Some 126; - tests = [] (* XXX Tricky to test because it depends on the exact format - * of the 'df' command and other imponderables. - *); + test_excuse = "tricky to test because it depends on the exact format of the 'df' command and other imponderables"; shortdesc = "report file system disk space usage (human readable)"; longdesc = "\ This command runs the C command to report disk space used @@ -5649,7 +5627,7 @@ Use C from programs." }; progress = true; tests = [ InitISOFS, Always, TestResult ( - [["du"; "/directory"]], "ret == 2" (* ISO fs blocksize is 2K *)) + [["du"; "/directory"]], "ret == 2" (* ISO fs blocksize is 2K *)), [] ]; shortdesc = "estimate file space usage"; longdesc = "\ @@ -5670,7 +5648,7 @@ The result is the estimated size in I tests = [ InitISOFS, Always, TestResult ( [["initrd_list"; "/initrd"]], - "is_string_list (ret, 6, \"empty\", \"known-1\", \"known-2\", \"known-3\", \"known-4\", \"known-5\")") + "is_string_list (ret, 6, \"empty\", \"known-1\", \"known-2\", \"known-3\", \"known-4\", \"known-5\")"), [] ]; shortdesc = "list files in an initrd"; longdesc = "\ @@ -5702,16 +5680,16 @@ the command C." }; tests = (let uuid = uuidgen () in [ InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap"; "/dev/sda1"; "NOARG"; "NOARG"]]); + ["mkswap"; "/dev/sda1"; "NOARG"; "NOARG"]]), []; InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap"; "/dev/sda1"; "hello"; "NOARG"]]); + ["mkswap"; "/dev/sda1"; "hello"; "NOARG"]]), []; InitEmpty, IfAvailable "linuxfsuuid", TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap"; "/dev/sda1"; "NOARG"; uuid]]); + ["mkswap"; "/dev/sda1"; "NOARG"; uuid]]), []; InitEmpty, IfAvailable "linuxfsuuid", TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap"; "/dev/sda1"; "hello"; uuid]]) + ["mkswap"; "/dev/sda1"; "hello"; uuid]]), [] ]); shortdesc = "create a swap partition"; longdesc = "\ @@ -5728,7 +5706,7 @@ label and/or UUID of the new swap partition." }; tests = [ InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap_L"; "hello"; "/dev/sda1"]]) + ["mkswap_L"; "hello"; "/dev/sda1"]]), [] ]; shortdesc = "create a swap partition with a label"; longdesc = "\ @@ -5748,7 +5726,7 @@ a limitation of the kernel or swap tools." }; (let uuid = uuidgen () in [ InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkswap_U"; uuid; "/dev/sda1"]]) + ["mkswap_U"; uuid; "/dev/sda1"]]), [] ]); shortdesc = "create a swap partition with an explicit UUID"; longdesc = "\ @@ -5764,11 +5742,11 @@ Create a swap partition on C with UUID C." }; [["mknod"; "0o10777"; "0"; "0"; "/mknod"]; (* NB: default umask 022 means 0777 -> 0755 in these tests *) ["stat"; "/mknod"]], - "S_ISFIFO (ret->mode) && (ret->mode & 0777) == 0755"); + "S_ISFIFO (ret->mode) && (ret->mode & 0777) == 0755"), []; InitScratchFS, Always, TestResult ( [["mknod"; "0o60777"; "66"; "99"; "/mknod2"]; ["stat"; "/mknod2"]], - "S_ISBLK (ret->mode) && (ret->mode & 0777) == 0755") + "S_ISBLK (ret->mode) && (ret->mode & 0777) == 0755"), [] ]; shortdesc = "make block, character or FIFO devices"; longdesc = "\ @@ -5799,7 +5777,7 @@ The mode actually set is affected by the umask." }; InitScratchFS, Always, TestResult ( [["mkfifo"; "0o777"; "/mkfifo"]; ["stat"; "/mkfifo"]], - "S_ISFIFO (ret->mode) && (ret->mode & 0777) == 0755") + "S_ISFIFO (ret->mode) && (ret->mode & 0777) == 0755"), [] ]; shortdesc = "make FIFO (named pipe)"; longdesc = "\ @@ -5818,7 +5796,7 @@ The mode actually set is affected by the umask." }; InitScratchFS, Always, TestResult ( [["mknod_b"; "0o777"; "99"; "66"; "/mknod_b"]; ["stat"; "/mknod_b"]], - "S_ISBLK (ret->mode) && (ret->mode & 0777) == 0755") + "S_ISBLK (ret->mode) && (ret->mode & 0777) == 0755"), [] ]; shortdesc = "make block device node"; longdesc = "\ @@ -5837,7 +5815,7 @@ The mode actually set is affected by the umask." }; InitScratchFS, Always, TestResult ( [["mknod_c"; "0o777"; "99"; "66"; "/mknod_c"]; ["stat"; "/mknod_c"]], - "S_ISCHR (ret->mode) && (ret->mode & 0777) == 0755") + "S_ISCHR (ret->mode) && (ret->mode & 0777) == 0755"), [] ]; shortdesc = "make char device node"; longdesc = "\ @@ -5854,7 +5832,7 @@ The mode actually set is affected by the umask." }; fish_output = Some FishOutputOctal; tests = [ InitEmpty, Always, TestResult ( - [["umask"; "0o22"]], "ret == 022") + [["umask"; "0o22"]], "ret == 022"), [] ]; shortdesc = "set file mode creation mask (umask)"; longdesc = "\ @@ -6122,47 +6100,47 @@ for full details." }; tests = [ InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; ""; ""; ""; ""]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "nomatch"; "/test-grep.txt"; ""; ""; ""; ""]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; (* Test for RHBZ#579608, absolute symbolic links. *) InitISOFS, Always, TestResult ( [["grep"; "nomatch"; "/abssymlink"; ""; ""; ""; ""]], - "is_string_list (ret, 0)"); + "is_string_list (ret, 0)"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; "true"; ""; ""; ""]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; ""; "true"; ""; ""]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; ""; ""; "true"; ""]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"); + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; "true"; ""; "true"; ""]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"); + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt"; ""; "true"; "true"; ""]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"); + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; ""; ""; ""; "true"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; "true"; ""; ""; "true"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; ""; "true"; ""; "true"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")"); + "is_string_list (ret, 2, \"abc\", \"abc123\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; ""; ""; "true"; "true"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"); + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; "true"; ""; "true"; "true"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"); + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), []; InitISOFS, Always, TestResult ( [["grep"; "abc"; "/test-grep.txt.gz"; ""; "true"; "true"; "true"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6203,7 +6181,7 @@ compress- or gzip-compressed. tests = [ InitISOFS, Always, TestResult ( [["egrep"; "abc"; "/test-grep.txt"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")") + "is_string_list (ret, 2, \"abc\", \"abc123\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6219,7 +6197,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["fgrep"; "abc"; "/test-grep.txt"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")") + "is_string_list (ret, 2, \"abc\", \"abc123\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6235,7 +6213,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["grepi"; "abc"; "/test-grep.txt"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6251,7 +6229,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["egrepi"; "abc"; "/test-grep.txt"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6267,7 +6245,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["fgrepi"; "abc"; "/test-grep.txt"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6283,7 +6261,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zgrep"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")") + "is_string_list (ret, 2, \"abc\", \"abc123\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6299,7 +6277,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zegrep"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")") + "is_string_list (ret, 2, \"abc\", \"abc123\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6315,7 +6293,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zfgrep"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 2, \"abc\", \"abc123\")") + "is_string_list (ret, 2, \"abc\", \"abc123\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6331,7 +6309,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zgrepi"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6347,7 +6325,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zegrepi"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6363,7 +6341,7 @@ matching lines." }; tests = [ InitISOFS, Always, TestResult ( [["zfgrepi"; "abc"; "/test-grep.txt.gz"]], - "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")") + "is_string_list (ret, 3, \"abc\", \"abc123\", \"ABC\")"), [] ]; shortdesc = "return lines matching a pattern"; longdesc = "\ @@ -6377,7 +6355,7 @@ matching lines." }; optional = Some "realpath"; tests = [ InitISOFS, Always, TestResultString ( - [["realpath"; "/../directory"]], "/directory") + [["realpath"; "/../directory"]], "/directory"), [] ]; shortdesc = "canonicalized absolute pathname"; longdesc = "\ @@ -6393,7 +6371,7 @@ returned path has no C<.>, C<..> or symbolic link path elements." }; [["mkdir"; "/ln"]; ["touch"; "/ln/a"]; ["ln"; "/ln/a"; "/ln/b"]; - ["stat"; "/ln/b"]], "ret->nlink == 2") + ["stat"; "/ln/b"]], "ret->nlink == 2"), [] ]; shortdesc = "create a hard link"; longdesc = "\ @@ -6409,7 +6387,7 @@ This command creates a hard link using the C command." }; ["touch"; "/ln_f/a"]; ["touch"; "/ln_f/b"]; ["ln_f"; "/ln_f/a"; "/ln_f/b"]; - ["stat"; "/ln_f/b"]], "ret->nlink == 2") + ["stat"; "/ln_f/b"]], "ret->nlink == 2"), [] ]; shortdesc = "create a hard link"; longdesc = "\ @@ -6426,7 +6404,7 @@ The I<-f> option removes the link (C) if it exists already." }; ["touch"; "/ln_s/a"]; ["ln_s"; "a"; "/ln_s/b"]; ["lstat"; "/ln_s/b"]], - "S_ISLNK (ret->mode) && (ret->mode & 0777) == 0777") + "S_ISLNK (ret->mode) && (ret->mode & 0777) == 0777"), [] ]; shortdesc = "create a symbolic link"; longdesc = "\ @@ -6441,7 +6419,7 @@ This command creates a symbolic link using the C command." }; [["mkdir_p"; "/ln_sf/b"]; ["touch"; "/ln_sf/b/c"]; ["ln_sf"; "../d"; "/ln_sf/b/c"]; - ["readlink"; "/ln_sf/b/c"]], "../d") + ["readlink"; "/ln_sf/b/c"]], "../d"), [] ]; shortdesc = "create a symbolic link"; longdesc = "\ @@ -6464,7 +6442,7 @@ This command reads the target of a symbolic link." }; tests = [ InitScratchFS, Always, TestResult ( [["fallocate"; "/fallocate"; "1000000"]; - ["stat"; "/fallocate"]], "ret->size == 1000000") + ["stat"; "/fallocate"]], "ret->size == 1000000"), [] ]; shortdesc = "preallocate a file in the guest filesystem"; longdesc = "\ @@ -6484,7 +6462,7 @@ attaches it as a device." }; InitPartition, Always, TestRun ( [["mkswap"; "/dev/sda1"; "NOARG"; "NOARG"]; ["swapon_device"; "/dev/sda1"]; - ["swapoff_device"; "/dev/sda1"]]) + ["swapoff_device"; "/dev/sda1"]]), [] ]; shortdesc = "enable swap on device"; longdesc = "\ @@ -6520,7 +6498,7 @@ See C." }; ["mkswap_file"; "/swapon_file"]; ["swapon_file"; "/swapon_file"]; ["swapoff_file"; "/swapon_file"]; - ["rm"; "/swapon_file"]]) + ["rm"; "/swapon_file"]]), [] ]; shortdesc = "enable swap on file"; longdesc = "\ @@ -6546,7 +6524,7 @@ This command disables the libguestfs appliance swap on file." }; ["swapon_label"; "swapit"]; ["swapoff_label"; "swapit"]; ["zero"; "/dev/sda"]; - ["blockdev_rereadpt"; "/dev/sda"]]) + ["blockdev_rereadpt"; "/dev/sda"]]), [] ]; shortdesc = "enable swap on labeled swap partition"; longdesc = "\ @@ -6572,7 +6550,7 @@ labeled swap partition." }; InitEmpty, Always, TestRun ( [["mkswap"; "/dev/sdc"; "NOARG"; uuid]; ["swapon_uuid"; uuid]; - ["swapoff_uuid"; uuid]]) + ["swapoff_uuid"; uuid]]), [] ]); shortdesc = "enable swap on swap partition by UUID"; longdesc = "\ @@ -6597,7 +6575,7 @@ with the given UUID." }; InitScratchFS, Always, TestRun ( [["fallocate"; "/mkswap_file"; "8388608"]; ["mkswap_file"; "/mkswap_file"]; - ["rm"; "/mkswap_file"]]) + ["rm"; "/mkswap_file"]]), [] ]; shortdesc = "create a swap file"; longdesc = "\ @@ -6613,7 +6591,7 @@ file. To create the file itself, use something like C." }; optional = Some "inotify"; tests = [ InitISOFS, Always, TestRun ( - [["inotify_init"; "0"]]) + [["inotify_init"; "0"]]), [] ]; shortdesc = "create an inotify handle"; longdesc = "\ @@ -6664,7 +6642,7 @@ per libguestfs instance." }; ["touch"; "/inotify_add_watch/a"]; ["touch"; "/inotify_add_watch/b"]; ["inotify_files"]], - "is_string_list (ret, 2, \"a\", \"b\")") + "is_string_list (ret, 2, \"a\", \"b\")"), [] ]; shortdesc = "add an inotify watch"; longdesc = "\ @@ -6763,19 +6741,19 @@ and C" }; ["mkfs_b"; "ext2"; "4096"; "/dev/sda1"]; ["mount"; "/dev/sda1"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents"); + ["cat"; "/new"]], "new file contents"), []; InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkfs_b"; "vfat"; "32768"; "/dev/sda1"]]); + ["mkfs_b"; "vfat"; "32768"; "/dev/sda1"]]), []; InitEmpty, Always, TestLastFail ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkfs_b"; "vfat"; "32769"; "/dev/sda1"]]); + ["mkfs_b"; "vfat"; "32769"; "/dev/sda1"]]), []; InitEmpty, Always, TestLastFail ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkfs_b"; "vfat"; "33280"; "/dev/sda1"]]); + ["mkfs_b"; "vfat"; "33280"; "/dev/sda1"]]), []; InitEmpty, IfAvailable "ntfsprogs", TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkfs_b"; "ntfs"; "32768"; "/dev/sda1"]]) + ["mkfs_b"; "ntfs"; "32768"; "/dev/sda1"]]), [] ]; shortdesc = "make a filesystem with block size"; longdesc = "\ @@ -6801,7 +6779,7 @@ the requested cluster size." }; ["mke2fs_J"; "ext2"; "4096"; "/dev/sda2"; "/dev/sda1"]; ["mount"; "/dev/sda2"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents") + ["cat"; "/new"]], "new file contents"), [] ]; shortdesc = "make ext2/3/4 external journal"; longdesc = "\ @@ -6824,7 +6802,7 @@ to the command: ["mke2fs_JL"; "ext2"; "4096"; "/dev/sda2"; "JOURNAL"]; ["mount"; "/dev/sda2"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents") + ["cat"; "/new"]], "new file contents"), [] ]; shortdesc = "make ext2/3/4 external journal with label"; longdesc = "\ @@ -6846,7 +6824,7 @@ This creates an ext2 external journal on C with label C." }; [["mkfs_btrfs"; "/dev/sda1"; ""; ""; "NOARG"; ""; "NOARG"; "NOARG"; ""; ""]; ["mount"; "/dev/sda1"; "/"]; ["btrfs_subvolume_create"; "/test1"]; - ["btrfs_subvolume_delete"; "/test1"]]) + ["btrfs_subvolume_delete"; "/test1"]]), [] ]; shortdesc = "delete a btrfs snapshot"; longdesc = "\ @@ -9905,7 +9878,7 @@ directory and the name of the snapshot, in the form C." }; style = RStructList ("subvolumes", "btrfssubvolume"), [Mountable_or_Path "fs"], []; proc_nr = Some 325; optional = Some "btrfs"; camel_name = "BTRFSSubvolumeList"; - tests = [] (* tested in tests/btrfs *); + test_excuse = "tested in tests/btrfs"; shortdesc = "list btrfs snapshots and subvolumes"; longdesc = "\ List the btrfs snapshots and subvolumes of the btrfs filesystem @@ -9916,7 +9889,7 @@ which is mounted at C." }; style = RErr, [Int64 "id"; Pathname "fs"], []; proc_nr = Some 326; optional = Some "btrfs"; camel_name = "BTRFSSubvolumeSetDefault"; - tests = [] (* tested in tests/btrfs *); + test_excuse = "tested in tests/btrfs"; shortdesc = "set default btrfs subvolume"; longdesc = "\ Set the subvolume of the btrfs filesystem C which will @@ -9934,7 +9907,7 @@ get a list of subvolumes." }; ["mount"; "/dev/sda1"; "/"]; ["btrfs_subvolume_create"; "/test1"]; ["btrfs_filesystem_sync"; "/test1"]; - ["btrfs_filesystem_balance"; "/test1"]]) + ["btrfs_filesystem_balance"; "/test1"]]), [] ]; shortdesc = "sync a btrfs filesystem"; longdesc = "\ @@ -9955,9 +9928,7 @@ across the underlying devices." }; style = RErr, [DeviceList "devices"; Pathname "fs"], []; proc_nr = Some 329; optional = Some "btrfs"; camel_name = "BTRFSDeviceAdd"; - tests = [] (* test disk isn't large enough to test this - thoroughly, so there is an external test in - 'tests/btrfs' directory. *); + test_excuse = "test disk isn't large enough to test this thoroughly, so there is an external test in 'tests/btrfs' directory"; shortdesc = "add devices to a btrfs filesystem"; longdesc = "\ Add the list of device(s) in C to the btrfs filesystem @@ -9968,9 +9939,7 @@ mounted at C. If C is an empty list, this does nothing." }; style = RErr, [DeviceList "devices"; Pathname "fs"], []; proc_nr = Some 330; optional = Some "btrfs"; camel_name = "BTRFSDeviceDelete"; - tests = [] (* test disk isn't large enough to test this - thoroughly, so there is an external test in - 'tests/btrfs' directory. *); + test_excuse = "test disk isn't large enough to test this thoroughly, so there is an external test in 'tests/btrfs' directory."; shortdesc = "remove devices from a btrfs filesystem"; longdesc = "\ Remove the C from the btrfs filesystem mounted at C. @@ -9985,7 +9954,7 @@ If C is an empty list, this does nothing." }; InitPartition, Always, TestRun ( [["mkfs_btrfs"; "/dev/sda1"; ""; ""; "NOARG"; ""; "NOARG"; "NOARG"; ""; ""]; ["btrfs_set_seeding"; "/dev/sda1"; "true"]; - ["btrfs_set_seeding"; "/dev/sda1"; "false"]]) + ["btrfs_set_seeding"; "/dev/sda1"; "false"]]), [] ]; shortdesc = "enable or disable the seeding feature of device"; longdesc = "\ @@ -10000,7 +9969,7 @@ a btrfs filesystem." }; tests = [ InitPartition, Always, TestRun ( [["mkfs_btrfs"; "/dev/sda1"; ""; ""; "NOARG"; ""; "NOARG"; "NOARG"; ""; ""]; - ["btrfs_fsck"; "/dev/sda1"; ""; ""]]) + ["btrfs_fsck"; "/dev/sda1"; ""; ""]]), [] ]; shortdesc = "check a btrfs filesystem"; longdesc = "\ @@ -10060,7 +10029,7 @@ instead of, or after calling C." }; proc_nr = Some 335; tests = [ InitEmpty, Always, TestResult ( - [["device_index"; "/dev/sda"]], "ret == 0") + [["device_index"; "/dev/sda"]], "ret == 0"), [] ]; shortdesc = "convert device to index"; longdesc = "\ @@ -10078,7 +10047,7 @@ See also C, C." }; proc_nr = Some 336; tests = [ InitEmpty, Always, TestResult ( - [["nr_devices"]], "ret == 4") + [["nr_devices"]], "ret == 4"), [] ]; shortdesc = "return number of whole block devices (disks) added"; longdesc = "\ @@ -10099,7 +10068,7 @@ call C." }; [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["mount"; "/dev/sda1"; "/"]; - ["xfs_info"; "/"]], "ret->xfs_blocksize == 4096") + ["xfs_info"; "/"]], "ret->xfs_blocksize == 4096"), [] ]; shortdesc = "get geometry of XFS filesystem"; longdesc = "\ @@ -10119,7 +10088,7 @@ string." }; InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; - ["pvchange_uuid"; "/dev/sda1"]]) + ["pvchange_uuid"; "/dev/sda1"]]), [] ]; shortdesc = "generate a new random UUID for a physical volume"; longdesc = "\ @@ -10134,7 +10103,7 @@ Generate a new random UUID for the physical volume C." }; InitEmpty, Always, TestRun ( [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; - ["pvchange_uuid_all"]]) + ["pvchange_uuid_all"]]), [] ]; shortdesc = "generate new random UUIDs for all physical volumes"; longdesc = "\ @@ -10150,7 +10119,7 @@ Generate new random UUIDs for all physical volumes." }; [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; ["vgcreate"; "VG"; "/dev/sda1"]; - ["vgchange_uuid"; "/dev/VG"]]) + ["vgchange_uuid"; "/dev/VG"]]), [] ]; shortdesc = "generate a new random UUID for a volume group"; longdesc = "\ @@ -10166,7 +10135,7 @@ Generate a new random UUID for the volume group C." }; [["part_disk"; "/dev/sda"; "mbr"]; ["pvcreate"; "/dev/sda1"]; ["vgcreate"; "VG"; "/dev/sda1"]; - ["vgchange_uuid_all"]]) + ["vgchange_uuid_all"]]), [] ]; shortdesc = "generate new random UUIDs for all volume groups"; longdesc = "\ @@ -10178,7 +10147,7 @@ Generate new random UUIDs for all volume groups." }; proc_nr = Some 342; tests = [ InitEmpty, Always, TestRun ( - [["utsname"]]) + [["utsname"]]), [] ]; shortdesc = "appliance kernel version"; longdesc = "\ @@ -10201,7 +10170,7 @@ in the returned structure is defined by the API." }; ["lvresize"; "/dev/VG/LV"; "80"]; ["mount"; "/dev/VG/LV"; "/"]; ["xfs_growfs"; "/"; "true"; "false"; "false"; ""; ""; ""; ""; ""]; - ["xfs_info"; "/"]], "ret->xfs_blocksize == 4096"); + ["xfs_info"; "/"]], "ret->xfs_blocksize == 4096"), []; ]; shortdesc = "expand an existing XFS filesystem"; longdesc = "\ @@ -10216,7 +10185,7 @@ string." }; style = RErr, [Pathname "src"; Pathname "dest"], [OBool "archive"; OBool "deletedest"]; proc_nr = Some 344; optional = Some "rsync"; - tests = []; (* tests are in tests/rsync *) + test_excuse = "tests are in tests/rsync"; shortdesc = "synchronize the contents of two directories"; longdesc = "\ This call may be used to copy or synchronize two directories @@ -10247,7 +10216,7 @@ Delete files at the destination that do not exist at the source. style = RErr, [String "remote"; Pathname "dest"], [OBool "archive"; OBool "deletedest"]; proc_nr = Some 345; optional = Some "rsync"; - tests = []; (* tests are in tests/rsync *) + test_excuse = "tests are in tests/rsync"; shortdesc = "synchronize host or remote filesystem with filesystem"; longdesc = "\ This call may be used to copy or synchronize the filesystem @@ -10273,7 +10242,7 @@ The optional arguments are the same as those of C." }; style = RErr, [Pathname "src"; String "remote"], [OBool "archive"; OBool "deletedest"]; proc_nr = Some 346; optional = Some "rsync"; - tests = []; (* tests are in tests/rsync *) + test_excuse = "tests are in tests/rsync"; shortdesc = "synchronize filesystem with host or remote filesystem"; longdesc = "\ This call may be used to copy or synchronize the filesystem within @@ -10330,7 +10299,7 @@ with zeroes)." }; ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["xfs_admin"; "/dev/sda1"; ""; ""; ""; ""; "false"; "NOARG"; "NOARG"]; ["mount"; "/dev/sda1"; "/"]; - ["xfs_info"; "/"]], "ret->xfs_lazycount == 0"); + ["xfs_info"; "/"]], "ret->xfs_lazycount == 0"), []; ]; shortdesc = "change parameters of an XFS filesystem"; longdesc = "\ @@ -10356,8 +10325,7 @@ C calls." }; ["hivex_root"]; (* in this hive, it returns 0x1020 *) ["hivex_node_name"; "0x1020"]; ["hivex_node_children"; "0x1020"]; - ["hivex_node_values"; "0x1020"]; - ["hivex_close"]]) + ["hivex_node_values"; "0x1020"]]), [["hivex_close"]] ]; shortdesc = "open a Windows Registry hive file"; longdesc = "\ @@ -10502,14 +10470,12 @@ See also: C." }; InitScratchFS, Always, TestRun ( [["upload"; "$srcdir/../data/minimal"; "/hivex_commit1"]; ["hivex_open"; "/hivex_commit1"; ""; ""; "true"]; - ["hivex_commit"; "NULL"]; - ["hivex_close"]]); + ["hivex_commit"; "NULL"]]), [["hivex_close"]]; InitScratchFS, Always, TestResultTrue ( [["upload"; "$srcdir/../data/minimal"; "/hivex_commit2"]; ["hivex_open"; "/hivex_commit2"; ""; ""; "true"]; ["hivex_commit"; "/hivex_commit2_copy"]; - ["hivex_close"]; - ["is_file"; "/hivex_commit2_copy"; "false"]]) + ["is_file"; "/hivex_commit2_copy"; "false"]]), [["hivex_close"]] ]; shortdesc = "commit (write) changes back to the hive"; longdesc = "\ @@ -10566,7 +10532,7 @@ This is a wrapper around the L call of the same name." }; [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; ["xfs_repair"; "/dev/sda1"; ""; "true"; ""; ""; ""; ""; ""; ""; "NOARG"; "NOARG"] - ]) + ]), [] ]; shortdesc = "repair an XFS filesystem"; longdesc = "\ @@ -10594,11 +10560,11 @@ detected (returns C<1>) or was not detected (returns C<0>)." }; ["touch"; "/rm_f/foo"]; ["rm_f"; "/rm_f/foo"]; ["rm_f"; "/rm_f/not_exists"]; - ["exists"; "/rm_f/foo"]]; + ["exists"; "/rm_f/foo"]], []; InitScratchFS, Always, TestLastFail [["mkdir"; "/rm_f2"]; ["mkdir"; "/rm_f2/foo"]; - ["rm_f"; "/rm_f2/foo"]] + ["rm_f"; "/rm_f2/foo"]], [] ]; shortdesc = "remove a file ignoring errors"; longdesc = "\ @@ -10640,7 +10606,7 @@ or C to remove directories recursively." }; ""; ""; ""]; ["mount"; "/dev/sda2"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents"); + ["cat"; "/new"]], "new file contents"), []; InitEmpty, Always, TestResultString ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; @@ -10663,7 +10629,7 @@ or C to remove directories recursively." }; ""; ""; ""]; ["mount"; "/dev/sda2"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents"); + ["cat"; "/new"]], "new file contents"), []; InitEmpty, Always, TestResultString ( [["part_init"; "/dev/sda"; "mbr"]; ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; @@ -10686,7 +10652,7 @@ or C to remove directories recursively." }; ""; ""; ""]; ["mount"; "/dev/sda2"; "/"]; ["write"; "/new"; "new file contents"]; - ["cat"; "/new"]], "new file contents") + ["cat"; "/new"]], "new file contents"), [] ]); shortdesc = "create an ext2/ext3/ext4 filesystem on device"; longdesc = "\ @@ -10699,7 +10665,6 @@ C." (* XXX document optional args properly *) }; name = "list_disk_labels"; style = RHashtable "labels", [], []; proc_nr = Some 369; - tests = []; shortdesc = "mapping of disk labels to devices"; longdesc = "\ If you add drives using the optional C