X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=88c0afeffc7e2deffd6f330dc03da00e8f9c9a00;hp=04445ee6c7177731bfe3e799ae13ff4d0fed7103;hb=632012e6419f04fab93909f92ecbab5a2c590447;hpb=36f9dac1a2530b575dab9226f6ddd85e6e8c8590 diff --git a/src/generator.ml b/src/generator.ml index 04445ee..88c0afe 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1683,6 +1683,98 @@ How many blocks are zeroed isn't specified (but it's I enough to securely wipe the device). It should be sufficient to remove any partition tables, filesystem superblocks and so on."); + ("grub_install", (RErr, [String "root"; String "device"]), 86, [], + [InitBasicFS, TestOutputTrue ( + [["grub_install"; "/"; "/dev/sda1"]; + ["is_dir"; "/boot"]])], + "install GRUB", + "\ +This command installs GRUB (the Grand Unified Bootloader) on +C, with the root directory being C."); + + ("cp", (RErr, [String "src"; String "dest"]), 87, [], + [InitBasicFS, TestOutput ( + [["write_file"; "/old"; "file content"; "0"]; + ["cp"; "/old"; "/new"]; + ["cat"; "/new"]], "file content"); + InitBasicFS, TestOutputTrue ( + [["write_file"; "/old"; "file content"; "0"]; + ["cp"; "/old"; "/new"]; + ["is_file"; "/old"]]); + InitBasicFS, TestOutput ( + [["write_file"; "/old"; "file content"; "0"]; + ["mkdir"; "/dir"]; + ["cp"; "/old"; "/dir/new"]; + ["cat"; "/dir/new"]], "file content")], + "copy a file", + "\ +This copies a file from C to C where C is +either a destination filename or destination directory."); + + ("cp_a", (RErr, [String "src"; String "dest"]), 88, [], + [InitBasicFS, TestOutput ( + [["mkdir"; "/olddir"]; + ["mkdir"; "/newdir"]; + ["write_file"; "/olddir/file"; "file content"; "0"]; + ["cp_a"; "/olddir"; "/newdir"]; + ["cat"; "/newdir/olddir/file"]], "file content")], + "copy a file or directory recursively", + "\ +This copies a file or directory from C to C +recursively using the C command."); + + ("mv", (RErr, [String "src"; String "dest"]), 89, [], + [InitBasicFS, TestOutput ( + [["write_file"; "/old"; "file content"; "0"]; + ["mv"; "/old"; "/new"]; + ["cat"; "/new"]], "file content"); + InitBasicFS, TestOutputFalse ( + [["write_file"; "/old"; "file content"; "0"]; + ["mv"; "/old"; "/new"]; + ["is_file"; "/old"]])], + "move a file", + "\ +This moves a file from C to C where C is +either a destination filename or destination directory."); + + ("drop_caches", (RErr, [Int "whattodrop"]), 90, [], + [InitEmpty, TestRun ( + [["drop_caches"; "3"]])], + "drop kernel page cache, dentries and inodes", + "\ +This instructs the guest kernel to drop its page cache, +and/or dentries and inode caches. The parameter C +tells the kernel what precisely to drop, see +L + +Setting C to 3 should drop everything. + +This automatically calls L before the operation, +so that the maximum guest memory is freed."); + + ("dmesg", (RString "kmsgs", []), 91, [], + [InitEmpty, TestRun ( + [["dmesg"]])], + "return kernel messages", + "\ +This returns the kernel messages (C output) from +the guest kernel. This is sometimes useful for extended +debugging of problems. + +Another way to get the same information is to enable +verbose messages with C or by setting +the environment variable C before +running the program."); + + ("ping_daemon", (RErr, []), 92, [], + [InitEmpty, TestRun ( + [["ping_daemon"]])], + "ping the guest daemon", + "\ +This is a test probe into the guestfs daemon running inside +the qemu subprocess. Calling this function checks that the +daemon responds to the ping message, without affecting the daemon +or attached block device(s) in any other way."); ]