Implement TEST_ONLY environment variable to run selected tests only.
[libguestfs.git] / capitests / tests.c
index 5d94598..88098f4 100644 (file)
 static guestfs_h *g;
 static int suppress_error = 0;
 
 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)
 static void print_error (guestfs_h *g, void *data, const char *msg)
 {
   if (!suppress_error)
@@ -62,11 +57,39 @@ static void print_table (char * const * const argv)
 
 static void no_test_warnings (void)
 {
 
 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_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_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");
@@ -125,12 +148,893 @@ static void no_test_warnings (void)
   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_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");
+  fprintf (stderr, "warning: \"guestfs_scrub_freespace\" has no tests\n");
+}
+
+static int test_mkdtemp_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdtemp") == NULL;
+  str = getenv ("SKIP_TEST_MKDTEMP_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKDTEMP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkdtemp_0 (void)
+{
+  if (test_mkdtemp_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdtemp_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mkdtemp_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;
+  }
+  /* TestRun for mkdtemp (0) */
+  {
+    char path[] = "/tmp";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char template[] = "/tmp/tmpXXXXXX";
+    char *r;
+    suppress_error = 0;
+    r = guestfs_mkdtemp (g, template);
+    if (r == NULL)
+      return -1;
+    free (r);
+  }
+  return 0;
+}
+
+static int test_scrub_file_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "scrub_file") == NULL;
+  str = getenv ("SKIP_TEST_SCRUB_FILE_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_SCRUB_FILE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_scrub_file_0 (void)
+{
+  if (test_scrub_file_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_file_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_scrub_file_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;
+  }
+  /* TestRun for scrub_file (0) */
+  {
+    char path[] = "/file";
+    char content[] = "content";
+    int r;
+    suppress_error = 0;
+    r = guestfs_write_file (g, path, content, 0);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char file[] = "/file";
+    int r;
+    suppress_error = 0;
+    r = guestfs_scrub_file (g, file);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_scrub_device_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "scrub_device") == NULL;
+  str = getenv ("SKIP_TEST_SCRUB_DEVICE_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_SCRUB_DEVICE");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_scrub_device_0 (void)
+{
+  if (test_scrub_device_0_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_device_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_scrub_device_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 scrub_device (0) */
+  {
+    char device[] = "/dev/sdc";
+    int r;
+    suppress_error = 0;
+    r = guestfs_scrub_device (g, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_glob_expand_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "glob_expand") == NULL;
+  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 ("TEST_ONLY");
+  if (str)
+    return strstr (str, "glob_expand") == NULL;
+  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 ("TEST_ONLY");
+  if (str)
+    return strstr (str, "glob_expand") == NULL;
+  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 ("TEST_ONLY");
+  if (str)
+    return strstr (str, "ntfs_3g_probe") == NULL;
+  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 int test_ntfs_3g_probe_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "ntfs_3g_probe") == NULL;
+  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 int test_ntfs_3g_probe_1 (void)
+{
+  if (test_ntfs_3g_probe_1_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_1");
+    return 0;
+  }
+
+  /* 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 int test_sleep_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "sleep") == NULL;
+  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 int test_sleep_0 (void)
+{
+  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)
 {
   const char *str;
 
 }
 
 static int test_find_0_skip (void)
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "find") == NULL;
   str = getenv ("SKIP_TEST_FIND_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
   str = getenv ("SKIP_TEST_FIND_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
@@ -148,7 +1052,6 @@ static int test_find_0 (void)
   /* InitBasicFS for test_find_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -171,7 +1074,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -186,7 +1088,6 @@ static int test_find_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -195,7 +1096,6 @@ static int test_find_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -240,6 +1140,9 @@ static int test_find_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "find") == NULL;
   str = getenv ("SKIP_TEST_FIND_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
   str = getenv ("SKIP_TEST_FIND_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
@@ -257,7 +1160,6 @@ static int test_find_1 (void)
   /* InitBasicFS for test_find_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -280,7 +1182,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -295,7 +1196,6 @@ static int test_find_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -304,7 +1204,6 @@ static int test_find_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -409,6 +1308,9 @@ static int test_find_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "find") == NULL;
   str = getenv ("SKIP_TEST_FIND_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
   str = getenv ("SKIP_TEST_FIND_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FIND");
@@ -426,7 +1328,6 @@ static int test_find_2 (void)
   /* InitBasicFS for test_find_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -449,7 +1350,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -464,7 +1364,6 @@ static int test_find_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -473,7 +1372,6 @@ static int test_find_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -546,6 +1444,9 @@ static int test_lvresize_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvresize") == NULL;
   str = getenv ("SKIP_TEST_LVRESIZE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVRESIZE");
   str = getenv ("SKIP_TEST_LVRESIZE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVRESIZE");
@@ -563,7 +1464,6 @@ static int test_lvresize_0 (void)
   /* InitNone|InitEmpty for test_lvresize_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvresize_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -588,7 +1488,6 @@ static int test_lvresize_0 (void)
   char expected[] = "test content";
   {
     char device[] = "/dev/sda";
   char expected[] = "test content";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -602,7 +1501,6 @@ static int test_lvresize_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -612,7 +1510,6 @@ static int test_lvresize_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -720,6 +1617,9 @@ static int test_zerofree_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "zerofree") == NULL;
   str = getenv ("SKIP_TEST_ZEROFREE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_ZEROFREE");
   str = getenv ("SKIP_TEST_ZEROFREE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_ZEROFREE");
@@ -737,7 +1637,6 @@ static int test_zerofree_0 (void)
   /* InitNone|InitEmpty for test_zerofree_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_zerofree_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -762,7 +1661,6 @@ static int test_zerofree_0 (void)
   char expected[] = "test file";
   {
     char device[] = "/dev/sda";
   char expected[] = "test file";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -777,7 +1675,6 @@ static int test_zerofree_0 (void)
   {
     char fstype[] = "ext3";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext3";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -786,7 +1683,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -805,7 +1701,6 @@ static int test_zerofree_0 (void)
   }
   {
     char pathordevice[] = "/dev/sda1";
   }
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -814,7 +1709,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zerofree (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zerofree (g, device);
@@ -823,7 +1717,6 @@ static int test_zerofree_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -851,6 +1744,9 @@ static int test_hexdump_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "hexdump") == NULL;
   str = getenv ("SKIP_TEST_HEXDUMP_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_HEXDUMP");
   str = getenv ("SKIP_TEST_HEXDUMP_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_HEXDUMP");
@@ -868,7 +1764,6 @@ static int test_hexdump_0 (void)
   /* InitBasicFS for test_hexdump_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -891,7 +1786,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -906,7 +1800,6 @@ static int test_hexdump_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -915,7 +1808,6 @@ static int test_hexdump_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -950,10 +1842,112 @@ static int test_hexdump_0 (void)
   return 0;
 }
 
   return 0;
 }
 
+static int test_hexdump_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "hexdump") == NULL;
+  str = getenv ("SKIP_TEST_HEXDUMP_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEXDUMP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_hexdump_1 (void)
+{
+  if (test_hexdump_1_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_hexdump_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_hexdump_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;
+  }
+  /* TestRun for hexdump (1) */
+  {
+    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[] = "/100krandom";
+    char *r;
+    suppress_error = 0;
+    r = guestfs_hexdump (g, path);
+    if (r == NULL)
+      return -1;
+    free (r);
+  }
+  return 0;
+}
+
 static int test_strings_e_0_skip (void)
 {
   const char *str;
 
 static int test_strings_e_0_skip (void)
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "strings_e") == NULL;
   str = getenv ("SKIP_TEST_STRINGS_E_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS_E");
   str = getenv ("SKIP_TEST_STRINGS_E_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS_E");
@@ -971,7 +1965,6 @@ static int test_strings_e_0 (void)
   /* InitBasicFS for test_strings_e_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -994,7 +1987,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1009,7 +2001,6 @@ static int test_strings_e_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1018,7 +2009,6 @@ static int test_strings_e_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1061,6 +2051,9 @@ static int test_strings_e_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "strings_e") == NULL;
   str = getenv ("SKIP_TEST_STRINGS_E_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS_E");
   str = getenv ("SKIP_TEST_STRINGS_E_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS_E");
@@ -1083,6 +2076,9 @@ static int test_strings_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "strings") == NULL;
   str = getenv ("SKIP_TEST_STRINGS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS");
   str = getenv ("SKIP_TEST_STRINGS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS");
@@ -1100,7 +2096,6 @@ static int test_strings_0 (void)
   /* InitBasicFS for test_strings_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1123,7 +2118,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1138,7 +2132,6 @@ static int test_strings_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1147,7 +2140,6 @@ static int test_strings_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1213,6 +2205,9 @@ static int test_strings_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "strings") == NULL;
   str = getenv ("SKIP_TEST_STRINGS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS");
   str = getenv ("SKIP_TEST_STRINGS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STRINGS");
@@ -1230,7 +2225,6 @@ static int test_strings_1 (void)
   /* InitBasicFS for test_strings_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1253,7 +2247,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1268,7 +2261,6 @@ static int test_strings_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1277,7 +2269,6 @@ static int test_strings_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1318,6 +2309,9 @@ static int test_equal_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "equal") == NULL;
   str = getenv ("SKIP_TEST_EQUAL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
   str = getenv ("SKIP_TEST_EQUAL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
@@ -1335,7 +2329,6 @@ static int test_equal_0 (void)
   /* InitBasicFS for test_equal_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1358,7 +2351,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1373,7 +2365,6 @@ static int test_equal_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1382,7 +2373,6 @@ static int test_equal_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1429,6 +2419,9 @@ static int test_equal_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "equal") == NULL;
   str = getenv ("SKIP_TEST_EQUAL_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
   str = getenv ("SKIP_TEST_EQUAL_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
@@ -1446,7 +2439,6 @@ static int test_equal_1 (void)
   /* InitBasicFS for test_equal_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1469,7 +2461,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1484,7 +2475,6 @@ static int test_equal_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1493,7 +2483,6 @@ static int test_equal_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1540,6 +2529,9 @@ static int test_equal_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "equal") == NULL;
   str = getenv ("SKIP_TEST_EQUAL_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
   str = getenv ("SKIP_TEST_EQUAL_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EQUAL");
@@ -1557,7 +2549,6 @@ static int test_equal_2 (void)
   /* InitBasicFS for test_equal_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1580,7 +2571,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1595,7 +2585,6 @@ static int test_equal_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1604,7 +2593,6 @@ static int test_equal_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1629,6 +2617,9 @@ static int test_ping_daemon_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "ping_daemon") == NULL;
   str = getenv ("SKIP_TEST_PING_DAEMON_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PING_DAEMON");
   str = getenv ("SKIP_TEST_PING_DAEMON_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PING_DAEMON");
@@ -1646,7 +2637,6 @@ static int test_ping_daemon_0 (void)
   /* InitNone|InitEmpty for test_ping_daemon_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1682,6 +2672,9 @@ static int test_dmesg_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "dmesg") == NULL;
   str = getenv ("SKIP_TEST_DMESG_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DMESG");
   str = getenv ("SKIP_TEST_DMESG_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DMESG");
@@ -1699,7 +2692,6 @@ static int test_dmesg_0 (void)
   /* InitNone|InitEmpty for test_dmesg_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_dmesg_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1736,6 +2728,9 @@ static int test_drop_caches_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "drop_caches") == NULL;
   str = getenv ("SKIP_TEST_DROP_CACHES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DROP_CACHES");
   str = getenv ("SKIP_TEST_DROP_CACHES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DROP_CACHES");
@@ -1753,7 +2748,6 @@ static int test_drop_caches_0 (void)
   /* InitNone|InitEmpty for test_drop_caches_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1789,6 +2783,9 @@ static int test_mv_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mv") == NULL;
   str = getenv ("SKIP_TEST_MV_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MV");
   str = getenv ("SKIP_TEST_MV_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MV");
@@ -1806,7 +2803,6 @@ static int test_mv_0 (void)
   /* InitBasicFS for test_mv_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1829,7 +2825,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1844,7 +2839,6 @@ static int test_mv_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1853,7 +2847,6 @@ static int test_mv_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -1901,6 +2894,9 @@ static int test_mv_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mv") == NULL;
   str = getenv ("SKIP_TEST_MV_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MV");
   str = getenv ("SKIP_TEST_MV_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MV");
@@ -1918,7 +2914,6 @@ static int test_mv_1 (void)
   /* InitBasicFS for test_mv_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -1941,7 +2936,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -1956,7 +2950,6 @@ static int test_mv_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -1965,7 +2958,6 @@ static int test_mv_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2011,6 +3003,9 @@ static int test_cp_a_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "cp_a") == NULL;
   str = getenv ("SKIP_TEST_CP_A_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP_A");
   str = getenv ("SKIP_TEST_CP_A_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP_A");
@@ -2028,7 +3023,6 @@ static int test_cp_a_0 (void)
   /* InitBasicFS for test_cp_a_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2051,7 +3045,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2066,7 +3059,6 @@ static int test_cp_a_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2075,7 +3067,6 @@ static int test_cp_a_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2139,6 +3130,9 @@ static int test_cp_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "cp") == NULL;
   str = getenv ("SKIP_TEST_CP_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
   str = getenv ("SKIP_TEST_CP_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
@@ -2156,7 +3150,6 @@ static int test_cp_0 (void)
   /* InitBasicFS for test_cp_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2179,7 +3172,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2194,7 +3186,6 @@ static int test_cp_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2203,7 +3194,6 @@ static int test_cp_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2251,6 +3241,9 @@ static int test_cp_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "cp") == NULL;
   str = getenv ("SKIP_TEST_CP_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
   str = getenv ("SKIP_TEST_CP_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
@@ -2268,7 +3261,6 @@ static int test_cp_1 (void)
   /* InitBasicFS for test_cp_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2291,7 +3283,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2306,7 +3297,6 @@ static int test_cp_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2315,7 +3305,6 @@ static int test_cp_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2361,6 +3350,9 @@ static int test_cp_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "cp") == NULL;
   str = getenv ("SKIP_TEST_CP_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
   str = getenv ("SKIP_TEST_CP_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CP");
@@ -2378,7 +3370,6 @@ static int test_cp_2 (void)
   /* InitBasicFS for test_cp_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2401,7 +3392,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2416,7 +3406,6 @@ static int test_cp_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2425,7 +3414,6 @@ static int test_cp_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2481,6 +3469,9 @@ static int test_grub_install_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "grub_install") == NULL;
   str = getenv ("SKIP_TEST_GRUB_INSTALL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_GRUB_INSTALL");
   str = getenv ("SKIP_TEST_GRUB_INSTALL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_GRUB_INSTALL");
@@ -2498,7 +3489,6 @@ static int test_grub_install_0 (void)
   /* InitBasicFS for test_grub_install_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2521,7 +3511,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2536,7 +3525,6 @@ static int test_grub_install_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2545,7 +3533,6 @@ static int test_grub_install_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2557,7 +3544,6 @@ static int test_grub_install_0 (void)
   {
     char root[] = "/";
     char device[] = "/dev/sda1";
   {
     char root[] = "/";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_grub_install (g, root, device);
     int r;
     suppress_error = 0;
     r = guestfs_grub_install (g, root, device);
@@ -2583,6 +3569,9 @@ static int test_zero_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "zero") == NULL;
   str = getenv ("SKIP_TEST_ZERO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_ZERO");
   str = getenv ("SKIP_TEST_ZERO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_ZERO");
@@ -2600,7 +3589,6 @@ static int test_zero_0 (void)
   /* InitBasicFS for test_zero_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2623,7 +3611,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2638,7 +3625,6 @@ static int test_zero_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2647,7 +3633,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2659,7 +3644,6 @@ static int test_zero_0 (void)
   char expected[] = "data";
   {
     char pathordevice[] = "/dev/sda1";
   char expected[] = "data";
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2668,7 +3652,6 @@ static int test_zero_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2677,7 +3660,6 @@ static int test_zero_0 (void)
   }
   {
     char path[] = "/dev/sda1";
   }
   {
     char path[] = "/dev/sda1";
-    path[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_file (g, path);
     char *r;
     suppress_error = 0;
     r = guestfs_file (g, path);
@@ -2696,6 +3678,9 @@ static int test_fsck_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "fsck") == NULL;
   str = getenv ("SKIP_TEST_FSCK_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FSCK");
   str = getenv ("SKIP_TEST_FSCK_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FSCK");
@@ -2713,7 +3698,6 @@ static int test_fsck_0 (void)
   /* InitBasicFS for test_fsck_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2736,7 +3720,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2751,7 +3734,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2760,7 +3742,6 @@ static int test_fsck_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2771,7 +3752,6 @@ static int test_fsck_0 (void)
   /* TestOutputInt for fsck (0) */
   {
     char pathordevice[] = "/dev/sda1";
   /* TestOutputInt for fsck (0) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2781,7 +3761,6 @@ static int test_fsck_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -2799,6 +3778,9 @@ static int test_fsck_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "fsck") == NULL;
   str = getenv ("SKIP_TEST_FSCK_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FSCK");
   str = getenv ("SKIP_TEST_FSCK_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FSCK");
@@ -2816,7 +3798,6 @@ static int test_fsck_1 (void)
   /* InitBasicFS for test_fsck_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2839,7 +3820,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2854,7 +3834,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2863,7 +3842,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2874,7 +3852,6 @@ static int test_fsck_1 (void)
   /* TestOutputInt for fsck (1) */
   {
     char pathordevice[] = "/dev/sda1";
   /* TestOutputInt for fsck (1) */
   {
     char pathordevice[] = "/dev/sda1";
-    pathordevice[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
     int r;
     suppress_error = 0;
     r = guestfs_umount (g, pathordevice);
@@ -2883,7 +3860,6 @@ static int test_fsck_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_zero (g, device);
@@ -2893,7 +3869,6 @@ static int test_fsck_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_fsck (g, fstype, device);
@@ -2911,6 +3886,9 @@ static int test_set_e2uuid_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "set_e2uuid") == NULL;
   str = getenv ("SKIP_TEST_SET_E2UUID_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
   str = getenv ("SKIP_TEST_SET_E2UUID_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
@@ -2928,7 +3906,6 @@ static int test_set_e2uuid_0 (void)
   /* InitBasicFS for test_set_e2uuid_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -2951,7 +3928,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -2966,7 +3942,6 @@ static int test_set_e2uuid_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -2975,7 +3950,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -2987,7 +3961,6 @@ static int test_set_e2uuid_0 (void)
   char expected[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
   {
     char device[] = "/dev/sda1";
   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 uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
     int r;
     suppress_error = 0;
@@ -2997,7 +3970,6 @@ static int test_set_e2uuid_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3016,6 +3988,9 @@ static int test_set_e2uuid_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "set_e2uuid") == NULL;
   str = getenv ("SKIP_TEST_SET_E2UUID_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
   str = getenv ("SKIP_TEST_SET_E2UUID_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
@@ -3033,7 +4008,6 @@ static int test_set_e2uuid_1 (void)
   /* InitBasicFS for test_set_e2uuid_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3056,7 +4030,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3071,7 +4044,6 @@ static int test_set_e2uuid_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3080,7 +4052,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3092,7 +4063,6 @@ static int test_set_e2uuid_1 (void)
   char expected[] = "";
   {
     char device[] = "/dev/sda1";
   char expected[] = "";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "clear";
     int r;
     suppress_error = 0;
     char uuid[] = "clear";
     int r;
     suppress_error = 0;
@@ -3102,7 +4072,6 @@ static int test_set_e2uuid_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2uuid (g, device);
@@ -3121,6 +4090,9 @@ static int test_set_e2uuid_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "set_e2uuid") == NULL;
   str = getenv ("SKIP_TEST_SET_E2UUID_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
   str = getenv ("SKIP_TEST_SET_E2UUID_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
@@ -3138,7 +4110,6 @@ static int test_set_e2uuid_2 (void)
   /* InitBasicFS for test_set_e2uuid_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3161,7 +4132,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3176,7 +4146,6 @@ static int test_set_e2uuid_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3185,7 +4154,6 @@ static int test_set_e2uuid_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3196,7 +4164,6 @@ static int test_set_e2uuid_2 (void)
   /* TestRun for set_e2uuid (2) */
   {
     char device[] = "/dev/sda1";
   /* TestRun for set_e2uuid (2) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "random";
     int r;
     suppress_error = 0;
     char uuid[] = "random";
     int r;
     suppress_error = 0;
@@ -3211,6 +4178,9 @@ static int test_set_e2uuid_3_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "set_e2uuid") == NULL;
   str = getenv ("SKIP_TEST_SET_E2UUID_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
   str = getenv ("SKIP_TEST_SET_E2UUID_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2UUID");
@@ -3228,7 +4198,6 @@ static int test_set_e2uuid_3 (void)
   /* InitBasicFS for test_set_e2uuid_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3251,7 +4220,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3266,7 +4234,6 @@ static int test_set_e2uuid_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3275,7 +4242,6 @@ static int test_set_e2uuid_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3286,7 +4252,6 @@ static int test_set_e2uuid_3 (void)
   /* TestRun for set_e2uuid (3) */
   {
     char device[] = "/dev/sda1";
   /* TestRun for set_e2uuid (3) */
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char uuid[] = "time";
     int r;
     suppress_error = 0;
     char uuid[] = "time";
     int r;
     suppress_error = 0;
@@ -3301,6 +4266,9 @@ static int test_set_e2label_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "set_e2label") == NULL;
   str = getenv ("SKIP_TEST_SET_E2LABEL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2LABEL");
   str = getenv ("SKIP_TEST_SET_E2LABEL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SET_E2LABEL");
@@ -3318,7 +4286,6 @@ static int test_set_e2label_0 (void)
   /* InitBasicFS for test_set_e2label_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3341,7 +4308,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3356,7 +4322,6 @@ static int test_set_e2label_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -3365,7 +4330,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -3377,7 +4341,6 @@ static int test_set_e2label_0 (void)
   char expected[] = "testlabel";
   {
     char device[] = "/dev/sda1";
   char expected[] = "testlabel";
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char label[] = "testlabel";
     int r;
     suppress_error = 0;
     char label[] = "testlabel";
     int r;
     suppress_error = 0;
@@ -3387,7 +4350,6 @@ static int test_set_e2label_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2label (g, device);
     char *r;
     suppress_error = 0;
     r = guestfs_get_e2label (g, device);
@@ -3406,6 +4368,9 @@ static int test_pvremove_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvremove") == NULL;
   str = getenv ("SKIP_TEST_PVREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
   str = getenv ("SKIP_TEST_PVREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
@@ -3423,7 +4388,6 @@ static int test_pvremove_0 (void)
   /* InitNone|InitEmpty for test_pvremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3444,10 +4408,9 @@ static int test_pvremove_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (0) */
+  /* TestOutputListOfDevices for pvremove (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3461,7 +4424,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3471,7 +4433,6 @@ static int test_pvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3510,7 +4471,6 @@ static int test_pvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3540,6 +4500,9 @@ static int test_pvremove_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvremove") == NULL;
   str = getenv ("SKIP_TEST_PVREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
   str = getenv ("SKIP_TEST_PVREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
@@ -3557,7 +4520,6 @@ static int test_pvremove_1 (void)
   /* InitNone|InitEmpty for test_pvremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3578,10 +4540,9 @@ static int test_pvremove_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (1) */
+  /* TestOutputListOfDevices for pvremove (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3595,7 +4556,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3605,7 +4565,6 @@ static int test_pvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3644,7 +4603,6 @@ static int test_pvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3674,6 +4632,9 @@ static int test_pvremove_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvremove") == NULL;
   str = getenv ("SKIP_TEST_PVREMOVE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
   str = getenv ("SKIP_TEST_PVREMOVE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVREMOVE");
@@ -3691,7 +4652,6 @@ static int test_pvremove_2 (void)
   /* InitNone|InitEmpty for test_pvremove_2 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3712,10 +4672,9 @@ static int test_pvremove_2 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvremove (2) */
+  /* TestOutputListOfDevices for pvremove (2) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3729,7 +4688,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3739,7 +4697,6 @@ static int test_pvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3778,7 +4735,6 @@ static int test_pvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvremove (g, device);
@@ -3808,6 +4764,9 @@ static int test_vgremove_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "vgremove") == NULL;
   str = getenv ("SKIP_TEST_VGREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGREMOVE");
   str = getenv ("SKIP_TEST_VGREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGREMOVE");
@@ -3825,7 +4784,6 @@ static int test_vgremove_0 (void)
   /* InitNone|InitEmpty for test_vgremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3849,7 +4807,6 @@ static int test_vgremove_0 (void)
   /* TestOutputList for vgremove (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3863,7 +4820,6 @@ static int test_vgremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3873,7 +4829,6 @@ static int test_vgremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -3933,6 +4888,9 @@ static int test_vgremove_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "vgremove") == NULL;
   str = getenv ("SKIP_TEST_VGREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGREMOVE");
   str = getenv ("SKIP_TEST_VGREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGREMOVE");
@@ -3950,7 +4908,6 @@ static int test_vgremove_1 (void)
   /* InitNone|InitEmpty for test_vgremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -3974,7 +4931,6 @@ static int test_vgremove_1 (void)
   /* TestOutputList for vgremove (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -3988,7 +4944,6 @@ static int test_vgremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -3998,7 +4953,6 @@ static int test_vgremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4058,6 +5012,9 @@ static int test_lvremove_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvremove") == NULL;
   str = getenv ("SKIP_TEST_LVREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
   str = getenv ("SKIP_TEST_LVREMOVE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
@@ -4075,7 +5032,6 @@ static int test_lvremove_0 (void)
   /* InitNone|InitEmpty for test_lvremove_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4099,7 +5055,6 @@ static int test_lvremove_0 (void)
   /* TestOutputList for lvremove (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4113,7 +5068,6 @@ static int test_lvremove_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4123,7 +5077,6 @@ static int test_lvremove_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4195,6 +5148,9 @@ static int test_lvremove_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvremove") == NULL;
   str = getenv ("SKIP_TEST_LVREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
   str = getenv ("SKIP_TEST_LVREMOVE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
@@ -4212,7 +5168,6 @@ static int test_lvremove_1 (void)
   /* InitNone|InitEmpty for test_lvremove_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4236,7 +5191,6 @@ static int test_lvremove_1 (void)
   /* TestOutputList for lvremove (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4250,7 +5204,6 @@ static int test_lvremove_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4260,7 +5213,6 @@ static int test_lvremove_1 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4320,6 +5272,9 @@ static int test_lvremove_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvremove") == NULL;
   str = getenv ("SKIP_TEST_LVREMOVE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
   str = getenv ("SKIP_TEST_LVREMOVE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVREMOVE");
@@ -4337,7 +5292,6 @@ static int test_lvremove_2 (void)
   /* InitNone|InitEmpty for test_lvremove_2 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvremove_2 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4361,7 +5315,6 @@ static int test_lvremove_2 (void)
   /* TestOutputList for lvremove (2) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvremove (2) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4375,7 +5328,6 @@ static int test_lvremove_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -4385,7 +5337,6 @@ static int test_lvremove_2 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -4457,6 +5408,9 @@ static int test_mount_ro_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mount_ro") == NULL;
   str = getenv ("SKIP_TEST_MOUNT_RO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT_RO");
   str = getenv ("SKIP_TEST_MOUNT_RO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT_RO");
@@ -4474,7 +5428,6 @@ static int test_mount_ro_0 (void)
   /* InitBasicFS for test_mount_ro_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4497,7 +5450,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4512,7 +5464,6 @@ static int test_mount_ro_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4521,7 +5472,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4540,7 +5490,6 @@ static int test_mount_ro_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4563,6 +5512,9 @@ static int test_mount_ro_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mount_ro") == NULL;
   str = getenv ("SKIP_TEST_MOUNT_RO_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT_RO");
   str = getenv ("SKIP_TEST_MOUNT_RO_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT_RO");
@@ -4580,7 +5532,6 @@ static int test_mount_ro_1 (void)
   /* InitBasicFS for test_mount_ro_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4603,7 +5554,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4618,7 +5568,6 @@ static int test_mount_ro_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4627,7 +5576,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4656,7 +5604,6 @@ static int test_mount_ro_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4684,6 +5631,9 @@ static int test_tgz_in_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tgz_in") == NULL;
   str = getenv ("SKIP_TEST_TGZ_IN_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TGZ_IN");
   str = getenv ("SKIP_TEST_TGZ_IN_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TGZ_IN");
@@ -4701,7 +5651,6 @@ static int test_tgz_in_0 (void)
   /* InitBasicFS for test_tgz_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4724,7 +5673,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4739,7 +5687,6 @@ static int test_tgz_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4748,7 +5695,6 @@ static int test_tgz_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4762,7 +5708,7 @@ static int test_tgz_in_0 (void)
     char directory[] = "/";
     int r;
     suppress_error = 0;
     char directory[] = "/";
     int r;
     suppress_error = 0;
-    r = guestfs_tgz_in (g, "images/helloworld.tar.gz", directory);
+    r = guestfs_tgz_in (g, "../images/helloworld.tar.gz", directory);
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
@@ -4786,6 +5732,9 @@ static int test_tar_in_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tar_in") == NULL;
   str = getenv ("SKIP_TEST_TAR_IN_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TAR_IN");
   str = getenv ("SKIP_TEST_TAR_IN_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TAR_IN");
@@ -4803,7 +5752,6 @@ static int test_tar_in_0 (void)
   /* InitBasicFS for test_tar_in_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4826,7 +5774,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4841,7 +5788,6 @@ static int test_tar_in_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4850,7 +5796,6 @@ static int test_tar_in_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4864,7 +5809,7 @@ static int test_tar_in_0 (void)
     char directory[] = "/";
     int r;
     suppress_error = 0;
     char directory[] = "/";
     int r;
     suppress_error = 0;
-    r = guestfs_tar_in (g, "images/helloworld.tar", directory);
+    r = guestfs_tar_in (g, "../images/helloworld.tar", directory);
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
@@ -4888,6 +5833,9 @@ static int test_checksum_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -4905,7 +5853,6 @@ static int test_checksum_0 (void)
   /* InitBasicFS for test_checksum_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -4928,7 +5875,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -4943,7 +5889,6 @@ static int test_checksum_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -4952,7 +5897,6 @@ static int test_checksum_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -4992,6 +5936,9 @@ static int test_checksum_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5009,7 +5956,6 @@ static int test_checksum_1 (void)
   /* InitBasicFS for test_checksum_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5032,7 +5978,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5047,7 +5992,6 @@ static int test_checksum_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5056,7 +6000,6 @@ static int test_checksum_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5082,6 +6025,9 @@ static int test_checksum_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5099,7 +6045,6 @@ static int test_checksum_2 (void)
   /* InitBasicFS for test_checksum_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5122,7 +6067,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5137,7 +6081,6 @@ static int test_checksum_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5146,7 +6089,6 @@ static int test_checksum_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5186,6 +6128,9 @@ static int test_checksum_3_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5203,7 +6148,6 @@ static int test_checksum_3 (void)
   /* InitBasicFS for test_checksum_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5226,7 +6170,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5241,7 +6184,6 @@ static int test_checksum_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5250,7 +6192,6 @@ static int test_checksum_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5290,6 +6231,9 @@ static int test_checksum_4_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5307,7 +6251,6 @@ static int test_checksum_4 (void)
   /* InitBasicFS for test_checksum_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5330,7 +6273,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5345,7 +6287,6 @@ static int test_checksum_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5354,7 +6295,6 @@ static int test_checksum_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5394,6 +6334,9 @@ static int test_checksum_5_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5411,7 +6354,6 @@ static int test_checksum_5 (void)
   /* InitBasicFS for test_checksum_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5434,7 +6376,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5449,7 +6390,6 @@ static int test_checksum_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5458,7 +6398,6 @@ static int test_checksum_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5498,6 +6437,9 @@ static int test_checksum_6_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
   str = getenv ("SKIP_TEST_CHECKSUM_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   str = getenv ("SKIP_TEST_CHECKSUM_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
@@ -5512,10 +6454,112 @@ static int test_checksum_6 (void)
     return 0;
   }
 
     return 0;
   }
 
-  /* InitBasicFS for test_checksum_6: create ext2 on /dev/sda1 */
+  /* InitBasicFS for test_checksum_6: 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;
+  }
+  /* TestOutput for checksum (6) */
+  char expected[] = "109bb6b5b6d5547c1ce03c7a8bd7d8f80c1cb0957f50c4f7fda04692079917e4f9cad52b878f3d8234e1a170b154b72d";
+  {
+    char path[] = "/new";
+    char content[] = "test\n";
+    int r;
+    suppress_error = 0;
+    r = guestfs_write_file (g, path, content, 0);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char csumtype[] = "sha384";
+    char path[] = "/new";
+    char *r;
+    suppress_error = 0;
+    r = guestfs_checksum (g, csumtype, path);
+    if (r == NULL)
+      return -1;
+    if (strcmp (r, expected) != 0) {
+      fprintf (stderr, "test_checksum_6: expected \"%s\" but got \"%s\"\n", expected, r);
+      return -1;
+    }
+    free (r);
+  }
+  return 0;
+}
+
+static int test_checksum_7_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
+  str = getenv ("SKIP_TEST_CHECKSUM_7");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_CHECKSUM");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_checksum_7 (void)
+{
+  if (test_checksum_7_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_7");
+    return 0;
+  }
+
+  /* InitBasicFS for test_checksum_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5538,7 +6582,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5553,7 +6596,6 @@ static int test_checksum_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5562,7 +6604,6 @@ static int test_checksum_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5570,8 +6611,8 @@ static int test_checksum_6 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutput for checksum (6) */
-  char expected[] = "109bb6b5b6d5547c1ce03c7a8bd7d8f80c1cb0957f50c4f7fda04692079917e4f9cad52b878f3d8234e1a170b154b72d";
+  /* TestOutput for checksum (7) */
+  char expected[] = "0e3e75234abc68f4378a86b3f4b32a198ba301845b0cd6e50106e874345700cc6663a86c1ea125dc5e92be17c98f9a0f85ca9d5f595db2012f7cc3571945c123";
   {
     char path[] = "/new";
     char content[] = "test\n";
   {
     char path[] = "/new";
     char content[] = "test\n";
@@ -5582,7 +6623,7 @@ static int test_checksum_6 (void)
       return -1;
   }
   {
       return -1;
   }
   {
-    char csumtype[] = "sha384";
+    char csumtype[] = "sha512";
     char path[] = "/new";
     char *r;
     suppress_error = 0;
     char path[] = "/new";
     char *r;
     suppress_error = 0;
@@ -5590,7 +6631,7 @@ static int test_checksum_6 (void)
     if (r == NULL)
       return -1;
     if (strcmp (r, expected) != 0) {
     if (r == NULL)
       return -1;
     if (strcmp (r, expected) != 0) {
-      fprintf (stderr, "test_checksum_6: expected \"%s\" but got \"%s\"\n", expected, r);
+      fprintf (stderr, "test_checksum_7: expected \"%s\" but got \"%s\"\n", expected, r);
       return -1;
     }
     free (r);
       return -1;
     }
     free (r);
@@ -5598,28 +6639,30 @@ static int test_checksum_6 (void)
   return 0;
 }
 
   return 0;
 }
 
-static int test_checksum_7_skip (void)
+static int test_checksum_8_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
-  str = getenv ("SKIP_TEST_CHECKSUM_7");
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "checksum") == NULL;
+  str = getenv ("SKIP_TEST_CHECKSUM_8");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   if (str && strcmp (str, "1") == 0) return 1;
   return 0;
 }
 
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CHECKSUM");
   if (str && strcmp (str, "1") == 0) return 1;
   return 0;
 }
 
-static int test_checksum_7 (void)
+static int test_checksum_8 (void)
 {
 {
-  if (test_checksum_7_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_7");
+  if (test_checksum_8_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_8");
     return 0;
   }
 
     return 0;
   }
 
-  /* InitBasicFS for test_checksum_7: create ext2 on /dev/sda1 */
+  /* InitBasicFS for test_checksum_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5642,7 +6685,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5657,7 +6699,6 @@ static int test_checksum_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5666,7 +6707,6 @@ static int test_checksum_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5674,27 +6714,29 @@ static int test_checksum_7 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutput for checksum (7) */
-  char expected[] = "0e3e75234abc68f4378a86b3f4b32a198ba301845b0cd6e50106e874345700cc6663a86c1ea125dc5e92be17c98f9a0f85ca9d5f595db2012f7cc3571945c123";
+  /* TestOutput for checksum (8) */
+  char expected[] = "46d6ca27ee07cdc6fa99c2e138cc522c";
   {
   {
-    char path[] = "/new";
-    char content[] = "test\n";
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     int r;
     suppress_error = 0;
-    r = guestfs_write_file (g, path, content, 0);
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
     if (r == -1)
       return -1;
   }
   {
     if (r == -1)
       return -1;
   }
   {
-    char csumtype[] = "sha512";
-    char path[] = "/new";
+    char csumtype[] = "md5";
+    char path[] = "/known-3";
     char *r;
     suppress_error = 0;
     r = guestfs_checksum (g, csumtype, path);
     if (r == NULL)
       return -1;
     if (strcmp (r, expected) != 0) {
     char *r;
     suppress_error = 0;
     r = guestfs_checksum (g, csumtype, path);
     if (r == NULL)
       return -1;
     if (strcmp (r, expected) != 0) {
-      fprintf (stderr, "test_checksum_7: expected \"%s\" but got \"%s\"\n", expected, r);
+      fprintf (stderr, "test_checksum_8: expected \"%s\" but got \"%s\"\n", expected, r);
       return -1;
     }
     free (r);
       return -1;
     }
     free (r);
@@ -5706,6 +6748,9 @@ static int test_download_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "download") == NULL;
   str = getenv ("SKIP_TEST_DOWNLOAD_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DOWNLOAD");
   str = getenv ("SKIP_TEST_DOWNLOAD_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_DOWNLOAD");
@@ -5723,7 +6768,6 @@ static int test_download_0 (void)
   /* InitBasicFS for test_download_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5746,7 +6790,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5761,7 +6804,6 @@ static int test_download_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5770,7 +6812,6 @@ static int test_download_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5784,7 +6825,7 @@ static int test_download_0 (void)
     char remotefilename[] = "/COPYING.LIB";
     int r;
     suppress_error = 0;
     char remotefilename[] = "/COPYING.LIB";
     int r;
     suppress_error = 0;
-    r = guestfs_upload (g, "COPYING.LIB", remotefilename);
+    r = guestfs_upload (g, "../COPYING.LIB", remotefilename);
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
@@ -5825,6 +6866,9 @@ static int test_upload_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "upload") == NULL;
   str = getenv ("SKIP_TEST_UPLOAD_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UPLOAD");
   str = getenv ("SKIP_TEST_UPLOAD_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UPLOAD");
@@ -5842,7 +6886,6 @@ static int test_upload_0 (void)
   /* InitBasicFS for test_upload_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5865,7 +6908,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -5880,7 +6922,6 @@ static int test_upload_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -5889,7 +6930,6 @@ static int test_upload_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -5903,7 +6943,7 @@ static int test_upload_0 (void)
     char remotefilename[] = "/COPYING.LIB";
     int r;
     suppress_error = 0;
     char remotefilename[] = "/COPYING.LIB";
     int r;
     suppress_error = 0;
-    r = guestfs_upload (g, "COPYING.LIB", remotefilename);
+    r = guestfs_upload (g, "../COPYING.LIB", remotefilename);
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
@@ -5928,6 +6968,9 @@ static int test_blockdev_rereadpt_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_rereadpt") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_REREADPT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_REREADPT");
   str = getenv ("SKIP_TEST_BLOCKDEV_REREADPT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_REREADPT");
@@ -5945,7 +6988,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* InitNone|InitEmpty for test_blockdev_rereadpt_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -5969,7 +7011,6 @@ static int test_blockdev_rereadpt_0 (void)
   /* TestRun for blockdev_rereadpt (0) */
   {
     char device[] = "/dev/sda";
   /* TestRun for blockdev_rereadpt (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_rereadpt (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_rereadpt (g, device);
@@ -5983,6 +7024,9 @@ static int test_blockdev_flushbufs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_flushbufs") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_FLUSHBUFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_FLUSHBUFS");
   str = getenv ("SKIP_TEST_BLOCKDEV_FLUSHBUFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_FLUSHBUFS");
@@ -6000,7 +7044,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* InitNone|InitEmpty for test_blockdev_flushbufs_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6024,7 +7067,6 @@ static int test_blockdev_flushbufs_0 (void)
   /* TestRun for blockdev_flushbufs (0) */
   {
     char device[] = "/dev/sda";
   /* TestRun for blockdev_flushbufs (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_flushbufs (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_flushbufs (g, device);
@@ -6038,6 +7080,9 @@ static int test_blockdev_getsize64_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_getsize64") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSIZE64_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSIZE64");
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSIZE64_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSIZE64");
@@ -6055,7 +7100,6 @@ static int test_blockdev_getsize64_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsize64_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6079,7 +7123,6 @@ static int test_blockdev_getsize64_0 (void)
   /* TestOutputInt for blockdev_getsize64 (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getsize64 (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsize64 (g, device);
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsize64 (g, device);
@@ -6097,6 +7140,9 @@ static int test_blockdev_getsz_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_getsz") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSZ_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSZ");
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSZ_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSZ");
@@ -6114,7 +7160,6 @@ static int test_blockdev_getsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getsz_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6138,7 +7183,6 @@ static int test_blockdev_getsz_0 (void)
   /* TestOutputInt for blockdev_getsz (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsz (g, device);
     int64_t r;
     suppress_error = 0;
     r = guestfs_blockdev_getsz (g, device);
@@ -6156,6 +7200,9 @@ static int test_blockdev_getbsz_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_getbsz") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETBSZ_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETBSZ");
   str = getenv ("SKIP_TEST_BLOCKDEV_GETBSZ_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETBSZ");
@@ -6173,7 +7220,6 @@ static int test_blockdev_getbsz_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getbsz_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6197,7 +7243,6 @@ static int test_blockdev_getbsz_0 (void)
   /* TestOutputInt for blockdev_getbsz (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getbsz (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getbsz (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getbsz (g, device);
@@ -6215,6 +7260,9 @@ static int test_blockdev_getss_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_getss") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSS");
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETSS");
@@ -6232,7 +7280,6 @@ static int test_blockdev_getss_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getss_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6256,7 +7303,6 @@ static int test_blockdev_getss_0 (void)
   /* TestOutputInt for blockdev_getss (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputInt for blockdev_getss (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getss (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getss (g, device);
@@ -6274,6 +7320,9 @@ static int test_blockdev_getro_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_getro") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETRO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETRO");
   str = getenv ("SKIP_TEST_BLOCKDEV_GETRO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_GETRO");
@@ -6291,7 +7340,6 @@ static int test_blockdev_getro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_getro_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6315,7 +7363,6 @@ static int test_blockdev_getro_0 (void)
   /* TestOutputTrue for blockdev_getro (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputTrue for blockdev_getro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6324,7 +7371,6 @@ static int test_blockdev_getro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6342,6 +7388,9 @@ static int test_blockdev_setrw_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_setrw") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRW_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRW");
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRW_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRW");
@@ -6359,7 +7408,6 @@ static int test_blockdev_setrw_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setrw_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6383,7 +7431,6 @@ static int test_blockdev_setrw_0 (void)
   /* TestOutputFalse for blockdev_setrw (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputFalse for blockdev_setrw (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6392,7 +7439,6 @@ static int test_blockdev_setrw_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6410,6 +7456,9 @@ static int test_blockdev_setro_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "blockdev_setro") == NULL;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRO");
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRO_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_BLOCKDEV_SETRO");
@@ -6427,7 +7476,6 @@ static int test_blockdev_setro_0 (void)
   /* InitNone|InitEmpty for test_blockdev_setro_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6451,7 +7499,6 @@ static int test_blockdev_setro_0 (void)
   /* TestOutputTrue for blockdev_setro (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputTrue for blockdev_setro (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setro (g, device);
@@ -6460,7 +7507,6 @@ static int test_blockdev_setro_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_getro (g, device);
@@ -6478,6 +7524,9 @@ static int test_statvfs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "statvfs") == NULL;
   str = getenv ("SKIP_TEST_STATVFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STATVFS");
   str = getenv ("SKIP_TEST_STATVFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STATVFS");
@@ -6495,7 +7544,6 @@ static int test_statvfs_0 (void)
   /* InitBasicFS for test_statvfs_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6518,7 +7566,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6533,7 +7580,6 @@ static int test_statvfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6542,7 +7588,6 @@ static int test_statvfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6582,6 +7627,9 @@ static int test_lstat_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lstat") == NULL;
   str = getenv ("SKIP_TEST_LSTAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LSTAT");
   str = getenv ("SKIP_TEST_LSTAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LSTAT");
@@ -6599,7 +7647,6 @@ static int test_lstat_0 (void)
   /* InitBasicFS for test_lstat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6622,7 +7669,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6637,7 +7683,6 @@ static int test_lstat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6646,7 +7691,6 @@ static int test_lstat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6684,6 +7728,9 @@ static int test_stat_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "stat") == NULL;
   str = getenv ("SKIP_TEST_STAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STAT");
   str = getenv ("SKIP_TEST_STAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_STAT");
@@ -6701,7 +7748,6 @@ static int test_stat_0 (void)
   /* InitBasicFS for test_stat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6724,7 +7770,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6739,7 +7784,6 @@ static int test_stat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6748,7 +7792,6 @@ static int test_stat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6786,6 +7829,9 @@ static int test_command_lines_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -6803,7 +7849,6 @@ static int test_command_lines_0 (void)
   /* InitBasicFS for test_command_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6826,7 +7871,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6841,7 +7885,6 @@ static int test_command_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6850,7 +7893,6 @@ static int test_command_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -6917,6 +7959,9 @@ static int test_command_lines_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -6934,7 +7979,6 @@ static int test_command_lines_1 (void)
   /* InitBasicFS for test_command_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -6957,7 +8001,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -6972,7 +8015,6 @@ static int test_command_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -6981,7 +8023,6 @@ static int test_command_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7048,6 +8089,9 @@ static int test_command_lines_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7065,7 +8109,6 @@ static int test_command_lines_2 (void)
   /* InitBasicFS for test_command_lines_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7088,7 +8131,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7103,7 +8145,6 @@ static int test_command_lines_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7112,7 +8153,6 @@ static int test_command_lines_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7191,6 +8231,9 @@ static int test_command_lines_3_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7208,7 +8251,6 @@ static int test_command_lines_3 (void)
   /* InitBasicFS for test_command_lines_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7231,7 +8273,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7246,7 +8287,6 @@ static int test_command_lines_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7255,7 +8295,6 @@ static int test_command_lines_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7334,6 +8373,9 @@ static int test_command_lines_4_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7351,7 +8393,6 @@ static int test_command_lines_4 (void)
   /* InitBasicFS for test_command_lines_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7374,7 +8415,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7389,7 +8429,6 @@ static int test_command_lines_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7398,7 +8437,6 @@ static int test_command_lines_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7489,6 +8527,9 @@ static int test_command_lines_5_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7506,7 +8547,6 @@ static int test_command_lines_5 (void)
   /* InitBasicFS for test_command_lines_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7529,7 +8569,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7544,7 +8583,6 @@ static int test_command_lines_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7553,7 +8591,6 @@ static int test_command_lines_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7656,6 +8693,9 @@ static int test_command_lines_6_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7673,7 +8713,6 @@ static int test_command_lines_6 (void)
   /* InitBasicFS for test_command_lines_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7696,7 +8735,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7711,7 +8749,6 @@ static int test_command_lines_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7720,7 +8757,6 @@ static int test_command_lines_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7775,6 +8811,9 @@ static int test_command_lines_7_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_7");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_7");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7792,7 +8831,6 @@ static int test_command_lines_7 (void)
   /* InitBasicFS for test_command_lines_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7815,7 +8853,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7830,7 +8867,6 @@ static int test_command_lines_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7839,7 +8875,6 @@ static int test_command_lines_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -7906,6 +8941,9 @@ static int test_command_lines_8_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_8");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_8");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -7923,7 +8961,6 @@ static int test_command_lines_8 (void)
   /* InitBasicFS for test_command_lines_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -7946,7 +8983,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -7961,7 +8997,6 @@ static int test_command_lines_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -7970,7 +9005,6 @@ static int test_command_lines_8 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8049,6 +9083,9 @@ static int test_command_lines_9_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_9");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_9");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -8066,7 +9103,6 @@ static int test_command_lines_9 (void)
   /* InitBasicFS for test_command_lines_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8089,7 +9125,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8104,7 +9139,6 @@ static int test_command_lines_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8113,7 +9147,6 @@ static int test_command_lines_9 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8192,6 +9225,9 @@ static int test_command_lines_10_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command_lines") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_LINES_10");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
   str = getenv ("SKIP_TEST_COMMAND_LINES_10");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND_LINES");
@@ -8209,7 +9245,6 @@ static int test_command_lines_10 (void)
   /* InitBasicFS for test_command_lines_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8232,7 +9267,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8247,7 +9281,6 @@ static int test_command_lines_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8256,7 +9289,6 @@ static int test_command_lines_10 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8335,6 +9367,9 @@ static int test_command_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8352,7 +9387,6 @@ static int test_command_0 (void)
   /* InitBasicFS for test_command_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8375,7 +9409,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8390,7 +9423,6 @@ static int test_command_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8399,7 +9431,6 @@ static int test_command_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8451,6 +9482,9 @@ static int test_command_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8468,7 +9502,6 @@ static int test_command_1 (void)
   /* InitBasicFS for test_command_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8491,7 +9524,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8506,7 +9538,6 @@ static int test_command_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8515,7 +9546,6 @@ static int test_command_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8567,6 +9597,9 @@ static int test_command_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8584,7 +9617,6 @@ static int test_command_2 (void)
   /* InitBasicFS for test_command_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8607,7 +9639,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8622,7 +9653,6 @@ static int test_command_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8631,7 +9661,6 @@ static int test_command_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8683,6 +9712,9 @@ static int test_command_3_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8700,7 +9732,6 @@ static int test_command_3 (void)
   /* InitBasicFS for test_command_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8723,7 +9754,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8738,7 +9768,6 @@ static int test_command_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8747,7 +9776,6 @@ static int test_command_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8799,6 +9827,9 @@ static int test_command_4_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8816,7 +9847,6 @@ static int test_command_4 (void)
   /* InitBasicFS for test_command_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8839,7 +9869,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8854,7 +9883,6 @@ static int test_command_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8863,7 +9891,6 @@ static int test_command_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -8915,6 +9942,9 @@ static int test_command_5_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -8932,7 +9962,6 @@ static int test_command_5 (void)
   /* InitBasicFS for test_command_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -8955,7 +9984,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -8970,7 +9998,6 @@ static int test_command_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -8979,7 +10006,6 @@ static int test_command_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9031,6 +10057,9 @@ static int test_command_6_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_6");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9048,7 +10077,6 @@ static int test_command_6 (void)
   /* InitBasicFS for test_command_6: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9071,7 +10099,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9086,7 +10113,6 @@ static int test_command_6 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9095,7 +10121,6 @@ static int test_command_6 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9147,6 +10172,9 @@ static int test_command_7_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_7");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_7");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9164,7 +10192,6 @@ static int test_command_7 (void)
   /* InitBasicFS for test_command_7: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9187,7 +10214,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9202,7 +10228,6 @@ static int test_command_7 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9211,7 +10236,6 @@ static int test_command_7 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9263,6 +10287,9 @@ static int test_command_8_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_8");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_8");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9280,7 +10307,6 @@ static int test_command_8 (void)
   /* InitBasicFS for test_command_8: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9303,7 +10329,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9318,7 +10343,6 @@ static int test_command_8 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9327,7 +10351,6 @@ static int test_command_8 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9379,6 +10402,9 @@ static int test_command_9_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_9");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_9");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9396,7 +10422,6 @@ static int test_command_9 (void)
   /* InitBasicFS for test_command_9: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9419,7 +10444,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9434,7 +10458,6 @@ static int test_command_9 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9443,7 +10466,6 @@ static int test_command_9 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9495,6 +10517,9 @@ static int test_command_10_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_10");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_10");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9512,7 +10537,6 @@ static int test_command_10 (void)
   /* InitBasicFS for test_command_10: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9535,7 +10559,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9550,7 +10573,6 @@ static int test_command_10 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9559,7 +10581,6 @@ static int test_command_10 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9611,6 +10632,9 @@ static int test_command_11_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "command") == NULL;
   str = getenv ("SKIP_TEST_COMMAND_11");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
   str = getenv ("SKIP_TEST_COMMAND_11");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_COMMAND");
@@ -9628,7 +10652,6 @@ static int test_command_11 (void)
   /* InitBasicFS for test_command_11: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9651,7 +10674,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9666,7 +10688,6 @@ static int test_command_11 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9675,7 +10696,6 @@ static int test_command_11 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9720,6 +10740,9 @@ static int test_file_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "file") == NULL;
   str = getenv ("SKIP_TEST_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
   str = getenv ("SKIP_TEST_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
@@ -9737,7 +10760,6 @@ static int test_file_0 (void)
   /* InitBasicFS for test_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9760,7 +10782,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9775,7 +10796,6 @@ static int test_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9784,7 +10804,6 @@ static int test_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9822,6 +10841,9 @@ static int test_file_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "file") == NULL;
   str = getenv ("SKIP_TEST_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
   str = getenv ("SKIP_TEST_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
@@ -9839,7 +10861,6 @@ static int test_file_1 (void)
   /* InitBasicFS for test_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9862,7 +10883,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9877,7 +10897,6 @@ static int test_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9886,7 +10905,6 @@ static int test_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -9925,6 +10943,9 @@ static int test_file_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "file") == NULL;
   str = getenv ("SKIP_TEST_FILE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
   str = getenv ("SKIP_TEST_FILE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_FILE");
@@ -9942,7 +10963,6 @@ static int test_file_2 (void)
   /* InitBasicFS for test_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -9965,7 +10985,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -9980,7 +10999,6 @@ static int test_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -9989,7 +11007,6 @@ static int test_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10014,6 +11031,9 @@ static int test_umount_all_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "umount_all") == NULL;
   str = getenv ("SKIP_TEST_UMOUNT_ALL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT_ALL");
   str = getenv ("SKIP_TEST_UMOUNT_ALL_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT_ALL");
@@ -10031,7 +11051,6 @@ static int test_umount_all_0 (void)
   /* InitBasicFS for test_umount_all_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10054,7 +11073,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10069,7 +11087,6 @@ static int test_umount_all_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10078,7 +11095,6 @@ static int test_umount_all_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10117,6 +11133,9 @@ static int test_umount_all_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "umount_all") == NULL;
   str = getenv ("SKIP_TEST_UMOUNT_ALL_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT_ALL");
   str = getenv ("SKIP_TEST_UMOUNT_ALL_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT_ALL");
@@ -10134,7 +11153,6 @@ static int test_umount_all_1 (void)
   /* InitNone|InitEmpty for test_umount_all_1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10158,7 +11176,6 @@ static int test_umount_all_1 (void)
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for umount_all (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -10177,7 +11194,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10187,7 +11203,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda2";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10197,7 +11212,6 @@ static int test_umount_all_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda3";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10206,7 +11220,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10224,7 +11237,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     char mountpoint[] = "/mp1";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/mp1";
     int r;
     suppress_error = 0;
@@ -10242,7 +11254,6 @@ static int test_umount_all_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     char mountpoint[] = "/mp1/mp2";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/mp1/mp2";
     int r;
     suppress_error = 0;
@@ -10288,6 +11299,9 @@ static int test_mounts_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mounts") == NULL;
   str = getenv ("SKIP_TEST_MOUNTS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNTS");
   str = getenv ("SKIP_TEST_MOUNTS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNTS");
@@ -10305,7 +11319,6 @@ static int test_mounts_0 (void)
   /* InitBasicFS for test_mounts_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10328,7 +11341,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10343,7 +11355,6 @@ static int test_mounts_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10352,7 +11363,6 @@ static int test_mounts_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10360,7 +11370,7 @@ static int test_mounts_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for mounts (0) */
+  /* TestOutputListOfDevices for mounts (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -10375,7 +11385,7 @@ static int test_mounts_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_mounts_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10397,6 +11407,9 @@ static int test_umount_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "umount") == NULL;
   str = getenv ("SKIP_TEST_UMOUNT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT");
   str = getenv ("SKIP_TEST_UMOUNT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT");
@@ -10414,7 +11427,6 @@ static int test_umount_0 (void)
   /* InitNone|InitEmpty for test_umount_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_umount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10435,10 +11447,9 @@ static int test_umount_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for umount (0) */
+  /* TestOutputListOfDevices for umount (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10453,7 +11464,6 @@ static int test_umount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10462,7 +11472,6 @@ static int test_umount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10484,7 +11493,7 @@ static int test_umount_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_umount_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -10506,6 +11515,9 @@ static int test_umount_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "umount") == NULL;
   str = getenv ("SKIP_TEST_UMOUNT_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT");
   str = getenv ("SKIP_TEST_UMOUNT_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_UMOUNT");
@@ -10523,7 +11535,6 @@ static int test_umount_1 (void)
   /* InitNone|InitEmpty for test_umount_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_umount_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10547,7 +11558,6 @@ static int test_umount_1 (void)
   /* TestOutputList for umount (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for umount (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10562,7 +11572,6 @@ static int test_umount_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10571,7 +11580,6 @@ static int test_umount_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10610,6 +11618,9 @@ static int test_write_file_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -10627,7 +11638,6 @@ static int test_write_file_0 (void)
   /* InitBasicFS for test_write_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10650,7 +11660,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10665,7 +11674,6 @@ static int test_write_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10674,7 +11682,6 @@ static int test_write_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10713,6 +11720,9 @@ static int test_write_file_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -10730,7 +11740,6 @@ static int test_write_file_1 (void)
   /* InitBasicFS for test_write_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10753,7 +11762,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10768,7 +11776,6 @@ static int test_write_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10777,7 +11784,6 @@ static int test_write_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10816,6 +11822,9 @@ static int test_write_file_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -10833,7 +11842,6 @@ static int test_write_file_2 (void)
   /* InitBasicFS for test_write_file_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10856,7 +11864,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10871,7 +11878,6 @@ static int test_write_file_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10880,7 +11886,6 @@ static int test_write_file_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -10919,6 +11924,9 @@ static int test_write_file_3_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_3");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -10936,7 +11944,6 @@ static int test_write_file_3 (void)
   /* InitBasicFS for test_write_file_3: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -10959,7 +11966,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -10974,7 +11980,6 @@ static int test_write_file_3 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -10983,7 +11988,6 @@ static int test_write_file_3 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11022,6 +12026,9 @@ static int test_write_file_4_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_4");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -11039,7 +12046,6 @@ static int test_write_file_4 (void)
   /* InitBasicFS for test_write_file_4: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11062,7 +12068,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11077,7 +12082,6 @@ static int test_write_file_4 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11086,7 +12090,6 @@ static int test_write_file_4 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11125,6 +12128,9 @@ static int test_write_file_5_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "write_file") == NULL;
   str = getenv ("SKIP_TEST_WRITE_FILE_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
   str = getenv ("SKIP_TEST_WRITE_FILE_5");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_WRITE_FILE");
@@ -11142,7 +12148,6 @@ static int test_write_file_5 (void)
   /* InitBasicFS for test_write_file_5: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11165,7 +12170,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11180,7 +12184,6 @@ static int test_write_file_5 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11189,7 +12192,6 @@ static int test_write_file_5 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11228,6 +12230,9 @@ static int test_mkfs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkfs") == NULL;
   str = getenv ("SKIP_TEST_MKFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKFS");
   str = getenv ("SKIP_TEST_MKFS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKFS");
@@ -11245,7 +12250,6 @@ static int test_mkfs_0 (void)
   /* InitNone|InitEmpty for test_mkfs_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_mkfs_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11270,7 +12274,6 @@ static int test_mkfs_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11285,7 +12288,6 @@ static int test_mkfs_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11294,7 +12296,6 @@ static int test_mkfs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11331,6 +12332,9 @@ static int test_lvcreate_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvcreate") == NULL;
   str = getenv ("SKIP_TEST_LVCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVCREATE");
   str = getenv ("SKIP_TEST_LVCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVCREATE");
@@ -11348,7 +12352,6 @@ static int test_lvcreate_0 (void)
   /* InitNone|InitEmpty for test_lvcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11372,7 +12375,6 @@ static int test_lvcreate_0 (void)
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11390,7 +12392,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11399,7 +12400,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11408,7 +12408,6 @@ static int test_lvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11418,9 +12417,7 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11435,7 +12432,6 @@ static int test_lvcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11574,6 +12570,9 @@ static int test_vgcreate_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "vgcreate") == NULL;
   str = getenv ("SKIP_TEST_VGCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGCREATE");
   str = getenv ("SKIP_TEST_VGCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGCREATE");
@@ -11591,7 +12590,6 @@ static int test_vgcreate_0 (void)
   /* InitNone|InitEmpty for test_vgcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11615,7 +12613,6 @@ static int test_vgcreate_0 (void)
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgcreate (0) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11633,7 +12630,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11642,7 +12638,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11651,7 +12646,6 @@ static int test_vgcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11661,9 +12655,7 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -11678,7 +12670,6 @@ static int test_vgcreate_0 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -11736,6 +12727,9 @@ static int test_pvcreate_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvcreate") == NULL;
   str = getenv ("SKIP_TEST_PVCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVCREATE");
   str = getenv ("SKIP_TEST_PVCREATE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVCREATE");
@@ -11753,7 +12747,6 @@ static int test_pvcreate_0 (void)
   /* InitNone|InitEmpty for test_pvcreate_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvcreate_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11774,10 +12767,9 @@ static int test_pvcreate_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvcreate (0) */
+  /* TestOutputListOfDevices for pvcreate (0) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -11795,7 +12787,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11804,7 +12795,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11813,7 +12803,6 @@ static int test_pvcreate_0 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -11834,7 +12823,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -11847,7 +12836,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -11860,7 +12849,7 @@ static int test_pvcreate_0 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvcreate_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -11882,6 +12871,9 @@ static int test_is_dir_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "is_dir") == NULL;
   str = getenv ("SKIP_TEST_IS_DIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_DIR");
   str = getenv ("SKIP_TEST_IS_DIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_DIR");
@@ -11899,7 +12891,6 @@ static int test_is_dir_0 (void)
   /* InitBasicFS for test_is_dir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -11922,7 +12913,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -11937,7 +12927,6 @@ static int test_is_dir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -11946,7 +12935,6 @@ static int test_is_dir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -11982,6 +12970,9 @@ static int test_is_dir_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "is_dir") == NULL;
   str = getenv ("SKIP_TEST_IS_DIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_DIR");
   str = getenv ("SKIP_TEST_IS_DIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_DIR");
@@ -11999,7 +12990,6 @@ static int test_is_dir_1 (void)
   /* InitBasicFS for test_is_dir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12022,7 +13012,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12037,7 +13026,6 @@ static int test_is_dir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12046,7 +13034,6 @@ static int test_is_dir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12082,6 +13069,9 @@ static int test_is_file_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "is_file") == NULL;
   str = getenv ("SKIP_TEST_IS_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_FILE");
   str = getenv ("SKIP_TEST_IS_FILE_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_FILE");
@@ -12099,7 +13089,6 @@ static int test_is_file_0 (void)
   /* InitBasicFS for test_is_file_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12122,7 +13111,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12137,7 +13125,6 @@ static int test_is_file_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12146,7 +13133,6 @@ static int test_is_file_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12182,6 +13168,9 @@ static int test_is_file_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "is_file") == NULL;
   str = getenv ("SKIP_TEST_IS_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_FILE");
   str = getenv ("SKIP_TEST_IS_FILE_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_IS_FILE");
@@ -12199,7 +13188,6 @@ static int test_is_file_1 (void)
   /* InitBasicFS for test_is_file_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12222,7 +13210,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12237,7 +13224,6 @@ static int test_is_file_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12246,7 +13232,6 @@ static int test_is_file_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12282,6 +13267,9 @@ static int test_exists_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "exists") == NULL;
   str = getenv ("SKIP_TEST_EXISTS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EXISTS");
   str = getenv ("SKIP_TEST_EXISTS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EXISTS");
@@ -12299,7 +13287,6 @@ static int test_exists_0 (void)
   /* InitBasicFS for test_exists_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12322,7 +13309,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12337,7 +13323,6 @@ static int test_exists_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12346,7 +13331,6 @@ static int test_exists_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12382,6 +13366,9 @@ static int test_exists_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "exists") == NULL;
   str = getenv ("SKIP_TEST_EXISTS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EXISTS");
   str = getenv ("SKIP_TEST_EXISTS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_EXISTS");
@@ -12399,7 +13386,6 @@ static int test_exists_1 (void)
   /* InitBasicFS for test_exists_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12422,7 +13408,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12437,7 +13422,6 @@ static int test_exists_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12446,7 +13430,6 @@ static int test_exists_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12482,6 +13465,9 @@ static int test_mkdir_p_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir_p") == NULL;
   str = getenv ("SKIP_TEST_MKDIR_P_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
   str = getenv ("SKIP_TEST_MKDIR_P_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
@@ -12499,7 +13485,6 @@ static int test_mkdir_p_0 (void)
   /* InitBasicFS for test_mkdir_p_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12522,7 +13507,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12537,7 +13521,6 @@ static int test_mkdir_p_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12546,7 +13529,6 @@ static int test_mkdir_p_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12582,6 +13564,9 @@ static int test_mkdir_p_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir_p") == NULL;
   str = getenv ("SKIP_TEST_MKDIR_P_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
   str = getenv ("SKIP_TEST_MKDIR_P_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
@@ -12599,7 +13584,6 @@ static int test_mkdir_p_1 (void)
   /* InitBasicFS for test_mkdir_p_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12622,7 +13606,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12637,7 +13620,6 @@ static int test_mkdir_p_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12646,7 +13628,6 @@ static int test_mkdir_p_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12682,6 +13663,9 @@ static int test_mkdir_p_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir_p") == NULL;
   str = getenv ("SKIP_TEST_MKDIR_P_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
   str = getenv ("SKIP_TEST_MKDIR_P_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR_P");
@@ -12699,7 +13683,6 @@ static int test_mkdir_p_2 (void)
   /* InitBasicFS for test_mkdir_p_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12722,7 +13705,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12737,7 +13719,6 @@ static int test_mkdir_p_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12746,7 +13727,6 @@ static int test_mkdir_p_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12778,10 +13758,203 @@ static int test_mkdir_p_2 (void)
   return 0;
 }
 
   return 0;
 }
 
+static int test_mkdir_p_3_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir_p") == NULL;
+  str = getenv ("SKIP_TEST_MKDIR_P_3");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKDIR_P");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkdir_p_3 (void)
+{
+  if (test_mkdir_p_3_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_3");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mkdir_p_3: 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;
+  }
+  /* TestRun for mkdir_p (3) */
+  {
+    char path[] = "/new";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/new";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir_p (g, path);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_mkdir_p_4_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir_p") == NULL;
+  str = getenv ("SKIP_TEST_MKDIR_P_4");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKDIR_P");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkdir_p_4 (void)
+{
+  if (test_mkdir_p_4_skip ()) {
+    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_4");
+    return 0;
+  }
+
+  /* InitBasicFS for test_mkdir_p_4: 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;
+  }
+  /* TestLastFail for mkdir_p (4) */
+  {
+    char path[] = "/new";
+    int r;
+    suppress_error = 0;
+    r = guestfs_touch (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/new";
+    int r;
+    suppress_error = 1;
+    r = guestfs_mkdir_p (g, path);
+    if (r != -1)
+      return -1;
+  }
+  return 0;
+}
+
 static int test_mkdir_0_skip (void)
 {
   const char *str;
 
 static int test_mkdir_0_skip (void)
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir") == NULL;
   str = getenv ("SKIP_TEST_MKDIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR");
   str = getenv ("SKIP_TEST_MKDIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR");
@@ -12799,7 +13972,6 @@ static int test_mkdir_0 (void)
   /* InitBasicFS for test_mkdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12822,7 +13994,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12837,7 +14008,6 @@ static int test_mkdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12846,7 +14016,6 @@ static int test_mkdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12882,6 +14051,9 @@ static int test_mkdir_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkdir") == NULL;
   str = getenv ("SKIP_TEST_MKDIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR");
   str = getenv ("SKIP_TEST_MKDIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MKDIR");
@@ -12899,7 +14071,6 @@ static int test_mkdir_1 (void)
   /* InitBasicFS for test_mkdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -12922,7 +14093,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -12937,7 +14107,6 @@ static int test_mkdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -12946,7 +14115,6 @@ static int test_mkdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -12970,6 +14138,9 @@ static int test_rm_rf_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rm_rf") == NULL;
   str = getenv ("SKIP_TEST_RM_RF_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM_RF");
   str = getenv ("SKIP_TEST_RM_RF_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM_RF");
@@ -12987,7 +14158,6 @@ static int test_rm_rf_0 (void)
   /* InitBasicFS for test_rm_rf_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13010,7 +14180,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13025,7 +14194,6 @@ static int test_rm_rf_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13034,7 +14202,6 @@ static int test_rm_rf_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13094,6 +14261,9 @@ static int test_rmdir_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rmdir") == NULL;
   str = getenv ("SKIP_TEST_RMDIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
   str = getenv ("SKIP_TEST_RMDIR_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
@@ -13111,7 +14281,6 @@ static int test_rmdir_0 (void)
   /* InitBasicFS for test_rmdir_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13134,7 +14303,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13149,7 +14317,6 @@ static int test_rmdir_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13158,7 +14325,6 @@ static int test_rmdir_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13190,6 +14356,9 @@ static int test_rmdir_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rmdir") == NULL;
   str = getenv ("SKIP_TEST_RMDIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
   str = getenv ("SKIP_TEST_RMDIR_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
@@ -13207,7 +14376,6 @@ static int test_rmdir_1 (void)
   /* InitBasicFS for test_rmdir_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13230,7 +14398,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13245,7 +14412,6 @@ static int test_rmdir_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13254,7 +14420,6 @@ static int test_rmdir_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13278,6 +14443,9 @@ static int test_rmdir_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rmdir") == NULL;
   str = getenv ("SKIP_TEST_RMDIR_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
   str = getenv ("SKIP_TEST_RMDIR_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RMDIR");
@@ -13295,7 +14463,6 @@ static int test_rmdir_2 (void)
   /* InitBasicFS for test_rmdir_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13318,7 +14485,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13333,7 +14499,6 @@ static int test_rmdir_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13342,7 +14507,6 @@ static int test_rmdir_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13374,6 +14538,9 @@ static int test_rm_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rm") == NULL;
   str = getenv ("SKIP_TEST_RM_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
   str = getenv ("SKIP_TEST_RM_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
@@ -13391,7 +14558,6 @@ static int test_rm_0 (void)
   /* InitBasicFS for test_rm_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13414,7 +14580,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13429,7 +14594,6 @@ static int test_rm_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13438,7 +14602,6 @@ static int test_rm_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13470,6 +14633,9 @@ static int test_rm_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rm") == NULL;
   str = getenv ("SKIP_TEST_RM_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
   str = getenv ("SKIP_TEST_RM_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
@@ -13487,7 +14653,6 @@ static int test_rm_1 (void)
   /* InitBasicFS for test_rm_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13510,7 +14675,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13525,7 +14689,6 @@ static int test_rm_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13534,7 +14697,6 @@ static int test_rm_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13558,6 +14720,9 @@ static int test_rm_2_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "rm") == NULL;
   str = getenv ("SKIP_TEST_RM_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
   str = getenv ("SKIP_TEST_RM_2");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_RM");
@@ -13575,7 +14740,6 @@ static int test_rm_2 (void)
   /* InitBasicFS for test_rm_2: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13598,7 +14762,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13613,7 +14776,6 @@ static int test_rm_2 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13622,7 +14784,6 @@ static int test_rm_2 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13654,6 +14815,9 @@ static int test_read_lines_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "read_lines") == NULL;
   str = getenv ("SKIP_TEST_READ_LINES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_READ_LINES");
   str = getenv ("SKIP_TEST_READ_LINES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_READ_LINES");
@@ -13671,7 +14835,6 @@ static int test_read_lines_0 (void)
   /* InitBasicFS for test_read_lines_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13694,7 +14857,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13709,7 +14871,6 @@ static int test_read_lines_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13718,7 +14879,6 @@ static int test_read_lines_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13796,6 +14956,9 @@ static int test_read_lines_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "read_lines") == NULL;
   str = getenv ("SKIP_TEST_READ_LINES_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_READ_LINES");
   str = getenv ("SKIP_TEST_READ_LINES_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_READ_LINES");
@@ -13813,7 +14976,6 @@ static int test_read_lines_1 (void)
   /* InitBasicFS for test_read_lines_1: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13836,7 +14998,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13851,7 +15012,6 @@ static int test_read_lines_1 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -13860,7 +15020,6 @@ static int test_read_lines_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -13902,6 +15061,9 @@ static int test_lvs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvs") == NULL;
   str = getenv ("SKIP_TEST_LVS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVS");
   str = getenv ("SKIP_TEST_LVS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVS");
@@ -13919,7 +15081,6 @@ static int test_lvs_0 (void)
   /* InitBasicFSonLVM for test_lvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -13942,7 +15103,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -13956,7 +15116,6 @@ static int test_lvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -13966,7 +15125,6 @@ static int test_lvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14040,6 +15198,9 @@ static int test_lvs_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "lvs") == NULL;
   str = getenv ("SKIP_TEST_LVS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVS");
   str = getenv ("SKIP_TEST_LVS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LVS");
@@ -14057,7 +15218,6 @@ static int test_lvs_1 (void)
   /* InitNone|InitEmpty for test_lvs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_lvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14081,7 +15241,6 @@ static int test_lvs_1 (void)
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for lvs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14099,7 +15258,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14108,7 +15266,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14117,7 +15274,6 @@ static int test_lvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14127,9 +15283,7 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14144,7 +15298,6 @@ static int test_lvs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14241,6 +15394,9 @@ static int test_vgs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "vgs") == NULL;
   str = getenv ("SKIP_TEST_VGS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGS");
   str = getenv ("SKIP_TEST_VGS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGS");
@@ -14258,7 +15414,6 @@ static int test_vgs_0 (void)
   /* InitBasicFSonLVM for test_vgs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14281,7 +15436,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14295,7 +15449,6 @@ static int test_vgs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14305,7 +15458,6 @@ static int test_vgs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14379,6 +15531,9 @@ static int test_vgs_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "vgs") == NULL;
   str = getenv ("SKIP_TEST_VGS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGS");
   str = getenv ("SKIP_TEST_VGS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_VGS");
@@ -14396,7 +15551,6 @@ static int test_vgs_1 (void)
   /* InitNone|InitEmpty for test_vgs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_vgs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14420,7 +15574,6 @@ static int test_vgs_1 (void)
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
   /* TestOutputList for vgs (1) */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14438,7 +15591,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14447,7 +15599,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14456,7 +15607,6 @@ static int test_vgs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14466,9 +15616,7 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG1";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char physvols_1[] = "/dev/sda2";
     char physvols_1[] = "/dev/sda2";
-    physvols_1[5] = devchar;
     char *physvols[] = {
       physvols_0,
       physvols_1,
     char *physvols[] = {
       physvols_0,
       physvols_1,
@@ -14483,7 +15631,6 @@ static int test_vgs_1 (void)
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
   {
     char volgroup[] = "VG2";
     char physvols_0[] = "/dev/sda3";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14541,6 +15688,9 @@ static int test_pvs_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvs") == NULL;
   str = getenv ("SKIP_TEST_PVS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVS");
   str = getenv ("SKIP_TEST_PVS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVS");
@@ -14558,7 +15708,6 @@ static int test_pvs_0 (void)
   /* InitBasicFSonLVM for test_pvs_0: create ext2 on /dev/VG/LV */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14581,7 +15730,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14595,7 +15743,6 @@ static int test_pvs_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14605,7 +15752,6 @@ static int test_pvs_0 (void)
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
   {
     char volgroup[] = "VG";
     char physvols_0[] = "/dev/sda1";
-    physvols_0[5] = devchar;
     char *physvols[] = {
       physvols_0,
       NULL
     char *physvols[] = {
       physvols_0,
       NULL
@@ -14643,7 +15789,7 @@ static int test_pvs_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (0) */
+  /* TestOutputListOfDevices for pvs (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -14658,7 +15804,7 @@ static int test_pvs_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -14680,6 +15826,9 @@ static int test_pvs_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "pvs") == NULL;
   str = getenv ("SKIP_TEST_PVS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVS");
   str = getenv ("SKIP_TEST_PVS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_PVS");
@@ -14697,7 +15846,6 @@ static int test_pvs_1 (void)
   /* InitNone|InitEmpty for test_pvs_1 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_pvs_1 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14718,10 +15866,9 @@ static int test_pvs_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for pvs (1) */
+  /* TestOutputListOfDevices for pvs (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -14739,7 +15886,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14748,7 +15894,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda2";
   }
   {
     char device[] = "/dev/sda2";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14757,7 +15902,6 @@ static int test_pvs_1 (void)
   }
   {
     char device[] = "/dev/sda3";
   }
   {
     char device[] = "/dev/sda3";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_pvcreate (g, device);
@@ -14778,7 +15922,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -14791,7 +15935,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -14804,7 +15948,7 @@ static int test_pvs_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_pvs_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -14826,6 +15970,9 @@ static int test_list_partitions_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "list_partitions") == NULL;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS");
   str = getenv ("SKIP_TEST_LIST_PARTITIONS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS");
@@ -14843,7 +15990,6 @@ static int test_list_partitions_0 (void)
   /* InitBasicFS for test_list_partitions_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14866,7 +16012,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -14881,7 +16026,6 @@ static int test_list_partitions_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -14890,7 +16034,6 @@ static int test_list_partitions_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -14898,7 +16041,7 @@ static int test_list_partitions_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (0) */
+  /* TestOutputListOfDevices for list_partitions (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -14913,7 +16056,7 @@ static int test_list_partitions_0 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -14935,6 +16078,9 @@ static int test_list_partitions_1_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "list_partitions") == NULL;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS");
   str = getenv ("SKIP_TEST_LIST_PARTITIONS_1");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_PARTITIONS");
@@ -14952,7 +16098,6 @@ static int test_list_partitions_1 (void)
   /* InitNone|InitEmpty for test_list_partitions_1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -14973,10 +16118,9 @@ static int test_list_partitions_1 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_partitions (1) */
+  /* TestOutputListOfDevices for list_partitions (1) */
   {
     char device[] = "/dev/sda";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
     char lines_0[] = ",10";
     char lines_1[] = ",20";
     char lines_2[] = ",";
@@ -15006,7 +16150,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda1";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15019,7 +16163,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda2";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15032,7 +16176,7 @@ static int test_list_partitions_1 (void)
     }
     {
       char expected[] = "/dev/sda3";
     }
     {
       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;
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_partitions_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
@@ -15054,6 +16198,9 @@ static int test_list_devices_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "list_devices") == NULL;
   str = getenv ("SKIP_TEST_LIST_DEVICES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_DEVICES");
   str = getenv ("SKIP_TEST_LIST_DEVICES_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LIST_DEVICES");
@@ -15071,7 +16218,6 @@ static int test_list_devices_0 (void)
   /* InitNone|InitEmpty for test_list_devices_0 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15092,7 +16238,7 @@ static int test_list_devices_0 (void)
     if (r == -1)
       return -1;
   }
     if (r == -1)
       return -1;
   }
-  /* TestOutputList for list_devices (0) */
+  /* TestOutputListOfDevices for list_devices (0) */
   {
     char **r;
     int i;
   {
     char **r;
     int i;
@@ -15107,7 +16253,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sda";
     }
     {
       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;
       if (strcmp (r[0], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
         return -1;
@@ -15120,7 +16266,7 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdb";
     }
     {
       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;
       if (strcmp (r[1], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
         return -1;
@@ -15133,13 +16279,26 @@ static int test_list_devices_0 (void)
     }
     {
       char expected[] = "/dev/sdc";
     }
     {
       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;
       }
     }
       if (strcmp (r[2], expected) != 0) {
         fprintf (stderr, "test_list_devices_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
         return -1;
       }
     }
-    if (r[3] != NULL) {
+    if (!r[3]) {
+      fprintf (stderr, "test_list_devices_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "/dev/sdd";
+      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;
+      }
+    }
+    if (r[4] != NULL) {
       fprintf (stderr, "test_list_devices_0: extra elements returned from command\n");
       print_strings (r);
       return -1;
       fprintf (stderr, "test_list_devices_0: extra elements returned from command\n");
       print_strings (r);
       return -1;
@@ -15155,6 +16314,9 @@ static int test_ls_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "ls") == NULL;
   str = getenv ("SKIP_TEST_LS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LS");
   str = getenv ("SKIP_TEST_LS_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_LS");
@@ -15172,7 +16334,6 @@ static int test_ls_0 (void)
   /* InitBasicFS for test_ls_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15195,7 +16356,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15210,7 +16370,6 @@ static int test_ls_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15219,7 +16378,6 @@ static int test_ls_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15324,6 +16482,9 @@ static int test_cat_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "cat") == NULL;
   str = getenv ("SKIP_TEST_CAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CAT");
   str = getenv ("SKIP_TEST_CAT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_CAT");
@@ -15341,7 +16502,6 @@ static int test_cat_0 (void)
   /* InitBasicFS for test_cat_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15364,7 +16524,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15379,7 +16538,6 @@ static int test_cat_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15388,7 +16546,6 @@ static int test_cat_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15427,6 +16584,9 @@ static int test_touch_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "touch") == NULL;
   str = getenv ("SKIP_TEST_TOUCH_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TOUCH");
   str = getenv ("SKIP_TEST_TOUCH_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_TOUCH");
@@ -15444,7 +16604,6 @@ static int test_touch_0 (void)
   /* InitBasicFS for test_touch_0: create ext2 on /dev/sda1 */
   {
     char device[] = "/dev/sda";
   /* 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);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15467,7 +16626,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda";
   }
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15482,7 +16640,6 @@ static int test_touch_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15491,7 +16648,6 @@ static int test_touch_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15527,6 +16683,9 @@ static int test_sync_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "sync") == NULL;
   str = getenv ("SKIP_TEST_SYNC_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SYNC");
   str = getenv ("SKIP_TEST_SYNC_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_SYNC");
@@ -15544,7 +16703,6 @@ static int test_sync_0 (void)
   /* InitNone|InitEmpty for test_sync_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_sync_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15580,6 +16738,9 @@ static int test_mount_0_skip (void)
 {
   const char *str;
 
 {
   const char *str;
 
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mount") == NULL;
   str = getenv ("SKIP_TEST_MOUNT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT");
   str = getenv ("SKIP_TEST_MOUNT_0");
   if (str && strcmp (str, "1") == 0) return 1;
   str = getenv ("SKIP_TEST_MOUNT");
@@ -15597,7 +16758,6 @@ static int test_mount_0 (void)
   /* InitNone|InitEmpty for test_mount_0 */
   {
     char device[] = "/dev/sda";
   /* InitNone|InitEmpty for test_mount_0 */
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
     int r;
     suppress_error = 0;
     r = guestfs_blockdev_setrw (g, device);
@@ -15622,7 +16782,6 @@ static int test_mount_0 (void)
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
   char expected[] = "new file contents";
   {
     char device[] = "/dev/sda";
-    device[5] = devchar;
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
     char lines_0[] = ",";
     char *lines[] = {
       lines_0,
@@ -15637,7 +16796,6 @@ static int test_mount_0 (void)
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
   {
     char fstype[] = "ext2";
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
     int r;
     suppress_error = 0;
     r = guestfs_mkfs (g, fstype, device);
@@ -15646,7 +16804,6 @@ static int test_mount_0 (void)
   }
   {
     char device[] = "/dev/sda1";
   }
   {
     char device[] = "/dev/sda1";
-    device[5] = devchar;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
     char mountpoint[] = "/";
     int r;
     suppress_error = 0;
@@ -15683,11 +16840,9 @@ int main (int argc, char *argv[])
 {
   char c = 0;
   int failed = 0;
 {
   char c = 0;
   int failed = 0;
-  const char *srcdir;
   const char *filename;
   const char *filename;
-  int fd, i;
+  int fd;
   int nr_tests, test_num = 0;
   int nr_tests, test_num = 0;
-  char **devs;
 
   no_test_warnings ();
 
 
   no_test_warnings ();
 
@@ -15785,40 +16940,84 @@ int main (int argc, char *argv[])
     exit (1);
   }
 
     exit (1);
   }
 
+  if (guestfs_add_drive_ro (g, "../images/test.sqsh") == -1) {
+    printf ("guestfs_add_drive_ro ../images/test.sqsh FAILED\n");
+    exit (1);
+  }
+
   if (guestfs_launch (g) == -1) {
     printf ("guestfs_launch FAILED\n");
     exit (1);
   }
   if (guestfs_launch (g) == -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);
   }
 
   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 = 140;
+  nr_tests = 153;
 
   test_num++;
 
   test_num++;
+  printf ("%3d/%3d test_mkdtemp_0\n", test_num, nr_tests);
+  if (test_mkdtemp_0 () == -1) {
+    printf ("test_mkdtemp_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_scrub_file_0\n", test_num, nr_tests);
+  if (test_scrub_file_0 () == -1) {
+    printf ("test_scrub_file_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_scrub_device_0\n", test_num, nr_tests);
+  if (test_scrub_device_0 () == -1) {
+    printf ("test_scrub_device_0 FAILED\n");
+    failed++;
+  }
+  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");
   printf ("%3d/%3d test_find_0\n", test_num, nr_tests);
   if (test_find_0 () == -1) {
     printf ("test_find_0 FAILED\n");
@@ -15855,6 +17054,12 @@ int main (int argc, char *argv[])
     failed++;
   }
   test_num++;
     failed++;
   }
   test_num++;
+  printf ("%3d/%3d test_hexdump_1\n", test_num, nr_tests);
+  if (test_hexdump_1 () == -1) {
+    printf ("test_hexdump_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_strings_e_0\n", test_num, nr_tests);
   if (test_strings_e_0 () == -1) {
     printf ("test_strings_e_0 FAILED\n");
   printf ("%3d/%3d test_strings_e_0\n", test_num, nr_tests);
   if (test_strings_e_0 () == -1) {
     printf ("test_strings_e_0 FAILED\n");
@@ -16125,6 +17330,12 @@ int main (int argc, char *argv[])
     failed++;
   }
   test_num++;
     failed++;
   }
   test_num++;
+  printf ("%3d/%3d test_checksum_8\n", test_num, nr_tests);
+  if (test_checksum_8 () == -1) {
+    printf ("test_checksum_8 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_download_0\n", test_num, nr_tests);
   if (test_download_0 () == -1) {
     printf ("test_download_0 FAILED\n");
   printf ("%3d/%3d test_download_0\n", test_num, nr_tests);
   if (test_download_0 () == -1) {
     printf ("test_download_0 FAILED\n");
@@ -16509,6 +17720,18 @@ int main (int argc, char *argv[])
     failed++;
   }
   test_num++;
     failed++;
   }
   test_num++;
+  printf ("%3d/%3d test_mkdir_p_3\n", test_num, nr_tests);
+  if (test_mkdir_p_3 () == -1) {
+    printf ("test_mkdir_p_3 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkdir_p_4\n", test_num, nr_tests);
+  if (test_mkdir_p_4 () == -1) {
+    printf ("test_mkdir_p_4 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_mkdir_0\n", test_num, nr_tests);
   if (test_mkdir_0 () == -1) {
     printf ("test_mkdir_0 FAILED\n");
   printf ("%3d/%3d test_mkdir_0\n", test_num, nr_tests);
   if (test_mkdir_0 () == -1) {
     printf ("test_mkdir_0 FAILED\n");