summaryrefslogtreecommitdiffstats
path: root/tests.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:27:52 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:27:52 +0100
commit24bee20ce4196d45891925332a47a05aa5e40938 (patch)
tree434b56343dde38ae0c877cab236ada753e2f8549 /tests.c
parent8c60f5c681b5d7cf90bc798fcaf94cd4e242e27f (diff)
downloadlibguestfs-24bee20ce4196d45891925332a47a05aa5e40938.tar.gz
libguestfs-24bee20ce4196d45891925332a47a05aa5e40938.tar.xz
libguestfs-24bee20ce4196d45891925332a47a05aa5e40938.zip
Generated code for dmesg command.
Diffstat (limited to 'tests.c')
-rw-r--r--tests.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/tests.c b/tests.c
index 082068a3..e494d9c3 100644
--- a/tests.c
+++ b/tests.c
@@ -112,6 +112,35 @@ static void no_test_warnings (void)
fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
}
+static int test_dmesg_0 (void)
+{
+ /* InitEmpty for dmesg (0) */
+ {
+ int r;
+ suppress_error = 0;
+ r = guestfs_umount_all (g);
+ if (r == -1)
+ return -1;
+ }
+ {
+ int r;
+ suppress_error = 0;
+ r = guestfs_lvm_remove_all (g);
+ if (r == -1)
+ return -1;
+ }
+ /* TestRun for dmesg (0) */
+ {
+ char *r;
+ suppress_error = 0;
+ r = guestfs_dmesg (g);
+ if (r == NULL)
+ return -1;
+ free (r);
+ }
+ return 0;
+}
+
static int test_drop_caches_0 (void)
{
/* InitEmpty for drop_caches (0) */
@@ -7263,9 +7292,15 @@ int main (int argc, char *argv[])
exit (1);
}
- nr_tests = 102;
+ nr_tests = 103;
test_num++;
+ printf ("%3d/%3d test_dmesg_0\n", test_num, nr_tests);
+ if (test_dmesg_0 () == -1) {
+ printf ("test_dmesg_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
printf ("%3d/%3d test_drop_caches_0\n", test_num, nr_tests);
if (test_drop_caches_0 () == -1) {
printf ("test_drop_caches_0 FAILED\n");