X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=tests.c;h=3adf389ab84080a64f3a0a04fecb1d8cfdedeca8;hb=8c3b820c2b687345448e3d74a7101b07ff32688e;hp=082068a37e84642b89bc6fc1c8be88ac8b02835e;hpb=9222136ac9b2e404dba128b1ac74dacaa8bf1038;p=libguestfs.git diff --git a/tests.c b/tests.c index 082068a..3adf389 100644 --- a/tests.c +++ b/tests.c @@ -112,6 +112,63 @@ static void no_test_warnings (void) fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n"); } +static int test_ping_daemon_0 (void) +{ + /* InitEmpty for ping_daemon (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 ping_daemon (0) */ + { + int r; + suppress_error = 0; + r = guestfs_ping_daemon (g); + if (r == -1) + return -1; + } + return 0; +} + +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 +7320,21 @@ int main (int argc, char *argv[]) exit (1); } - nr_tests = 102; + nr_tests = 104; test_num++; + printf ("%3d/%3d test_ping_daemon_0\n", test_num, nr_tests); + if (test_ping_daemon_0 () == -1) { + printf ("test_ping_daemon_0 FAILED\n"); + failed++; + } + 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");