Add 'readdir' call.
[libguestfs.git] / capitests / tests.c
index 7a30498..9124ea9 100644 (file)
@@ -109,6 +109,8 @@ static void no_test_warnings (void)
   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_set_memsize\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_memsize\" 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");
@@ -151,6 +153,979 @@ static void no_test_warnings (void)
   fprintf (stderr, "warning: \"guestfs_sh\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_sh_lines\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_scrub_freespace\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_df\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_df_h\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_mount_loop\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_umask\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_readdir\" has no tests\n");
+}
+
+static int test_mknod_c_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mknod_c") == NULL;
+  str = getenv ("SKIP_TEST_MKNOD_C_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKNOD_C");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mknod_c_0 (void)
+{
+  if (test_mknod_c_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mknod_c_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mknod_c_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;
+  }
+  /* TestOutputStruct for mknod_c (0) */
+  {
+    char path[] = "/node";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mknod_c (g, 511, 99, 66, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/node";
+    struct guestfs_stat *r;
+    suppress_error = 0;
+    r = guestfs_stat (g, path);
+    if (r == NULL)
+      return -1;
+    if (r->mode != 8685) {
+      fprintf (stderr, "test_mknod_c_0: mode was %d, expected 8685\n",
+               (int) r->mode);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_mknod_b_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mknod_b") == NULL;
+  str = getenv ("SKIP_TEST_MKNOD_B_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKNOD_B");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mknod_b_0 (void)
+{
+  if (test_mknod_b_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mknod_b_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mknod_b_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;
+  }
+  /* TestOutputStruct for mknod_b (0) */
+  {
+    char path[] = "/node";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mknod_b (g, 511, 99, 66, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/node";
+    struct guestfs_stat *r;
+    suppress_error = 0;
+    r = guestfs_stat (g, path);
+    if (r == NULL)
+      return -1;
+    if (r->mode != 25069) {
+      fprintf (stderr, "test_mknod_b_0: mode was %d, expected 25069\n",
+               (int) r->mode);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_mkfifo_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkfifo") == NULL;
+  str = getenv ("SKIP_TEST_MKFIFO_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKFIFO");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkfifo_0 (void)
+{
+  if (test_mkfifo_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkfifo_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mkfifo_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;
+  }
+  /* TestOutputStruct for mkfifo (0) */
+  {
+    char path[] = "/node";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfifo (g, 511, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/node";
+    struct guestfs_stat *r;
+    suppress_error = 0;
+    r = guestfs_stat (g, path);
+    if (r == NULL)
+      return -1;
+    if (r->mode != 4589) {
+      fprintf (stderr, "test_mkfifo_0: mode was %d, expected 4589\n",
+               (int) r->mode);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_mknod_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mknod") == NULL;
+  str = getenv ("SKIP_TEST_MKNOD_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKNOD");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mknod_0 (void)
+{
+  if (test_mknod_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mknod_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mknod_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;
+  }
+  /* TestOutputStruct for mknod (0) */
+  {
+    char path[] = "/node";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mknod (g, 4607, 0, 0, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/node";
+    struct guestfs_stat *r;
+    suppress_error = 0;
+    r = guestfs_stat (g, path);
+    if (r == NULL)
+      return -1;
+    if (r->mode != 4589) {
+      fprintf (stderr, "test_mknod_0: mode was %d, expected 4589\n",
+               (int) r->mode);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_mknod_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mknod") == NULL;
+  str = getenv ("SKIP_TEST_MKNOD_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKNOD");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mknod_1 (void)
+{
+  if (test_mknod_1_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mknod_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mknod_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;
+  }
+  /* TestOutputStruct for mknod (1) */
+  {
+    char path[] = "/node";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mknod (g, 25087, 66, 99, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/node";
+    struct guestfs_stat *r;
+    suppress_error = 0;
+    r = guestfs_stat (g, path);
+    if (r == NULL)
+      return -1;
+    if (r->mode != 25069) {
+      fprintf (stderr, "test_mknod_1: mode was %d, expected 25069\n",
+               (int) r->mode);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_mkswap_U_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap_U") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_U_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP_U");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_U_0 (void)
+{
+  if (test_mkswap_U_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkswap_U_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_U_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 mkswap_U (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 uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap_U (g, uuid, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_mkswap_L_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap_L") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_L_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP_L");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_L_0 (void)
+{
+  if (test_mkswap_L_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkswap_L_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_L_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 mkswap_L (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 label[] = "hello";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap_L (g, label, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_mkswap_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_0 (void)
+{
+  if (test_mkswap_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkswap_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_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 mkswap (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 device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap (g, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_initrd_list_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "initrd_list") == NULL;
+  str = getenv ("SKIP_TEST_INITRD_LIST_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_INITRD_LIST");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_initrd_list_0 (void)
+{
+  if (test_initrd_list_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_initrd_list_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_initrd_list_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 initrd_list (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/initrd";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_initrd_list (g, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "empty";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-1";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-2";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (!r[3]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-3";
+      if (strcmp (r[3], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
+        return -1;
+      }
+    }
+    if (r[4] != NULL) {
+      fprintf (stderr, "test_initrd_list_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_du_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "du") == NULL;
+  str = getenv ("SKIP_TEST_DU_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_DU");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_du_0 (void)
+{
+  if (test_du_0_skip ()) {
+    printf ("        %s skipped (reason: environment variable set)\n", "test_du_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_du_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;
+  }
+  /* TestOutputInt for du (0) */
+  {
+    char path[] = "/p";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/p";
+    int64_t r;
+    suppress_error = 0;
+    r = guestfs_du (g, path);
+    if (r == -1)
+      return -1;
+    if (r != 1) {
+      fprintf (stderr, "test_du_0: expected 1 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
 }
 
 static int test_tail_n_0_skip (void)
@@ -170,7 +1145,7 @@ static int test_tail_n_0_skip (void)
 static int test_tail_n_0 (void)
 {
   if (test_tail_n_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tail_n_0");
     return 0;
   }
 
@@ -313,7 +1288,7 @@ static int test_tail_n_1_skip (void)
 static int test_tail_n_1 (void)
 {
   if (test_tail_n_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tail_n_1");
     return 0;
   }
 
@@ -456,7 +1431,7 @@ static int test_tail_n_2_skip (void)
 static int test_tail_n_2 (void)
 {
   if (test_tail_n_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tail_n_2");
     return 0;
   }
 
@@ -563,7 +1538,7 @@ static int test_tail_0_skip (void)
 static int test_tail_0 (void)
 {
   if (test_tail_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tail_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tail_0");
     return 0;
   }
 
@@ -790,7 +1765,7 @@ static int test_head_n_0_skip (void)
 static int test_head_n_0 (void)
 {
   if (test_head_n_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_head_n_0");
     return 0;
   }
 
@@ -933,7 +1908,7 @@ static int test_head_n_1_skip (void)
 static int test_head_n_1 (void)
 {
   if (test_head_n_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_head_n_1");
     return 0;
   }
 
@@ -1076,7 +2051,7 @@ static int test_head_n_2_skip (void)
 static int test_head_n_2 (void)
 {
   if (test_head_n_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_head_n_2");
     return 0;
   }
 
@@ -1183,7 +2158,7 @@ static int test_head_0_skip (void)
 static int test_head_0 (void)
 {
   if (test_head_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_head_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_head_0");
     return 0;
   }
 
@@ -1410,7 +2385,7 @@ static int test_wc_c_0_skip (void)
 static int test_wc_c_0 (void)
 {
   if (test_wc_c_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_wc_c_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_wc_c_0");
     return 0;
   }
 
@@ -1512,7 +2487,7 @@ static int test_wc_w_0_skip (void)
 static int test_wc_w_0 (void)
 {
   if (test_wc_w_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_wc_w_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_wc_w_0");
     return 0;
   }
 
@@ -1614,7 +2589,7 @@ static int test_wc_l_0_skip (void)
 static int test_wc_l_0 (void)
 {
   if (test_wc_l_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_wc_l_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_wc_l_0");
     return 0;
   }
 
@@ -1716,7 +2691,7 @@ static int test_mkdtemp_0_skip (void)
 static int test_mkdtemp_0 (void)
 {
   if (test_mkdtemp_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdtemp_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdtemp_0");
     return 0;
   }
 
@@ -1812,7 +2787,7 @@ static int test_scrub_file_0_skip (void)
 static int test_scrub_file_0 (void)
 {
   if (test_scrub_file_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_scrub_file_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_scrub_file_0");
     return 0;
   }
 
@@ -1908,7 +2883,7 @@ static int test_scrub_device_0_skip (void)
 static int test_scrub_device_0 (void)
 {
   if (test_scrub_device_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_scrub_device_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_scrub_device_0");
     return 0;
   }
 
@@ -1964,7 +2939,7 @@ static int test_glob_expand_0_skip (void)
 static int test_glob_expand_0 (void)
 {
   if (test_glob_expand_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_glob_expand_0");
     return 0;
   }
 
@@ -2108,7 +3083,7 @@ static int test_glob_expand_1_skip (void)
 static int test_glob_expand_1 (void)
 {
   if (test_glob_expand_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_glob_expand_1");
     return 0;
   }
 
@@ -2252,7 +3227,7 @@ static int test_glob_expand_2_skip (void)
 static int test_glob_expand_2 (void)
 {
   if (test_glob_expand_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_glob_expand_2");
     return 0;
   }
 
@@ -2372,7 +3347,7 @@ static int test_ntfs_3g_probe_0_skip (void)
 static int test_ntfs_3g_probe_0 (void)
 {
   if (test_ntfs_3g_probe_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_0");
     return 0;
   }
 
@@ -2454,7 +3429,7 @@ static int test_ntfs_3g_probe_1_skip (void)
 static int test_ntfs_3g_probe_1 (void)
 {
   if (test_ntfs_3g_probe_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_1");
     return 0;
   }
 
@@ -2536,7 +3511,7 @@ static int test_sleep_0_skip (void)
 static int test_sleep_0 (void)
 {
   if (test_sleep_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_sleep_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_sleep_0");
     return 0;
   }
 
@@ -2591,7 +3566,7 @@ static int test_find_0_skip (void)
 static int test_find_0 (void)
 {
   if (test_find_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_find_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_find_0");
     return 0;
   }
 
@@ -2699,7 +3674,7 @@ static int test_find_1_skip (void)
 static int test_find_1 (void)
 {
   if (test_find_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_find_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_find_1");
     return 0;
   }
 
@@ -2867,7 +3842,7 @@ static int test_find_2_skip (void)
 static int test_find_2 (void)
 {
   if (test_find_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_find_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_find_2");
     return 0;
   }
 
@@ -3003,7 +3978,7 @@ static int test_lvresize_0_skip (void)
 static int test_lvresize_0 (void)
 {
   if (test_lvresize_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvresize_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvresize_0");
     return 0;
   }
 
@@ -3176,7 +4151,7 @@ static int test_zerofree_0_skip (void)
 static int test_zerofree_0 (void)
 {
   if (test_zerofree_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_zerofree_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_zerofree_0");
     return 0;
   }
 
@@ -3303,7 +4278,7 @@ static int test_hexdump_0_skip (void)
 static int test_hexdump_0 (void)
 {
   if (test_hexdump_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_hexdump_0");
     return 0;
   }
 
@@ -3405,7 +4380,7 @@ static int test_hexdump_1_skip (void)
 static int test_hexdump_1 (void)
 {
   if (test_hexdump_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_hexdump_1");
     return 0;
   }
 
@@ -3504,7 +4479,7 @@ static int test_strings_e_0_skip (void)
 static int test_strings_e_0 (void)
 {
   if (test_strings_e_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_strings_e_0");
     return 0;
   }
 
@@ -3610,11 +4585,11 @@ static int test_strings_e_1_skip (void)
 static int test_strings_e_1 (void)
 {
   if (test_strings_e_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_strings_e_1");
     return 0;
   }
 
-  printf ("%s skipped (reason: test disabled in generator)\n", "test_strings_e_1");
+  printf ("        %s skipped (reason: test disabled in generator)\n", "test_strings_e_1");
   return 0;
 }
 
@@ -3635,7 +4610,7 @@ static int test_strings_0_skip (void)
 static int test_strings_0 (void)
 {
   if (test_strings_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_strings_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_strings_0");
     return 0;
   }
 
@@ -3764,7 +4739,7 @@ static int test_strings_1_skip (void)
 static int test_strings_1 (void)
 {
   if (test_strings_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_strings_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_strings_1");
     return 0;
   }
 
@@ -3868,7 +4843,7 @@ static int test_equal_0_skip (void)
 static int test_equal_0 (void)
 {
   if (test_equal_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_equal_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_equal_0");
     return 0;
   }
 
@@ -3978,7 +4953,7 @@ static int test_equal_1_skip (void)
 static int test_equal_1 (void)
 {
   if (test_equal_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_equal_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_equal_1");
     return 0;
   }
 
@@ -4088,7 +5063,7 @@ static int test_equal_2_skip (void)
 static int test_equal_2 (void)
 {
   if (test_equal_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_equal_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_equal_2");
     return 0;
   }
 
@@ -4176,7 +5151,7 @@ static int test_ping_daemon_0_skip (void)
 static int test_ping_daemon_0 (void)
 {
   if (test_ping_daemon_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_ping_daemon_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_ping_daemon_0");
     return 0;
   }
 
@@ -4231,7 +5206,7 @@ static int test_dmesg_0_skip (void)
 static int test_dmesg_0 (void)
 {
   if (test_dmesg_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_dmesg_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_dmesg_0");
     return 0;
   }
 
@@ -4287,7 +5262,7 @@ static int test_drop_caches_0_skip (void)
 static int test_drop_caches_0 (void)
 {
   if (test_drop_caches_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_drop_caches_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_drop_caches_0");
     return 0;
   }
 
@@ -4342,7 +5317,7 @@ static int test_mv_0_skip (void)
 static int test_mv_0 (void)
 {
   if (test_mv_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mv_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mv_0");
     return 0;
   }
 
@@ -4453,7 +5428,7 @@ static int test_mv_1_skip (void)
 static int test_mv_1 (void)
 {
   if (test_mv_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mv_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mv_1");
     return 0;
   }
 
@@ -4562,7 +5537,7 @@ static int test_cp_a_0_skip (void)
 static int test_cp_a_0 (void)
 {
   if (test_cp_a_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_cp_a_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_cp_a_0");
     return 0;
   }
 
@@ -4689,7 +5664,7 @@ static int test_cp_0_skip (void)
 static int test_cp_0 (void)
 {
   if (test_cp_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_cp_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_cp_0");
     return 0;
   }
 
@@ -4800,7 +5775,7 @@ static int test_cp_1_skip (void)
 static int test_cp_1 (void)
 {
   if (test_cp_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_cp_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_cp_1");
     return 0;
   }
 
@@ -4909,7 +5884,7 @@ static int test_cp_2_skip (void)
 static int test_cp_2 (void)
 {
   if (test_cp_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_cp_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_cp_2");
     return 0;
   }
 
@@ -5028,86 +6003,11 @@ static int test_grub_install_0_skip (void)
 static int test_grub_install_0 (void)
 {
   if (test_grub_install_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_grub_install_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_grub_install_0");
     return 0;
   }
 
-  /* InitBasicFS for test_grub_install_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;
-  }
-  /* TestOutputTrue for grub_install (0) */
-  {
-    char root[] = "/";
-    char device[] = "/dev/sda1";
-    int r;
-    suppress_error = 0;
-    r = guestfs_grub_install (g, root, device);
-    if (r == -1)
-      return -1;
-  }
-  {
-    char path[] = "/boot";
-    int r;
-    suppress_error = 0;
-    r = guestfs_is_dir (g, path);
-    if (r == -1)
-      return -1;
-    if (!r) {
-      fprintf (stderr, "test_grub_install_0: expected true, got false\n");
-      return -1;
-    }
-  }
+  printf ("        %s skipped (reason: test disabled in generator)\n", "test_grub_install_0");
   return 0;
 }
 
@@ -5128,7 +6028,7 @@ static int test_zero_0_skip (void)
 static int test_zero_0 (void)
 {
   if (test_zero_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_zero_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_zero_0");
     return 0;
   }
 
@@ -5237,7 +6137,7 @@ static int test_fsck_0_skip (void)
 static int test_fsck_0 (void)
 {
   if (test_fsck_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_fsck_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_fsck_0");
     return 0;
   }
 
@@ -5337,7 +6237,7 @@ static int test_fsck_1_skip (void)
 static int test_fsck_1 (void)
 {
   if (test_fsck_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_fsck_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_fsck_1");
     return 0;
   }
 
@@ -5445,7 +6345,7 @@ static int test_set_e2uuid_0_skip (void)
 static int test_set_e2uuid_0 (void)
 {
   if (test_set_e2uuid_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_set_e2uuid_0");
     return 0;
   }
 
@@ -5547,7 +6447,7 @@ static int test_set_e2uuid_1_skip (void)
 static int test_set_e2uuid_1 (void)
 {
   if (test_set_e2uuid_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_set_e2uuid_1");
     return 0;
   }
 
@@ -5649,7 +6549,7 @@ static int test_set_e2uuid_2_skip (void)
 static int test_set_e2uuid_2 (void)
 {
   if (test_set_e2uuid_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_set_e2uuid_2");
     return 0;
   }
 
@@ -5737,7 +6637,7 @@ static int test_set_e2uuid_3_skip (void)
 static int test_set_e2uuid_3 (void)
 {
   if (test_set_e2uuid_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_set_e2uuid_3");
     return 0;
   }
 
@@ -5825,7 +6725,7 @@ static int test_set_e2label_0_skip (void)
 static int test_set_e2label_0 (void)
 {
   if (test_set_e2label_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2label_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_set_e2label_0");
     return 0;
   }
 
@@ -5927,7 +6827,7 @@ static int test_pvremove_0_skip (void)
 static int test_pvremove_0 (void)
 {
   if (test_pvremove_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvremove_0");
     return 0;
   }
 
@@ -6059,7 +6959,7 @@ static int test_pvremove_1_skip (void)
 static int test_pvremove_1 (void)
 {
   if (test_pvremove_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvremove_1");
     return 0;
   }
 
@@ -6191,7 +7091,7 @@ static int test_pvremove_2_skip (void)
 static int test_pvremove_2 (void)
 {
   if (test_pvremove_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvremove_2");
     return 0;
   }
 
@@ -6323,7 +7223,7 @@ static int test_vgremove_0_skip (void)
 static int test_vgremove_0 (void)
 {
   if (test_vgremove_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_vgremove_0");
     return 0;
   }
 
@@ -6447,7 +7347,7 @@ static int test_vgremove_1_skip (void)
 static int test_vgremove_1 (void)
 {
   if (test_vgremove_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_vgremove_1");
     return 0;
   }
 
@@ -6571,7 +7471,7 @@ static int test_lvremove_0_skip (void)
 static int test_lvremove_0 (void)
 {
   if (test_lvremove_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvremove_0");
     return 0;
   }
 
@@ -6707,7 +7607,7 @@ static int test_lvremove_1_skip (void)
 static int test_lvremove_1 (void)
 {
   if (test_lvremove_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvremove_1");
     return 0;
   }
 
@@ -6831,7 +7731,7 @@ static int test_lvremove_2_skip (void)
 static int test_lvremove_2 (void)
 {
   if (test_lvremove_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvremove_2");
     return 0;
   }
 
@@ -6967,7 +7867,7 @@ static int test_mount_ro_0_skip (void)
 static int test_mount_ro_0 (void)
 {
   if (test_mount_ro_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mount_ro_0");
     return 0;
   }
 
@@ -7071,7 +7971,7 @@ static int test_mount_ro_1_skip (void)
 static int test_mount_ro_1 (void)
 {
   if (test_mount_ro_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mount_ro_1");
     return 0;
   }
 
@@ -7190,7 +8090,7 @@ static int test_tgz_in_0_skip (void)
 static int test_tgz_in_0 (void)
 {
   if (test_tgz_in_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tgz_in_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tgz_in_0");
     return 0;
   }
 
@@ -7291,7 +8191,7 @@ static int test_tar_in_0_skip (void)
 static int test_tar_in_0 (void)
 {
   if (test_tar_in_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_tar_in_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_tar_in_0");
     return 0;
   }
 
@@ -7392,7 +8292,7 @@ static int test_checksum_0_skip (void)
 static int test_checksum_0 (void)
 {
   if (test_checksum_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_0");
     return 0;
   }
 
@@ -7495,7 +8395,7 @@ static int test_checksum_1_skip (void)
 static int test_checksum_1 (void)
 {
   if (test_checksum_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_1");
     return 0;
   }
 
@@ -7584,7 +8484,7 @@ static int test_checksum_2_skip (void)
 static int test_checksum_2 (void)
 {
   if (test_checksum_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_2");
     return 0;
   }
 
@@ -7687,7 +8587,7 @@ static int test_checksum_3_skip (void)
 static int test_checksum_3 (void)
 {
   if (test_checksum_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_3");
     return 0;
   }
 
@@ -7790,7 +8690,7 @@ static int test_checksum_4_skip (void)
 static int test_checksum_4 (void)
 {
   if (test_checksum_4_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_4");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_4");
     return 0;
   }
 
@@ -7893,7 +8793,7 @@ static int test_checksum_5_skip (void)
 static int test_checksum_5 (void)
 {
   if (test_checksum_5_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_5");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_5");
     return 0;
   }
 
@@ -7996,7 +8896,7 @@ static int test_checksum_6_skip (void)
 static int test_checksum_6 (void)
 {
   if (test_checksum_6_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_6");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_6");
     return 0;
   }
 
@@ -8099,7 +8999,7 @@ static int test_checksum_7_skip (void)
 static int test_checksum_7 (void)
 {
   if (test_checksum_7_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_7");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_7");
     return 0;
   }
 
@@ -8202,7 +9102,7 @@ static int test_checksum_8_skip (void)
 static int test_checksum_8 (void)
 {
   if (test_checksum_8_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_8");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_checksum_8");
     return 0;
   }
 
@@ -8307,7 +9207,7 @@ static int test_download_0_skip (void)
 static int test_download_0 (void)
 {
   if (test_download_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_download_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_download_0");
     return 0;
   }
 
@@ -8425,7 +9325,7 @@ static int test_upload_0_skip (void)
 static int test_upload_0 (void)
 {
   if (test_upload_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_upload_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_upload_0");
     return 0;
   }
 
@@ -8527,7 +9427,7 @@ static int test_blockdev_rereadpt_0_skip (void)
 static int test_blockdev_rereadpt_0 (void)
 {
   if (test_blockdev_rereadpt_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_rereadpt_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_rereadpt_0");
     return 0;
   }
 
@@ -8583,7 +9483,7 @@ static int test_blockdev_flushbufs_0_skip (void)
 static int test_blockdev_flushbufs_0 (void)
 {
   if (test_blockdev_flushbufs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_flushbufs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_flushbufs_0");
     return 0;
   }
 
@@ -8639,7 +9539,7 @@ static int test_blockdev_getsize64_0_skip (void)
 static int test_blockdev_getsize64_0 (void)
 {
   if (test_blockdev_getsize64_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsize64_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_getsize64_0");
     return 0;
   }
 
@@ -8699,7 +9599,7 @@ static int test_blockdev_getsz_0_skip (void)
 static int test_blockdev_getsz_0 (void)
 {
   if (test_blockdev_getsz_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsz_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_getsz_0");
     return 0;
   }
 
@@ -8759,7 +9659,7 @@ static int test_blockdev_getbsz_0_skip (void)
 static int test_blockdev_getbsz_0 (void)
 {
   if (test_blockdev_getbsz_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getbsz_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_getbsz_0");
     return 0;
   }
 
@@ -8819,7 +9719,7 @@ static int test_blockdev_getss_0_skip (void)
 static int test_blockdev_getss_0 (void)
 {
   if (test_blockdev_getss_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getss_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_getss_0");
     return 0;
   }
 
@@ -8879,7 +9779,7 @@ static int test_blockdev_getro_0_skip (void)
 static int test_blockdev_getro_0 (void)
 {
   if (test_blockdev_getro_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getro_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_getro_0");
     return 0;
   }
 
@@ -8947,7 +9847,7 @@ static int test_blockdev_setrw_0_skip (void)
 static int test_blockdev_setrw_0 (void)
 {
   if (test_blockdev_setrw_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setrw_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_setrw_0");
     return 0;
   }
 
@@ -9015,7 +9915,7 @@ static int test_blockdev_setro_0_skip (void)
 static int test_blockdev_setro_0 (void)
 {
   if (test_blockdev_setro_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setro_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_blockdev_setro_0");
     return 0;
   }
 
@@ -9083,7 +9983,7 @@ static int test_statvfs_0_skip (void)
 static int test_statvfs_0 (void)
 {
   if (test_statvfs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_statvfs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_statvfs_0");
     return 0;
   }
 
@@ -9149,14 +10049,9 @@ static int test_statvfs_0 (void)
     r = guestfs_statvfs (g, path);
     if (r == NULL)
       return -1;
-    if (r->bfree != 487702) {
-      fprintf (stderr, "test_statvfs_0: bfree was %d, expected 487702\n",
-               (int) r->bfree);
-      return -1;
-    }
-    if (r->blocks != 490020) {
-      fprintf (stderr, "test_statvfs_0: blocks was %d, expected 490020\n",
-               (int) r->blocks);
+    if (r->namemax != 255) {
+      fprintf (stderr, "test_statvfs_0: namemax was %d, expected 255\n",
+               (int) r->namemax);
       return -1;
     }
     if (r->bsize != 1024) {
@@ -9186,7 +10081,7 @@ static int test_lstat_0_skip (void)
 static int test_lstat_0 (void)
 {
   if (test_lstat_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lstat_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lstat_0");
     return 0;
   }
 
@@ -9287,7 +10182,7 @@ static int test_stat_0_skip (void)
 static int test_stat_0 (void)
 {
   if (test_stat_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_stat_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_stat_0");
     return 0;
   }
 
@@ -9388,7 +10283,7 @@ static int test_command_lines_0_skip (void)
 static int test_command_lines_0 (void)
 {
   if (test_command_lines_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_0");
     return 0;
   }
 
@@ -9518,7 +10413,7 @@ static int test_command_lines_1_skip (void)
 static int test_command_lines_1 (void)
 {
   if (test_command_lines_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_1");
     return 0;
   }
 
@@ -9648,7 +10543,7 @@ static int test_command_lines_2_skip (void)
 static int test_command_lines_2 (void)
 {
   if (test_command_lines_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_2");
     return 0;
   }
 
@@ -9790,7 +10685,7 @@ static int test_command_lines_3_skip (void)
 static int test_command_lines_3 (void)
 {
   if (test_command_lines_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_3");
     return 0;
   }
 
@@ -9932,7 +10827,7 @@ static int test_command_lines_4_skip (void)
 static int test_command_lines_4 (void)
 {
   if (test_command_lines_4_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_4");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_4");
     return 0;
   }
 
@@ -10086,7 +10981,7 @@ static int test_command_lines_5_skip (void)
 static int test_command_lines_5 (void)
 {
   if (test_command_lines_5_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_5");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_5");
     return 0;
   }
 
@@ -10252,7 +11147,7 @@ static int test_command_lines_6_skip (void)
 static int test_command_lines_6 (void)
 {
   if (test_command_lines_6_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_6");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_6");
     return 0;
   }
 
@@ -10370,7 +11265,7 @@ static int test_command_lines_7_skip (void)
 static int test_command_lines_7 (void)
 {
   if (test_command_lines_7_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_7");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_7");
     return 0;
   }
 
@@ -10500,7 +11395,7 @@ static int test_command_lines_8_skip (void)
 static int test_command_lines_8 (void)
 {
   if (test_command_lines_8_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_8");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_8");
     return 0;
   }
 
@@ -10642,7 +11537,7 @@ static int test_command_lines_9_skip (void)
 static int test_command_lines_9 (void)
 {
   if (test_command_lines_9_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_9");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_9");
     return 0;
   }
 
@@ -10784,7 +11679,7 @@ static int test_command_lines_10_skip (void)
 static int test_command_lines_10 (void)
 {
   if (test_command_lines_10_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_10");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_lines_10");
     return 0;
   }
 
@@ -10926,7 +11821,7 @@ static int test_command_0_skip (void)
 static int test_command_0 (void)
 {
   if (test_command_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_0");
     return 0;
   }
 
@@ -11041,7 +11936,7 @@ static int test_command_1_skip (void)
 static int test_command_1 (void)
 {
   if (test_command_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_1");
     return 0;
   }
 
@@ -11156,7 +12051,7 @@ static int test_command_2_skip (void)
 static int test_command_2 (void)
 {
   if (test_command_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_2");
     return 0;
   }
 
@@ -11271,7 +12166,7 @@ static int test_command_3_skip (void)
 static int test_command_3 (void)
 {
   if (test_command_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_3");
     return 0;
   }
 
@@ -11386,7 +12281,7 @@ static int test_command_4_skip (void)
 static int test_command_4 (void)
 {
   if (test_command_4_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_4");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_4");
     return 0;
   }
 
@@ -11501,7 +12396,7 @@ static int test_command_5_skip (void)
 static int test_command_5 (void)
 {
   if (test_command_5_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_5");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_5");
     return 0;
   }
 
@@ -11616,7 +12511,7 @@ static int test_command_6_skip (void)
 static int test_command_6 (void)
 {
   if (test_command_6_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_6");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_6");
     return 0;
   }
 
@@ -11731,7 +12626,7 @@ static int test_command_7_skip (void)
 static int test_command_7 (void)
 {
   if (test_command_7_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_7");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_7");
     return 0;
   }
 
@@ -11846,7 +12741,7 @@ static int test_command_8_skip (void)
 static int test_command_8 (void)
 {
   if (test_command_8_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_8");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_8");
     return 0;
   }
 
@@ -11961,7 +12856,7 @@ static int test_command_9_skip (void)
 static int test_command_9 (void)
 {
   if (test_command_9_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_9");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_9");
     return 0;
   }
 
@@ -12076,7 +12971,7 @@ static int test_command_10_skip (void)
 static int test_command_10 (void)
 {
   if (test_command_10_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_10");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_10");
     return 0;
   }
 
@@ -12191,7 +13086,7 @@ static int test_command_11_skip (void)
 static int test_command_11 (void)
 {
   if (test_command_11_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_command_11");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_command_11");
     return 0;
   }
 
@@ -12299,7 +13194,7 @@ static int test_file_0_skip (void)
 static int test_file_0 (void)
 {
   if (test_file_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_file_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_file_0");
     return 0;
   }
 
@@ -12400,7 +13295,7 @@ static int test_file_1_skip (void)
 static int test_file_1 (void)
 {
   if (test_file_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_file_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_file_1");
     return 0;
   }
 
@@ -12502,7 +13397,7 @@ static int test_file_2_skip (void)
 static int test_file_2 (void)
 {
   if (test_file_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_file_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_file_2");
     return 0;
   }
 
@@ -12590,7 +13485,7 @@ static int test_umount_all_0_skip (void)
 static int test_umount_all_0 (void)
 {
   if (test_umount_all_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_umount_all_0");
     return 0;
   }
 
@@ -12692,7 +13587,7 @@ static int test_umount_all_1_skip (void)
 static int test_umount_all_1 (void)
 {
   if (test_umount_all_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_umount_all_1");
     return 0;
   }
 
@@ -12722,8 +13617,8 @@ static int test_umount_all_1 (void)
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -12858,7 +13753,7 @@ static int test_mounts_0_skip (void)
 static int test_mounts_0 (void)
 {
   if (test_mounts_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mounts_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mounts_0");
     return 0;
   }
 
@@ -12966,7 +13861,7 @@ static int test_umount_0_skip (void)
 static int test_umount_0 (void)
 {
   if (test_umount_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_umount_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_umount_0");
     return 0;
   }
 
@@ -13074,7 +13969,7 @@ static int test_umount_1_skip (void)
 static int test_umount_1 (void)
 {
   if (test_umount_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_umount_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_umount_1");
     return 0;
   }
 
@@ -13177,7 +14072,7 @@ static int test_write_file_0_skip (void)
 static int test_write_file_0 (void)
 {
   if (test_write_file_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_0");
     return 0;
   }
 
@@ -13279,7 +14174,7 @@ static int test_write_file_1_skip (void)
 static int test_write_file_1 (void)
 {
   if (test_write_file_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_1");
     return 0;
   }
 
@@ -13381,7 +14276,7 @@ static int test_write_file_2_skip (void)
 static int test_write_file_2 (void)
 {
   if (test_write_file_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_2");
     return 0;
   }
 
@@ -13483,7 +14378,7 @@ static int test_write_file_3_skip (void)
 static int test_write_file_3 (void)
 {
   if (test_write_file_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_3");
     return 0;
   }
 
@@ -13585,7 +14480,7 @@ static int test_write_file_4_skip (void)
 static int test_write_file_4 (void)
 {
   if (test_write_file_4_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_4");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_4");
     return 0;
   }
 
@@ -13687,7 +14582,7 @@ static int test_write_file_5_skip (void)
 static int test_write_file_5 (void)
 {
   if (test_write_file_5_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_5");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_write_file_5");
     return 0;
   }
 
@@ -13789,7 +14684,7 @@ static int test_mkfs_0_skip (void)
 static int test_mkfs_0 (void)
 {
   if (test_mkfs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkfs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkfs_0");
     return 0;
   }
 
@@ -13891,7 +14786,7 @@ static int test_lvcreate_0_skip (void)
 static int test_lvcreate_0 (void)
 {
   if (test_lvcreate_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvcreate_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvcreate_0");
     return 0;
   }
 
@@ -13921,8 +14816,8 @@ static int test_lvcreate_0 (void)
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -14129,7 +15024,7 @@ static int test_vgcreate_0_skip (void)
 static int test_vgcreate_0 (void)
 {
   if (test_vgcreate_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_vgcreate_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_vgcreate_0");
     return 0;
   }
 
@@ -14159,8 +15054,8 @@ static int test_vgcreate_0 (void)
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -14286,7 +15181,7 @@ static int test_pvcreate_0_skip (void)
 static int test_pvcreate_0 (void)
 {
   if (test_pvcreate_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvcreate_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvcreate_0");
     return 0;
   }
 
@@ -14316,8 +15211,8 @@ static int test_pvcreate_0 (void)
   /* TestOutputListOfDevices for pvcreate (0) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -14430,7 +15325,7 @@ static int test_is_dir_0_skip (void)
 static int test_is_dir_0 (void)
 {
   if (test_is_dir_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_is_dir_0");
     return 0;
   }
 
@@ -14529,7 +15424,7 @@ static int test_is_dir_1_skip (void)
 static int test_is_dir_1 (void)
 {
   if (test_is_dir_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_is_dir_1");
     return 0;
   }
 
@@ -14628,7 +15523,7 @@ static int test_is_file_0_skip (void)
 static int test_is_file_0 (void)
 {
   if (test_is_file_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_is_file_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_is_file_0");
     return 0;
   }
 
@@ -14727,7 +15622,7 @@ static int test_is_file_1_skip (void)
 static int test_is_file_1 (void)
 {
   if (test_is_file_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_is_file_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_is_file_1");
     return 0;
   }
 
@@ -14826,7 +15721,7 @@ static int test_exists_0_skip (void)
 static int test_exists_0 (void)
 {
   if (test_exists_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_exists_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_exists_0");
     return 0;
   }
 
@@ -14925,7 +15820,7 @@ static int test_exists_1_skip (void)
 static int test_exists_1 (void)
 {
   if (test_exists_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_exists_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_exists_1");
     return 0;
   }
 
@@ -15024,7 +15919,7 @@ static int test_mkdir_p_0_skip (void)
 static int test_mkdir_p_0 (void)
 {
   if (test_mkdir_p_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_p_0");
     return 0;
   }
 
@@ -15123,7 +16018,7 @@ static int test_mkdir_p_1_skip (void)
 static int test_mkdir_p_1 (void)
 {
   if (test_mkdir_p_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_p_1");
     return 0;
   }
 
@@ -15222,7 +16117,7 @@ static int test_mkdir_p_2_skip (void)
 static int test_mkdir_p_2 (void)
 {
   if (test_mkdir_p_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_p_2");
     return 0;
   }
 
@@ -15321,7 +16216,7 @@ static int test_mkdir_p_3_skip (void)
 static int test_mkdir_p_3 (void)
 {
   if (test_mkdir_p_3_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_3");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_p_3");
     return 0;
   }
 
@@ -15416,7 +16311,7 @@ static int test_mkdir_p_4_skip (void)
 static int test_mkdir_p_4 (void)
 {
   if (test_mkdir_p_4_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_4");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_p_4");
     return 0;
   }
 
@@ -15511,7 +16406,7 @@ static int test_mkdir_0_skip (void)
 static int test_mkdir_0 (void)
 {
   if (test_mkdir_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_0");
     return 0;
   }
 
@@ -15610,7 +16505,7 @@ static int test_mkdir_1_skip (void)
 static int test_mkdir_1 (void)
 {
   if (test_mkdir_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mkdir_1");
     return 0;
   }
 
@@ -15697,7 +16592,7 @@ static int test_rm_rf_0_skip (void)
 static int test_rm_rf_0 (void)
 {
   if (test_rm_rf_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rm_rf_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rm_rf_0");
     return 0;
   }
 
@@ -15820,7 +16715,7 @@ static int test_rmdir_0_skip (void)
 static int test_rmdir_0 (void)
 {
   if (test_rmdir_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rmdir_0");
     return 0;
   }
 
@@ -15915,7 +16810,7 @@ static int test_rmdir_1_skip (void)
 static int test_rmdir_1 (void)
 {
   if (test_rmdir_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rmdir_1");
     return 0;
   }
 
@@ -16002,7 +16897,7 @@ static int test_rmdir_2_skip (void)
 static int test_rmdir_2 (void)
 {
   if (test_rmdir_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rmdir_2");
     return 0;
   }
 
@@ -16097,7 +16992,7 @@ static int test_rm_0_skip (void)
 static int test_rm_0 (void)
 {
   if (test_rm_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rm_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rm_0");
     return 0;
   }
 
@@ -16192,7 +17087,7 @@ static int test_rm_1_skip (void)
 static int test_rm_1 (void)
 {
   if (test_rm_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rm_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rm_1");
     return 0;
   }
 
@@ -16279,7 +17174,7 @@ static int test_rm_2_skip (void)
 static int test_rm_2 (void)
 {
   if (test_rm_2_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_rm_2");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_rm_2");
     return 0;
   }
 
@@ -16374,7 +17269,7 @@ static int test_read_lines_0_skip (void)
 static int test_read_lines_0 (void)
 {
   if (test_read_lines_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_read_lines_0");
     return 0;
   }
 
@@ -16515,7 +17410,7 @@ static int test_read_lines_1_skip (void)
 static int test_read_lines_1 (void)
 {
   if (test_read_lines_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_read_lines_1");
     return 0;
   }
 
@@ -16620,7 +17515,7 @@ static int test_lvs_0_skip (void)
 static int test_lvs_0 (void)
 {
   if (test_lvs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvs_0");
     return 0;
   }
 
@@ -16757,7 +17652,7 @@ static int test_lvs_1_skip (void)
 static int test_lvs_1 (void)
 {
   if (test_lvs_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_lvs_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_lvs_1");
     return 0;
   }
 
@@ -16787,8 +17682,8 @@ static int test_lvs_1 (void)
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -16953,7 +17848,7 @@ static int test_vgs_0_skip (void)
 static int test_vgs_0 (void)
 {
   if (test_vgs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_vgs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_vgs_0");
     return 0;
   }
 
@@ -17090,7 +17985,7 @@ static int test_vgs_1_skip (void)
 static int test_vgs_1 (void)
 {
   if (test_vgs_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_vgs_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_vgs_1");
     return 0;
   }
 
@@ -17120,8 +18015,8 @@ static int test_vgs_1 (void)
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -17247,7 +18142,7 @@ static int test_pvs_0_skip (void)
 static int test_pvs_0 (void)
 {
   if (test_pvs_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvs_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvs_0");
     return 0;
   }
 
@@ -17385,7 +18280,7 @@ static int test_pvs_1_skip (void)
 static int test_pvs_1 (void)
 {
   if (test_pvs_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_pvs_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_pvs_1");
     return 0;
   }
 
@@ -17415,8 +18310,8 @@ static int test_pvs_1 (void)
   /* TestOutputListOfDevices for pvs (1) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -17529,7 +18424,7 @@ static int test_list_partitions_0_skip (void)
 static int test_list_partitions_0 (void)
 {
   if (test_list_partitions_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_list_partitions_0");
     return 0;
   }
 
@@ -17637,7 +18532,7 @@ static int test_list_partitions_1_skip (void)
 static int test_list_partitions_1 (void)
 {
   if (test_list_partitions_1_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_1");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_list_partitions_1");
     return 0;
   }
 
@@ -17667,8 +18562,8 @@ static int test_list_partitions_1 (void)
   /* TestOutputListOfDevices for list_partitions (1) */
   {
     char device[] = "/dev/sda";
-    char lines_0[] = ",10";
-    char lines_1[] = ",20";
+    char lines_0[] = ",200";
+    char lines_1[] = ",400";
     char lines_2[] = ",";
     char *lines[] = {
       lines_0,
@@ -17757,7 +18652,7 @@ static int test_list_devices_0_skip (void)
 static int test_list_devices_0 (void)
 {
   if (test_list_devices_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_list_devices_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_list_devices_0");
     return 0;
   }
 
@@ -17873,7 +18768,7 @@ static int test_ls_0_skip (void)
 static int test_ls_0 (void)
 {
   if (test_ls_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_ls_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_ls_0");
     return 0;
   }
 
@@ -18041,7 +18936,7 @@ static int test_cat_0_skip (void)
 static int test_cat_0 (void)
 {
   if (test_cat_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_cat_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_cat_0");
     return 0;
   }
 
@@ -18143,7 +19038,7 @@ static int test_touch_0_skip (void)
 static int test_touch_0 (void)
 {
   if (test_touch_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_touch_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_touch_0");
     return 0;
   }
 
@@ -18242,7 +19137,7 @@ static int test_sync_0_skip (void)
 static int test_sync_0 (void)
 {
   if (test_sync_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_sync_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_sync_0");
     return 0;
   }
 
@@ -18297,7 +19192,7 @@ static int test_mount_0_skip (void)
 static int test_mount_0 (void)
 {
   if (test_mount_0_skip ()) {
-    printf ("%s skipped (reason: environment variable set)\n", "test_mount_0");
+    printf ("        %s skipped (reason: environment variable set)\n", "test_mount_0");
     return 0;
   }
 
@@ -18390,6 +19285,8 @@ int main (int argc, char *argv[])
   int fd;
   int nr_tests, test_num = 0;
 
+  setbuf (stdout, NULL);
+
   no_test_warnings ();
 
   g = guestfs_create ();
@@ -18507,9 +19404,69 @@ int main (int argc, char *argv[])
   /* Cancel previous alarm. */
   alarm (0);
 
-  nr_tests = 164;
+  nr_tests = 174;
 
   test_num++;
+  printf ("%3d/%3d test_mknod_c_0\n", test_num, nr_tests);
+  if (test_mknod_c_0 () == -1) {
+    printf ("test_mknod_c_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mknod_b_0\n", test_num, nr_tests);
+  if (test_mknod_b_0 () == -1) {
+    printf ("test_mknod_b_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkfifo_0\n", test_num, nr_tests);
+  if (test_mkfifo_0 () == -1) {
+    printf ("test_mkfifo_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mknod_0\n", test_num, nr_tests);
+  if (test_mknod_0 () == -1) {
+    printf ("test_mknod_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mknod_1\n", test_num, nr_tests);
+  if (test_mknod_1 () == -1) {
+    printf ("test_mknod_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkswap_U_0\n", test_num, nr_tests);
+  if (test_mkswap_U_0 () == -1) {
+    printf ("test_mkswap_U_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkswap_L_0\n", test_num, nr_tests);
+  if (test_mkswap_L_0 () == -1) {
+    printf ("test_mkswap_L_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkswap_0\n", test_num, nr_tests);
+  if (test_mkswap_0 () == -1) {
+    printf ("test_mkswap_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_initrd_list_0\n", test_num, nr_tests);
+  if (test_initrd_list_0 () == -1) {
+    printf ("test_initrd_list_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_du_0\n", test_num, nr_tests);
+  if (test_du_0 () == -1) {
+    printf ("test_du_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_tail_n_0\n", test_num, nr_tests);
   if (test_tail_n_0 () == -1) {
     printf ("test_tail_n_0 FAILED\n");