static guestfs_h *g;
static int suppress_error = 0;
-/* This will be 's' or 'h' depending on whether the guest kernel
- * names IDE devices /dev/sd* or /dev/hd*.
- */
-static char devchar = 's';
+static void print_error (guestfs_h *g, void *data, const char *msg)
+{
+ if (!suppress_error)
+ fprintf (stderr, "%s\n", msg);
+}
+
+static void print_strings (char * const * const argv)
+{
+ int argc;
+
+ for (argc = 0; argv[argc] != NULL; ++argc)
+ printf ("\t%s\n", argv[argc]);
+}
+
+/*
+static void print_table (char * const * const argv)
+{
+ int i;
+
+ for (i = 0; argv[i] != NULL; i += 2)
+ printf ("%s: %s\n", argv[i], argv[i+1]);
+}
+*/
+
+static void no_test_warnings (void)
+{
+ fprintf (stderr, "warning: \"guestfs_test0\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rint\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rinterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rint64\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rint64err\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rbool\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rboolerr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rconststring\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rconststringerr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstring\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstringerr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstringlist\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstringlisterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rintbool\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rintboolerr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rpvlist\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rpvlisterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rvglist\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rvglisterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rlvlist\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rlvlisterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstat\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstaterr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstatvfs\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rstatvfserr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rhashtable\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_test0rhashtableerr\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_launch\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_wait_ready\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_kill_subprocess\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_add_drive\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_add_cdrom\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_add_drive_ro\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_config\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_qemu\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_qemu\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_path\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_path\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_append\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_append\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_autosync\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_autosync\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_verbose\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_verbose\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_is_ready\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_is_config\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_is_launching\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_is_busy\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_state\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_busy\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_set_ready\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_end_busy\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_ll\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_pvs_full\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_vgs_full\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_lvs_full\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_init\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_close\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_defvar\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_defnode\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_get\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_set\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_insert\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_rm\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_mv\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_match\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_save\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_load\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_aug_ls\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_chmod\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_chown\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sfdisk\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_lvm_remove_all\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_tune2fs_l\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_blockdev_setbsz\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_tar_out\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_tgz_out\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_mount_options\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_mount_vfs\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_debug\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_e2label\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_pvresize\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sfdisk_N\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sfdisk_l\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sfdisk_kernel_geometry\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sfdisk_disk_geometry\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_vg_activate_all\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_vg_activate\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_resize2fs\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sh\" has no tests\n");
+ fprintf (stderr, "warning: \"guestfs_sh_lines\" has no tests\n");
+}
+
+static int test_glob_expand_0_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_GLOB_EXPAND_0");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_GLOB_EXPAND");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_glob_expand_0 (void)
+{
+ if (test_glob_expand_0_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_0");
+ return 0;
+ }
+
+ /* InitBasicFS for test_glob_expand_0: create ext2 on /dev/sda1 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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;
+ }
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext2";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ /* TestOutputList for glob_expand (0) */
+ {
+ char path[] = "/a/b/c";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkdir_p (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/d";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/e";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char pattern[] = "/a/b/c/*";
+ char **r;
+ int i;
+ suppress_error = 0;
+ r = guestfs_glob_expand (g, pattern);
+ if (r == NULL)
+ return -1;
+ if (!r[0]) {
+ fprintf (stderr, "test_glob_expand_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "/a/b/c/d";
+ if (strcmp (r[0], expected) != 0) {
+ fprintf (stderr, "test_glob_expand_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+ return -1;
+ }
+ }
+ if (!r[1]) {
+ fprintf (stderr, "test_glob_expand_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "/a/b/c/e";
+ if (strcmp (r[1], expected) != 0) {
+ fprintf (stderr, "test_glob_expand_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+ return -1;
+ }
+ }
+ if (r[2] != NULL) {
+ fprintf (stderr, "test_glob_expand_0: extra elements returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ for (i = 0; r[i] != NULL; ++i)
+ free (r[i]);
+ free (r);
+ }
+ return 0;
+}
+
+static int test_glob_expand_1_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_GLOB_EXPAND_1");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_GLOB_EXPAND");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_glob_expand_1 (void)
+{
+ if (test_glob_expand_1_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_1");
+ return 0;
+ }
+
+ /* InitBasicFS for test_glob_expand_1: create ext2 on /dev/sda1 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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;
+ }
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext2";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ /* TestOutputList for glob_expand (1) */
+ {
+ char path[] = "/a/b/c";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkdir_p (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/d";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/e";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char pattern[] = "/a/*/c/*";
+ char **r;
+ int i;
+ suppress_error = 0;
+ r = guestfs_glob_expand (g, pattern);
+ if (r == NULL)
+ return -1;
+ if (!r[0]) {
+ fprintf (stderr, "test_glob_expand_1: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "/a/b/c/d";
+ if (strcmp (r[0], expected) != 0) {
+ fprintf (stderr, "test_glob_expand_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+ return -1;
+ }
+ }
+ if (!r[1]) {
+ fprintf (stderr, "test_glob_expand_1: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "/a/b/c/e";
+ if (strcmp (r[1], expected) != 0) {
+ fprintf (stderr, "test_glob_expand_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+ return -1;
+ }
+ }
+ if (r[2] != NULL) {
+ fprintf (stderr, "test_glob_expand_1: extra elements returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ for (i = 0; r[i] != NULL; ++i)
+ free (r[i]);
+ free (r);
+ }
+ return 0;
+}
+
+static int test_glob_expand_2_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_GLOB_EXPAND_2");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_GLOB_EXPAND");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_glob_expand_2 (void)
+{
+ if (test_glob_expand_2_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_2");
+ return 0;
+ }
+
+ /* InitBasicFS for test_glob_expand_2: create ext2 on /dev/sda1 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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;
+ }
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext2";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ /* TestOutputList for glob_expand (2) */
+ {
+ char path[] = "/a/b/c";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkdir_p (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/d";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/a/b/c/e";
+ int r;
+ suppress_error = 0;
+ r = guestfs_touch (g, path);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char pattern[] = "/a/*/x/*";
+ char **r;
+ int i;
+ suppress_error = 0;
+ r = guestfs_glob_expand (g, pattern);
+ if (r == NULL)
+ return -1;
+ if (r[0] != NULL) {
+ fprintf (stderr, "test_glob_expand_2: extra elements returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ for (i = 0; r[i] != NULL; ++i)
+ free (r[i]);
+ free (r);
+ }
+ return 0;
+}
+
+static int test_ntfs_3g_probe_0_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE_0");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_ntfs_3g_probe_0 (void)
+{
+ if (test_ntfs_3g_probe_0_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_0");
+ return 0;
+ }
+
+ /* InitNone|InitEmpty for test_ntfs_3g_probe_0 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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;
+ }
+ /* TestOutputInt for ntfs_3g_probe (0) */
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ntfs";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_ntfs_3g_probe (g, 1, device);
+ if (r == -1)
+ return -1;
+ if (r != 0) {
+ fprintf (stderr, "test_ntfs_3g_probe_0: expected 0 but got %d\n", (int) r);
+ return -1;
+ }
+ }
+ return 0;
+}
-static void print_error (guestfs_h *g, void *data, const char *msg)
+static int test_ntfs_3g_probe_1_skip (void)
{
- if (!suppress_error)
- fprintf (stderr, "%s\n", msg);
+ const char *str;
+
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE_1");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
}
-static void print_strings (char * const * const argv)
+static int test_ntfs_3g_probe_1 (void)
{
- int argc;
+ if (test_ntfs_3g_probe_1_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_1");
+ return 0;
+ }
- for (argc = 0; argv[argc] != NULL; ++argc)
- printf ("\t%s\n", argv[argc]);
+ /* InitNone|InitEmpty for test_ntfs_3g_probe_1 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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;
+ }
+ /* TestOutputInt for ntfs_3g_probe (1) */
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext2";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_ntfs_3g_probe (g, 1, device);
+ if (r == -1)
+ return -1;
+ if (r != 12) {
+ fprintf (stderr, "test_ntfs_3g_probe_1: expected 12 but got %d\n", (int) r);
+ return -1;
+ }
+ }
+ return 0;
}
-/*
-static void print_table (char * const * const argv)
+static int test_sleep_0_skip (void)
{
- int i;
+ const char *str;
- for (i = 0; argv[i] != NULL; i += 2)
- printf ("%s: %s\n", argv[i], argv[i+1]);
+ str = getenv ("SKIP_TEST_SLEEP_0");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_SLEEP");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
}
-*/
-static void no_test_warnings (void)
+static int test_sleep_0 (void)
{
- fprintf (stderr, "warning: \"guestfs_test0\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rint\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rinterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rint64\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rint64err\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rbool\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rboolerr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rconststring\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rconststringerr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstring\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstringerr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstringlist\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstringlisterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rintbool\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rintboolerr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rpvlist\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rpvlisterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rvglist\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rvglisterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rlvlist\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rlvlisterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstat\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstaterr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstatvfs\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rstatvfserr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rhashtable\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_test0rhashtableerr\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_launch\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_wait_ready\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_kill_subprocess\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_add_drive\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_add_cdrom\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_config\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_qemu\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_qemu\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_path\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_path\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_append\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_append\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_autosync\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_autosync\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_verbose\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_verbose\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_is_ready\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_is_config\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_is_launching\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_is_busy\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_state\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_busy\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_set_ready\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_end_busy\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_ll\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_pvs_full\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_vgs_full\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_lvs_full\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_init\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_close\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_defvar\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_defnode\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_get\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_set\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_insert\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_rm\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_mv\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_match\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_save\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_load\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_aug_ls\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_chmod\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_chown\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_sfdisk\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_lvm_remove_all\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_tune2fs_l\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_blockdev_setbsz\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_tar_out\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_tgz_out\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_mount_options\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_mount_vfs\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_debug\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_e2label\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_get_e2uuid\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_pvresize\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_sfdisk_N\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_sfdisk_l\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_sfdisk_kernel_geometry\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_sfdisk_disk_geometry\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_vg_activate_all\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_vg_activate\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_resize2fs\" has no tests\n");
- fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
+ if (test_sleep_0_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_sleep_0");
+ return 0;
+ }
+
+ /* InitNone|InitEmpty for test_sleep_0 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ 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 sleep (0) */
+ {
+ int r;
+ suppress_error = 0;
+ r = guestfs_sleep (g, 1);
+ if (r == -1)
+ return -1;
+ }
+ return 0;
}
static int test_find_0_skip (void)
/* InitBasicFS for test_find_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_find_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_find_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_lvresize_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
char expected[] = "test content";
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_zerofree_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
char expected[] = "test file";
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext3";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
}
{
char pathordevice[] = "/dev/sda1";
- pathordevice[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_umount (g, pathordevice);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_zerofree (g, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_hexdump_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_strings_e_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_strings_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_strings_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_equal_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_equal_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_equal_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_ping_daemon_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* InitNone|InitEmpty for test_dmesg_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* InitNone|InitEmpty for test_drop_caches_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* InitBasicFS for test_mv_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mv_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_cp_a_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_cp_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_cp_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_cp_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_grub_install_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
{
char root[] = "/";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_grub_install (g, root, device);
/* InitBasicFS for test_zero_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
char expected[] = "data";
{
char pathordevice[] = "/dev/sda1";
- pathordevice[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_umount (g, pathordevice);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_zero (g, device);
}
{
char path[] = "/dev/sda1";
- path[5] = devchar;
char *r;
suppress_error = 0;
r = guestfs_file (g, path);
/* InitBasicFS for test_fsck_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* TestOutputInt for fsck (0) */
{
char pathordevice[] = "/dev/sda1";
- pathordevice[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_umount (g, pathordevice);
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_fsck (g, fstype, device);
/* InitBasicFS for test_fsck_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* TestOutputInt for fsck (1) */
{
char pathordevice[] = "/dev/sda1";
- pathordevice[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_umount (g, pathordevice);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_zero (g, device);
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_fsck (g, fstype, device);
/* InitBasicFS for test_set_e2uuid_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
char expected[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char *r;
suppress_error = 0;
r = guestfs_get_e2uuid (g, device);
/* InitBasicFS for test_set_e2uuid_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
char expected[] = "";
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char uuid[] = "clear";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char *r;
suppress_error = 0;
r = guestfs_get_e2uuid (g, device);
/* InitBasicFS for test_set_e2uuid_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* TestRun for set_e2uuid (2) */
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char uuid[] = "random";
int r;
suppress_error = 0;
/* InitBasicFS for test_set_e2uuid_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* TestRun for set_e2uuid (3) */
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char uuid[] = "time";
int r;
suppress_error = 0;
/* InitBasicFS for test_set_e2label_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
char expected[] = "testlabel";
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char label[] = "testlabel";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char *r;
suppress_error = 0;
r = guestfs_get_e2label (g, device);
/* InitNone|InitEmpty for test_pvremove_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for pvremove (0) */
+ /* TestOutputListOfDevices for pvremove (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvremove (g, device);
/* InitNone|InitEmpty for test_pvremove_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for pvremove (1) */
+ /* TestOutputListOfDevices for pvremove (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvremove (g, device);
/* InitNone|InitEmpty for test_pvremove_2 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for pvremove (2) */
+ /* TestOutputListOfDevices for pvremove (2) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvremove (g, device);
/* InitNone|InitEmpty for test_vgremove_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for vgremove (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_vgremove_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for vgremove (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_lvremove_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for lvremove (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_lvremove_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for lvremove (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_lvremove_2 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for lvremove (2) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitBasicFS for test_mount_ro_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mount_ro_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_tgz_in_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_tar_in_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_4: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_5: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_6: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_7: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_checksum_8: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* TestOutput for checksum (8) */
char expected[] = "46d6ca27ee07cdc6fa99c2e138cc522c";
{
+ char options[] = "ro";
+ char vfstype[] = "squashfs";
char device[] = "/dev/sdd";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
- r = guestfs_mount (g, device, mountpoint);
+ r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
if (r == -1)
return -1;
}
/* InitBasicFS for test_download_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_upload_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_blockdev_rereadpt_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestRun for blockdev_rereadpt (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_rereadpt (g, device);
/* InitNone|InitEmpty for test_blockdev_flushbufs_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestRun for blockdev_flushbufs (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_flushbufs (g, device);
/* InitNone|InitEmpty for test_blockdev_getsize64_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputInt for blockdev_getsize64 (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int64_t r;
suppress_error = 0;
r = guestfs_blockdev_getsize64 (g, device);
/* InitNone|InitEmpty for test_blockdev_getsz_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputInt for blockdev_getsz (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int64_t r;
suppress_error = 0;
r = guestfs_blockdev_getsz (g, device);
/* InitNone|InitEmpty for test_blockdev_getbsz_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputInt for blockdev_getbsz (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_getbsz (g, device);
/* InitNone|InitEmpty for test_blockdev_getss_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputInt for blockdev_getss (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_getss (g, device);
/* InitNone|InitEmpty for test_blockdev_getro_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputTrue for blockdev_getro (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setro (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_getro (g, device);
/* InitNone|InitEmpty for test_blockdev_setrw_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputFalse for blockdev_setrw (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_getro (g, device);
/* InitNone|InitEmpty for test_blockdev_setro_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputTrue for blockdev_setro (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setro (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_getro (g, device);
/* InitBasicFS for test_statvfs_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_lstat_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_stat_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_4: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_5: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_6: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_7: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_8: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_9: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_lines_10: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_4: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_5: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_6: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_7: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_8: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_9: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_10: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_command_11: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_file_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_file_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_file_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_umount_all_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_umount_all_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for umount_all (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
{
char fstype[] = "ext2";
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
{
char fstype[] = "ext2";
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
char mountpoint[] = "/mp1";
int r;
suppress_error = 0;
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
char mountpoint[] = "/mp1/mp2";
int r;
suppress_error = 0;
/* InitBasicFS for test_mounts_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
if (r == -1)
return -1;
}
- /* TestOutputList for mounts (0) */
+ /* TestOutputListOfDevices for mounts (0) */
{
char **r;
int i;
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_mounts_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
/* InitNone|InitEmpty for test_umount_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for umount (0) */
+ /* TestOutputListOfDevices for umount (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_umount_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
/* InitNone|InitEmpty for test_umount_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for umount (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_4: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_write_file_5: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_mkfs_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
char expected[] = "new file contents";
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_lvcreate_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for lvcreate (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG1";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char physvols_1[] = "/dev/sda2";
- physvols_1[5] = devchar;
char *physvols[] = {
physvols_0,
physvols_1,
{
char volgroup[] = "VG2";
char physvols_0[] = "/dev/sda3";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_vgcreate_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for vgcreate (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG1";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char physvols_1[] = "/dev/sda2";
- physvols_1[5] = devchar;
char *physvols[] = {
physvols_0,
physvols_1,
{
char volgroup[] = "VG2";
char physvols_0[] = "/dev/sda3";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_pvcreate_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for pvcreate (0) */
+ /* TestOutputListOfDevices for pvcreate (0) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
}
{
char expected[] = "/dev/sda2";
- expected[5] = devchar;
+ r[1][5] = 's';
if (strcmp (r[1], expected) != 0) {
fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
return -1;
}
{
char expected[] = "/dev/sda3";
- expected[5] = devchar;
+ r[2][5] = 's';
if (strcmp (r[2], expected) != 0) {
fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
return -1;
/* InitBasicFS for test_is_dir_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_is_dir_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_is_file_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_is_file_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_exists_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_exists_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_p_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_p_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_p_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_p_3: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_p_4: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_mkdir_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rm_rf_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rmdir_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rmdir_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rmdir_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rm_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rm_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_rm_2: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_read_lines_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_read_lines_1: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFSonLVM for test_lvs_0: create ext2 on /dev/VG/LV */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_lvs_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for lvs (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG1";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char physvols_1[] = "/dev/sda2";
- physvols_1[5] = devchar;
char *physvols[] = {
physvols_0,
physvols_1,
{
char volgroup[] = "VG2";
char physvols_0[] = "/dev/sda3";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitBasicFSonLVM for test_vgs_0: create ext2 on /dev/VG/LV */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitNone|InitEmpty for test_vgs_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* TestOutputList for vgs (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG1";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char physvols_1[] = "/dev/sda2";
- physvols_1[5] = devchar;
char *physvols[] = {
physvols_0,
physvols_1,
{
char volgroup[] = "VG2";
char physvols_0[] = "/dev/sda3";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
/* InitBasicFSonLVM for test_pvs_0: create ext2 on /dev/VG/LV */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
{
char volgroup[] = "VG";
char physvols_0[] = "/dev/sda1";
- physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
NULL
if (r == -1)
return -1;
}
- /* TestOutputList for pvs (0) */
+ /* TestOutputListOfDevices for pvs (0) */
{
char **r;
int i;
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_pvs_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
/* InitNone|InitEmpty for test_pvs_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for pvs (1) */
+ /* TestOutputListOfDevices for pvs (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda2";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char device[] = "/dev/sda3";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
}
{
char expected[] = "/dev/sda2";
- expected[5] = devchar;
+ r[1][5] = 's';
if (strcmp (r[1], expected) != 0) {
fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
return -1;
}
{
char expected[] = "/dev/sda3";
- expected[5] = devchar;
+ r[2][5] = 's';
if (strcmp (r[2], expected) != 0) {
fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
return -1;
/* InitBasicFS for test_list_partitions_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
if (r == -1)
return -1;
}
- /* TestOutputList for list_partitions (0) */
+ /* TestOutputListOfDevices for list_partitions (0) */
{
char **r;
int i;
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_list_partitions_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
/* InitNone|InitEmpty for test_list_partitions_1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for list_partitions (1) */
+ /* TestOutputListOfDevices for list_partitions (1) */
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",10";
char lines_1[] = ",20";
char lines_2[] = ",";
}
{
char expected[] = "/dev/sda1";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
}
{
char expected[] = "/dev/sda2";
- expected[5] = devchar;
+ r[1][5] = 's';
if (strcmp (r[1], expected) != 0) {
fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
return -1;
}
{
char expected[] = "/dev/sda3";
- expected[5] = devchar;
+ r[2][5] = 's';
if (strcmp (r[2], expected) != 0) {
fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
return -1;
/* InitNone|InitEmpty for test_list_devices_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
if (r == -1)
return -1;
}
- /* TestOutputList for list_devices (0) */
+ /* TestOutputListOfDevices for list_devices (0) */
{
char **r;
int i;
}
{
char expected[] = "/dev/sda";
- expected[5] = devchar;
+ r[0][5] = 's';
if (strcmp (r[0], expected) != 0) {
fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
return -1;
}
{
char expected[] = "/dev/sdb";
- expected[5] = devchar;
+ r[1][5] = 's';
if (strcmp (r[1], expected) != 0) {
fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
return -1;
}
{
char expected[] = "/dev/sdc";
- expected[5] = devchar;
+ r[2][5] = 's';
if (strcmp (r[2], expected) != 0) {
fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
return -1;
}
{
char expected[] = "/dev/sdd";
- expected[5] = devchar;
+ r[3][5] = 's';
if (strcmp (r[3], expected) != 0) {
fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
return -1;
/* InitBasicFS for test_ls_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_cat_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitBasicFS for test_touch_0: create ext2 on /dev/sda1 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
}
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
/* InitNone|InitEmpty for test_sync_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
/* InitNone|InitEmpty for test_mount_0 */
{
char device[] = "/dev/sda";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_blockdev_setrw (g, device);
char expected[] = "new file contents";
{
char device[] = "/dev/sda";
- device[5] = devchar;
char lines_0[] = ",";
char *lines[] = {
lines_0,
{
char fstype[] = "ext2";
char device[] = "/dev/sda1";
- device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_mkfs (g, fstype, device);
}
{
char device[] = "/dev/sda1";
- device[5] = devchar;
char mountpoint[] = "/";
int r;
suppress_error = 0;
{
char c = 0;
int failed = 0;
- const char *srcdir;
const char *filename;
- int fd, i;
+ int fd;
int nr_tests, test_num = 0;
- char **devs;
no_test_warnings ();
exit (1);
}
- if (guestfs_add_drive (g, "../images/test.sqsh") == -1) {
- printf ("guestfs_add_drive %s FAILED\n", filename);
+ if (guestfs_add_drive_ro (g, "../images/test.sqsh") == -1) {
+ printf ("guestfs_add_drive_ro ../images/test.sqsh FAILED\n");
exit (1);
}
printf ("guestfs_launch FAILED\n");
exit (1);
}
+
+ /* Set a timeout in case qemu hangs during launch (RHBZ#505329). */
+ alarm (600);
+
if (guestfs_wait_ready (g) == -1) {
printf ("guestfs_wait_ready FAILED\n");
exit (1);
}
- /* Detect if the appliance uses /dev/sd* or /dev/hd* in device
- * names. This changed between RHEL 5 and RHEL 6 so we have to
- * support both.
- */
- devs = guestfs_list_devices (g);
- if (devs == NULL || devs[0] == NULL) {
- printf ("guestfs_list_devices FAILED\n");
- exit (1);
- }
- if (strncmp (devs[0], "/dev/sd", 7) == 0)
- devchar = 's';
- else if (strncmp (devs[0], "/dev/hd", 7) == 0)
- devchar = 'h';
- else {
- printf ("guestfs_list_devices returned unexpected string '%s'\n",
- devs[0]);
- exit (1);
- }
- for (i = 0; devs[i] != NULL; ++i)
- free (devs[i]);
- free (devs);
+ /* Cancel previous alarm. */
+ alarm (0);
- nr_tests = 143;
+ nr_tests = 149;
test_num++;
+ printf ("%3d/%3d test_glob_expand_0\n", test_num, nr_tests);
+ if (test_glob_expand_0 () == -1) {
+ printf ("test_glob_expand_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_glob_expand_1\n", test_num, nr_tests);
+ if (test_glob_expand_1 () == -1) {
+ printf ("test_glob_expand_1 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_glob_expand_2\n", test_num, nr_tests);
+ if (test_glob_expand_2 () == -1) {
+ printf ("test_glob_expand_2 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_ntfs_3g_probe_0\n", test_num, nr_tests);
+ if (test_ntfs_3g_probe_0 () == -1) {
+ printf ("test_ntfs_3g_probe_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_ntfs_3g_probe_1\n", test_num, nr_tests);
+ if (test_ntfs_3g_probe_1 () == -1) {
+ printf ("test_ntfs_3g_probe_1 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_sleep_0\n", test_num, nr_tests);
+ if (test_sleep_0 () == -1) {
+ printf ("test_sleep_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
printf ("%3d/%3d test_find_0\n", test_num, nr_tests);
if (test_find_0 () == -1) {
printf ("test_find_0 FAILED\n");