Generated code for 'set_memsize'/'get_memsize' calls.
[libguestfs.git] / capitests / tests.c
index 88098f4..c8686a1 100644 (file)
@@ -109,6 +109,8 @@ static void no_test_warnings (void)
   fprintf (stderr, "warning: \"guestfs_set_busy\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_set_ready\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_end_busy\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_set_memsize\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_get_memsize\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_ll\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_pvs_full\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_vgs_full\" has no tests\n");
@@ -151,6 +153,2018 @@ static void no_test_warnings (void)
   fprintf (stderr, "warning: \"guestfs_sh\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_sh_lines\" has no tests\n");
   fprintf (stderr, "warning: \"guestfs_scrub_freespace\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_df\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_df_h\" has no tests\n");
+  fprintf (stderr, "warning: \"guestfs_mount_loop\" has no tests\n");
+}
+
+static int test_mkswap_U_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap_U") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_U_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP_U");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_U_0 (void)
+{
+  if (test_mkswap_U_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_U_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_U_0 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for mkswap_U (0) */
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char uuid[] = "a3a61220-882b-4f61-89f4-cf24dcc7297d";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap_U (g, uuid, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_mkswap_L_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap_L") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_L_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP_L");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_L_0 (void)
+{
+  if (test_mkswap_L_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_L_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_L_0 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for mkswap_L (0) */
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char label[] = "hello";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap_L (g, label, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_mkswap_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "mkswap") == NULL;
+  str = getenv ("SKIP_TEST_MKSWAP_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_MKSWAP");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_mkswap_0 (void)
+{
+  if (test_mkswap_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_0");
+    return 0;
+  }
+
+  /* InitNone|InitEmpty for test_mkswap_0 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  /* TestRun for mkswap (0) */
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkswap (g, device);
+    if (r == -1)
+      return -1;
+  }
+  return 0;
+}
+
+static int test_initrd_list_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "initrd_list") == NULL;
+  str = getenv ("SKIP_TEST_INITRD_LIST_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_INITRD_LIST");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_initrd_list_0 (void)
+{
+  if (test_initrd_list_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_initrd_list_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_initrd_list_0: create ext2 on /dev/sda1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputList for initrd_list (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/initrd";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_initrd_list (g, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "empty";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-1";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-2";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (!r[3]) {
+      fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "known-3";
+      if (strcmp (r[3], expected) != 0) {
+        fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
+        return -1;
+      }
+    }
+    if (r[4] != NULL) {
+      fprintf (stderr, "test_initrd_list_0: extra elements returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    for (i = 0; r[i] != NULL; ++i)
+      free (r[i]);
+    free (r);
+  }
+  return 0;
+}
+
+static int test_du_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "du") == NULL;
+  str = getenv ("SKIP_TEST_DU_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_DU");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_du_0 (void)
+{
+  if (test_du_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_du_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_du_0: create ext2 on /dev/sda1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for du (0) */
+  {
+    char path[] = "/p";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkdir (g, path);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/p";
+    int64_t r;
+    suppress_error = 0;
+    r = guestfs_du (g, path);
+    if (r == -1)
+      return -1;
+    if (r != 1) {
+      fprintf (stderr, "test_du_0: expected 1 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
+}
+
+static int test_tail_n_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tail_n") == NULL;
+  str = getenv ("SKIP_TEST_TAIL_N_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_TAIL_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_tail_n_0 (void)
+{
+  if (test_tail_n_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_tail_n_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 tail_n (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_tail_n (g, 3, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_tail_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9997abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_tail_n_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_tail_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9998abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_tail_n_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_tail_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9999abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_tail_n_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (r[3] != NULL) {
+      fprintf (stderr, "test_tail_n_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_tail_n_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tail_n") == NULL;
+  str = getenv ("SKIP_TEST_TAIL_N_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_TAIL_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_tail_n_1 (void)
+{
+  if (test_tail_n_1_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_tail_n_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 tail_n (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[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_tail_n (g, -9998, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_tail_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9997abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_tail_n_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_tail_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9998abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_tail_n_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_tail_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9999abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_tail_n_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (r[3] != NULL) {
+      fprintf (stderr, "test_tail_n_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_tail_n_2_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tail_n") == NULL;
+  str = getenv ("SKIP_TEST_TAIL_N_2");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_TAIL_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_tail_n_2 (void)
+{
+  if (test_tail_n_2_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_2");
+    return 0;
+  }
+
+  /* InitBasicFS for test_tail_n_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 tail_n (2) */
+  {
+    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[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_tail_n (g, 0, path);
+    if (r == NULL)
+      return -1;
+    if (r[0] != NULL) {
+      fprintf (stderr, "test_tail_n_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_tail_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "tail") == NULL;
+  str = getenv ("SKIP_TEST_TAIL_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_TAIL");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_tail_0 (void)
+{
+  if (test_tail_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_tail_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_tail_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 tail (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_tail (g, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9990abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9991abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9992abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (!r[3]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9993abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[3], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
+        return -1;
+      }
+    }
+    if (!r[4]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9994abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[4], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[4]);
+        return -1;
+      }
+    }
+    if (!r[5]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9995abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[5], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[5]);
+        return -1;
+      }
+    }
+    if (!r[6]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9996abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[6], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[6]);
+        return -1;
+      }
+    }
+    if (!r[7]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9997abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[7], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[7]);
+        return -1;
+      }
+    }
+    if (!r[8]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9998abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[8], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[8]);
+        return -1;
+      }
+    }
+    if (!r[9]) {
+      fprintf (stderr, "test_tail_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9999abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[9], expected) != 0) {
+        fprintf (stderr, "test_tail_0: expected \"%s\" but got \"%s\"\n", expected, r[9]);
+        return -1;
+      }
+    }
+    if (r[10] != NULL) {
+      fprintf (stderr, "test_tail_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_head_n_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "head_n") == NULL;
+  str = getenv ("SKIP_TEST_HEAD_N_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEAD_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_head_n_0 (void)
+{
+  if (test_head_n_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_head_n_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 head_n (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_head_n (g, 3, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_head_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "0abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_head_n_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_head_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "1abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_head_n_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_head_n_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "2abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_head_n_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (r[3] != NULL) {
+      fprintf (stderr, "test_head_n_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_head_n_1_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "head_n") == NULL;
+  str = getenv ("SKIP_TEST_HEAD_N_1");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEAD_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_head_n_1 (void)
+{
+  if (test_head_n_1_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_1");
+    return 0;
+  }
+
+  /* InitBasicFS for test_head_n_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 head_n (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[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_head_n (g, -9997, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_head_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "0abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_head_n_1: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_head_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "1abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_head_n_1: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_head_n_1: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "2abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_head_n_1: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (r[3] != NULL) {
+      fprintf (stderr, "test_head_n_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_head_n_2_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "head_n") == NULL;
+  str = getenv ("SKIP_TEST_HEAD_N_2");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEAD_N");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_head_n_2 (void)
+{
+  if (test_head_n_2_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_head_n_2");
+    return 0;
+  }
+
+  /* InitBasicFS for test_head_n_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 head_n (2) */
+  {
+    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[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_head_n (g, 0, path);
+    if (r == NULL)
+      return -1;
+    if (r[0] != NULL) {
+      fprintf (stderr, "test_head_n_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_head_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "head") == NULL;
+  str = getenv ("SKIP_TEST_HEAD_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_HEAD");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_head_0 (void)
+{
+  if (test_head_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_head_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_head_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 head (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    char **r;
+    int i;
+    suppress_error = 0;
+    r = guestfs_head (g, path);
+    if (r == NULL)
+      return -1;
+    if (!r[0]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "0abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[0], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+        return -1;
+      }
+    }
+    if (!r[1]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "1abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[1], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+        return -1;
+      }
+    }
+    if (!r[2]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "2abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[2], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+        return -1;
+      }
+    }
+    if (!r[3]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "3abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[3], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
+        return -1;
+      }
+    }
+    if (!r[4]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "4abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[4], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[4]);
+        return -1;
+      }
+    }
+    if (!r[5]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "5abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[5], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[5]);
+        return -1;
+      }
+    }
+    if (!r[6]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "6abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[6], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[6]);
+        return -1;
+      }
+    }
+    if (!r[7]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "7abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[7], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[7]);
+        return -1;
+      }
+    }
+    if (!r[8]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "8abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[8], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[8]);
+        return -1;
+      }
+    }
+    if (!r[9]) {
+      fprintf (stderr, "test_head_0: short list returned from command\n");
+      print_strings (r);
+      return -1;
+    }
+    {
+      char expected[] = "9abcdefghijklmnopqrstuvwxyz";
+      if (strcmp (r[9], expected) != 0) {
+        fprintf (stderr, "test_head_0: expected \"%s\" but got \"%s\"\n", expected, r[9]);
+        return -1;
+      }
+    }
+    if (r[10] != NULL) {
+      fprintf (stderr, "test_head_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_wc_c_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "wc_c") == NULL;
+  str = getenv ("SKIP_TEST_WC_C_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_WC_C");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_wc_c_0 (void)
+{
+  if (test_wc_c_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_wc_c_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_wc_c_0: create ext2 on /dev/sda1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for wc_c (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/100kallspaces";
+    int r;
+    suppress_error = 0;
+    r = guestfs_wc_c (g, path);
+    if (r == -1)
+      return -1;
+    if (r != 102400) {
+      fprintf (stderr, "test_wc_c_0: expected 102400 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
+}
+
+static int test_wc_w_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "wc_w") == NULL;
+  str = getenv ("SKIP_TEST_WC_W_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_WC_W");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_wc_w_0 (void)
+{
+  if (test_wc_w_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_wc_w_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_wc_w_0: create ext2 on /dev/sda1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for wc_w (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    int r;
+    suppress_error = 0;
+    r = guestfs_wc_w (g, path);
+    if (r == -1)
+      return -1;
+    if (r != 10000) {
+      fprintf (stderr, "test_wc_w_0: expected 10000 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
+}
+
+static int test_wc_l_0_skip (void)
+{
+  const char *str;
+
+  str = getenv ("TEST_ONLY");
+  if (str)
+    return strstr (str, "wc_l") == NULL;
+  str = getenv ("SKIP_TEST_WC_L_0");
+  if (str && strcmp (str, "1") == 0) return 1;
+  str = getenv ("SKIP_TEST_WC_L");
+  if (str && strcmp (str, "1") == 0) return 1;
+  return 0;
+}
+
+static int test_wc_l_0 (void)
+{
+  if (test_wc_l_0_skip ()) {
+    printf ("%s skipped (reason: environment variable set)\n", "test_wc_l_0");
+    return 0;
+  }
+
+  /* InitBasicFS for test_wc_l_0: create ext2 on /dev/sda1 */
+  {
+    char device[] = "/dev/sda";
+    int r;
+    suppress_error = 0;
+    r = guestfs_blockdev_setrw (g, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_umount_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    int r;
+    suppress_error = 0;
+    r = guestfs_lvm_remove_all (g);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda";
+    char lines_0[] = ",";
+    char *lines[] = {
+      lines_0,
+      NULL
+    };
+    int r;
+    suppress_error = 0;
+    r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char fstype[] = "ext2";
+    char device[] = "/dev/sda1";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mkfs (g, fstype, device);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char device[] = "/dev/sda1";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount (g, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  /* TestOutputInt for wc_l (0) */
+  {
+    char options[] = "ro";
+    char vfstype[] = "squashfs";
+    char device[] = "/dev/sdd";
+    char mountpoint[] = "/";
+    int r;
+    suppress_error = 0;
+    r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+    if (r == -1)
+      return -1;
+  }
+  {
+    char path[] = "/10klines";
+    int r;
+    suppress_error = 0;
+    r = guestfs_wc_l (g, path);
+    if (r == -1)
+      return -1;
+    if (r != 10000) {
+      fprintf (stderr, "test_wc_l_0: expected 10000 but got %d\n",               (int) r);
+      return -1;
+    }
+  }
+  return 0;
 }
 
 static int test_mkdtemp_0_skip (void)
@@ -170,7 +2184,7 @@ static int test_mkdtemp_0_skip (void)
 static int test_mkdtemp_0 (void)
 {
   if (test_mkdtemp_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdtemp_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdtemp_0");
     return 0;
   }
 
@@ -266,7 +2280,7 @@ static int test_scrub_file_0_skip (void)
 static int test_scrub_file_0 (void)
 {
   if (test_scrub_file_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_file_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_scrub_file_0");
     return 0;
   }
 
@@ -362,7 +2376,7 @@ static int test_scrub_device_0_skip (void)
 static int test_scrub_device_0 (void)
 {
   if (test_scrub_device_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_scrub_device_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_scrub_device_0");
     return 0;
   }
 
@@ -418,7 +2432,7 @@ static int test_glob_expand_0_skip (void)
 static int test_glob_expand_0 (void)
 {
   if (test_glob_expand_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_0");
     return 0;
   }
 
@@ -562,7 +2576,7 @@ static int test_glob_expand_1_skip (void)
 static int test_glob_expand_1 (void)
 {
   if (test_glob_expand_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_1");
     return 0;
   }
 
@@ -706,7 +2720,7 @@ static int test_glob_expand_2_skip (void)
 static int test_glob_expand_2 (void)
 {
   if (test_glob_expand_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_glob_expand_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_2");
     return 0;
   }
 
@@ -826,7 +2840,7 @@ static int test_ntfs_3g_probe_0_skip (void)
 static int test_ntfs_3g_probe_0 (void)
 {
   if (test_ntfs_3g_probe_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_0");
     return 0;
   }
 
@@ -908,7 +2922,7 @@ static int test_ntfs_3g_probe_1_skip (void)
 static int test_ntfs_3g_probe_1 (void)
 {
   if (test_ntfs_3g_probe_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_1");
     return 0;
   }
 
@@ -990,7 +3004,7 @@ static int test_sleep_0_skip (void)
 static int test_sleep_0 (void)
 {
   if (test_sleep_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_sleep_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_sleep_0");
     return 0;
   }
 
@@ -1045,7 +3059,7 @@ static int test_find_0_skip (void)
 static int test_find_0 (void)
 {
   if (test_find_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_find_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_find_0");
     return 0;
   }
 
@@ -1153,7 +3167,7 @@ static int test_find_1_skip (void)
 static int test_find_1 (void)
 {
   if (test_find_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_find_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_find_1");
     return 0;
   }
 
@@ -1321,7 +3335,7 @@ static int test_find_2_skip (void)
 static int test_find_2 (void)
 {
   if (test_find_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_find_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_find_2");
     return 0;
   }
 
@@ -1457,7 +3471,7 @@ static int test_lvresize_0_skip (void)
 static int test_lvresize_0 (void)
 {
   if (test_lvresize_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvresize_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvresize_0");
     return 0;
   }
 
@@ -1630,7 +3644,7 @@ static int test_zerofree_0_skip (void)
 static int test_zerofree_0 (void)
 {
   if (test_zerofree_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_zerofree_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_zerofree_0");
     return 0;
   }
 
@@ -1757,7 +3771,7 @@ static int test_hexdump_0_skip (void)
 static int test_hexdump_0 (void)
 {
   if (test_hexdump_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_hexdump_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_0");
     return 0;
   }
 
@@ -1859,7 +3873,7 @@ static int test_hexdump_1_skip (void)
 static int test_hexdump_1 (void)
 {
   if (test_hexdump_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_hexdump_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_1");
     return 0;
   }
 
@@ -1958,7 +3972,7 @@ static int test_strings_e_0_skip (void)
 static int test_strings_e_0 (void)
 {
   if (test_strings_e_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_strings_e_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_0");
     return 0;
   }
 
@@ -2064,7 +4078,7 @@ static int test_strings_e_1_skip (void)
 static int test_strings_e_1 (void)
 {
   if (test_strings_e_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_strings_e_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_1");
     return 0;
   }
 
@@ -2089,7 +4103,7 @@ static int test_strings_0_skip (void)
 static int test_strings_0 (void)
 {
   if (test_strings_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_strings_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_strings_0");
     return 0;
   }
 
@@ -2218,7 +4232,7 @@ static int test_strings_1_skip (void)
 static int test_strings_1 (void)
 {
   if (test_strings_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_strings_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_strings_1");
     return 0;
   }
 
@@ -2322,7 +4336,7 @@ static int test_equal_0_skip (void)
 static int test_equal_0 (void)
 {
   if (test_equal_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_equal_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_equal_0");
     return 0;
   }
 
@@ -2432,7 +4446,7 @@ static int test_equal_1_skip (void)
 static int test_equal_1 (void)
 {
   if (test_equal_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_equal_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_equal_1");
     return 0;
   }
 
@@ -2542,7 +4556,7 @@ static int test_equal_2_skip (void)
 static int test_equal_2 (void)
 {
   if (test_equal_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_equal_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_equal_2");
     return 0;
   }
 
@@ -2630,7 +4644,7 @@ static int test_ping_daemon_0_skip (void)
 static int test_ping_daemon_0 (void)
 {
   if (test_ping_daemon_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ping_daemon_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_ping_daemon_0");
     return 0;
   }
 
@@ -2685,7 +4699,7 @@ static int test_dmesg_0_skip (void)
 static int test_dmesg_0 (void)
 {
   if (test_dmesg_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_dmesg_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_dmesg_0");
     return 0;
   }
 
@@ -2741,7 +4755,7 @@ static int test_drop_caches_0_skip (void)
 static int test_drop_caches_0 (void)
 {
   if (test_drop_caches_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_drop_caches_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_drop_caches_0");
     return 0;
   }
 
@@ -2796,7 +4810,7 @@ static int test_mv_0_skip (void)
 static int test_mv_0 (void)
 {
   if (test_mv_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mv_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mv_0");
     return 0;
   }
 
@@ -2907,7 +4921,7 @@ static int test_mv_1_skip (void)
 static int test_mv_1 (void)
 {
   if (test_mv_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mv_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mv_1");
     return 0;
   }
 
@@ -3016,7 +5030,7 @@ static int test_cp_a_0_skip (void)
 static int test_cp_a_0 (void)
 {
   if (test_cp_a_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_cp_a_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_cp_a_0");
     return 0;
   }
 
@@ -3143,7 +5157,7 @@ static int test_cp_0_skip (void)
 static int test_cp_0 (void)
 {
   if (test_cp_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_cp_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_cp_0");
     return 0;
   }
 
@@ -3254,7 +5268,7 @@ static int test_cp_1_skip (void)
 static int test_cp_1 (void)
 {
   if (test_cp_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_cp_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_cp_1");
     return 0;
   }
 
@@ -3363,7 +5377,7 @@ static int test_cp_2_skip (void)
 static int test_cp_2 (void)
 {
   if (test_cp_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_cp_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_cp_2");
     return 0;
   }
 
@@ -3482,7 +5496,7 @@ static int test_grub_install_0_skip (void)
 static int test_grub_install_0 (void)
 {
   if (test_grub_install_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_grub_install_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_grub_install_0");
     return 0;
   }
 
@@ -3582,7 +5596,7 @@ static int test_zero_0_skip (void)
 static int test_zero_0 (void)
 {
   if (test_zero_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_zero_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_zero_0");
     return 0;
   }
 
@@ -3691,7 +5705,7 @@ static int test_fsck_0_skip (void)
 static int test_fsck_0 (void)
 {
   if (test_fsck_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_fsck_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_fsck_0");
     return 0;
   }
 
@@ -3791,7 +5805,7 @@ static int test_fsck_1_skip (void)
 static int test_fsck_1 (void)
 {
   if (test_fsck_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_fsck_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_fsck_1");
     return 0;
   }
 
@@ -3899,7 +5913,7 @@ static int test_set_e2uuid_0_skip (void)
 static int test_set_e2uuid_0 (void)
 {
   if (test_set_e2uuid_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_set_e2uuid_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_0");
     return 0;
   }
 
@@ -4001,7 +6015,7 @@ static int test_set_e2uuid_1_skip (void)
 static int test_set_e2uuid_1 (void)
 {
   if (test_set_e2uuid_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_set_e2uuid_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_1");
     return 0;
   }
 
@@ -4103,7 +6117,7 @@ static int test_set_e2uuid_2_skip (void)
 static int test_set_e2uuid_2 (void)
 {
   if (test_set_e2uuid_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_set_e2uuid_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_2");
     return 0;
   }
 
@@ -4191,7 +6205,7 @@ static int test_set_e2uuid_3_skip (void)
 static int test_set_e2uuid_3 (void)
 {
   if (test_set_e2uuid_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_set_e2uuid_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_3");
     return 0;
   }
 
@@ -4279,7 +6293,7 @@ static int test_set_e2label_0_skip (void)
 static int test_set_e2label_0 (void)
 {
   if (test_set_e2label_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_set_e2label_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_set_e2label_0");
     return 0;
   }
 
@@ -4381,7 +6395,7 @@ static int test_pvremove_0_skip (void)
 static int test_pvremove_0 (void)
 {
   if (test_pvremove_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvremove_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_0");
     return 0;
   }
 
@@ -4513,7 +6527,7 @@ static int test_pvremove_1_skip (void)
 static int test_pvremove_1 (void)
 {
   if (test_pvremove_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvremove_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_1");
     return 0;
   }
 
@@ -4645,7 +6659,7 @@ static int test_pvremove_2_skip (void)
 static int test_pvremove_2 (void)
 {
   if (test_pvremove_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvremove_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_2");
     return 0;
   }
 
@@ -4777,7 +6791,7 @@ static int test_vgremove_0_skip (void)
 static int test_vgremove_0 (void)
 {
   if (test_vgremove_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_vgremove_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_0");
     return 0;
   }
 
@@ -4901,7 +6915,7 @@ static int test_vgremove_1_skip (void)
 static int test_vgremove_1 (void)
 {
   if (test_vgremove_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_vgremove_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_1");
     return 0;
   }
 
@@ -5025,7 +7039,7 @@ static int test_lvremove_0_skip (void)
 static int test_lvremove_0 (void)
 {
   if (test_lvremove_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvremove_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_0");
     return 0;
   }
 
@@ -5161,7 +7175,7 @@ static int test_lvremove_1_skip (void)
 static int test_lvremove_1 (void)
 {
   if (test_lvremove_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvremove_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_1");
     return 0;
   }
 
@@ -5285,7 +7299,7 @@ static int test_lvremove_2_skip (void)
 static int test_lvremove_2 (void)
 {
   if (test_lvremove_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvremove_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_2");
     return 0;
   }
 
@@ -5421,7 +7435,7 @@ static int test_mount_ro_0_skip (void)
 static int test_mount_ro_0 (void)
 {
   if (test_mount_ro_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mount_ro_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_0");
     return 0;
   }
 
@@ -5525,7 +7539,7 @@ static int test_mount_ro_1_skip (void)
 static int test_mount_ro_1 (void)
 {
   if (test_mount_ro_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mount_ro_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_1");
     return 0;
   }
 
@@ -5644,7 +7658,7 @@ static int test_tgz_in_0_skip (void)
 static int test_tgz_in_0 (void)
 {
   if (test_tgz_in_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_tgz_in_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_tgz_in_0");
     return 0;
   }
 
@@ -5745,7 +7759,7 @@ static int test_tar_in_0_skip (void)
 static int test_tar_in_0 (void)
 {
   if (test_tar_in_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_tar_in_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_tar_in_0");
     return 0;
   }
 
@@ -5846,7 +7860,7 @@ static int test_checksum_0_skip (void)
 static int test_checksum_0 (void)
 {
   if (test_checksum_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_0");
     return 0;
   }
 
@@ -5949,7 +7963,7 @@ static int test_checksum_1_skip (void)
 static int test_checksum_1 (void)
 {
   if (test_checksum_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_1");
     return 0;
   }
 
@@ -6038,7 +8052,7 @@ static int test_checksum_2_skip (void)
 static int test_checksum_2 (void)
 {
   if (test_checksum_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_2");
     return 0;
   }
 
@@ -6141,7 +8155,7 @@ static int test_checksum_3_skip (void)
 static int test_checksum_3 (void)
 {
   if (test_checksum_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_3");
     return 0;
   }
 
@@ -6244,7 +8258,7 @@ static int test_checksum_4_skip (void)
 static int test_checksum_4 (void)
 {
   if (test_checksum_4_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_4");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_4");
     return 0;
   }
 
@@ -6347,7 +8361,7 @@ static int test_checksum_5_skip (void)
 static int test_checksum_5 (void)
 {
   if (test_checksum_5_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_5");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_5");
     return 0;
   }
 
@@ -6450,7 +8464,7 @@ static int test_checksum_6_skip (void)
 static int test_checksum_6 (void)
 {
   if (test_checksum_6_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_6");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_6");
     return 0;
   }
 
@@ -6553,7 +8567,7 @@ static int test_checksum_7_skip (void)
 static int test_checksum_7 (void)
 {
   if (test_checksum_7_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_7");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_7");
     return 0;
   }
 
@@ -6656,7 +8670,7 @@ static int test_checksum_8_skip (void)
 static int test_checksum_8 (void)
 {
   if (test_checksum_8_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_checksum_8");
+    printf ("%s skipped (reason: environment variable set)\n", "test_checksum_8");
     return 0;
   }
 
@@ -6761,7 +8775,7 @@ static int test_download_0_skip (void)
 static int test_download_0 (void)
 {
   if (test_download_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_download_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_download_0");
     return 0;
   }
 
@@ -6879,7 +8893,7 @@ static int test_upload_0_skip (void)
 static int test_upload_0 (void)
 {
   if (test_upload_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_upload_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_upload_0");
     return 0;
   }
 
@@ -6981,7 +8995,7 @@ static int test_blockdev_rereadpt_0_skip (void)
 static int test_blockdev_rereadpt_0 (void)
 {
   if (test_blockdev_rereadpt_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_rereadpt_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_rereadpt_0");
     return 0;
   }
 
@@ -7037,7 +9051,7 @@ static int test_blockdev_flushbufs_0_skip (void)
 static int test_blockdev_flushbufs_0 (void)
 {
   if (test_blockdev_flushbufs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_flushbufs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_flushbufs_0");
     return 0;
   }
 
@@ -7093,7 +9107,7 @@ static int test_blockdev_getsize64_0_skip (void)
 static int test_blockdev_getsize64_0 (void)
 {
   if (test_blockdev_getsize64_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_getsize64_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsize64_0");
     return 0;
   }
 
@@ -7153,7 +9167,7 @@ static int test_blockdev_getsz_0_skip (void)
 static int test_blockdev_getsz_0 (void)
 {
   if (test_blockdev_getsz_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_getsz_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsz_0");
     return 0;
   }
 
@@ -7213,7 +9227,7 @@ static int test_blockdev_getbsz_0_skip (void)
 static int test_blockdev_getbsz_0 (void)
 {
   if (test_blockdev_getbsz_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_getbsz_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getbsz_0");
     return 0;
   }
 
@@ -7273,7 +9287,7 @@ static int test_blockdev_getss_0_skip (void)
 static int test_blockdev_getss_0 (void)
 {
   if (test_blockdev_getss_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_getss_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getss_0");
     return 0;
   }
 
@@ -7333,7 +9347,7 @@ static int test_blockdev_getro_0_skip (void)
 static int test_blockdev_getro_0 (void)
 {
   if (test_blockdev_getro_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_getro_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getro_0");
     return 0;
   }
 
@@ -7401,7 +9415,7 @@ static int test_blockdev_setrw_0_skip (void)
 static int test_blockdev_setrw_0 (void)
 {
   if (test_blockdev_setrw_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_setrw_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setrw_0");
     return 0;
   }
 
@@ -7469,7 +9483,7 @@ static int test_blockdev_setro_0_skip (void)
 static int test_blockdev_setro_0 (void)
 {
   if (test_blockdev_setro_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_blockdev_setro_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setro_0");
     return 0;
   }
 
@@ -7537,7 +9551,7 @@ static int test_statvfs_0_skip (void)
 static int test_statvfs_0 (void)
 {
   if (test_statvfs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_statvfs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_statvfs_0");
     return 0;
   }
 
@@ -7640,7 +9654,7 @@ static int test_lstat_0_skip (void)
 static int test_lstat_0 (void)
 {
   if (test_lstat_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lstat_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lstat_0");
     return 0;
   }
 
@@ -7741,7 +9755,7 @@ static int test_stat_0_skip (void)
 static int test_stat_0 (void)
 {
   if (test_stat_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_stat_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_stat_0");
     return 0;
   }
 
@@ -7842,7 +9856,7 @@ static int test_command_lines_0_skip (void)
 static int test_command_lines_0 (void)
 {
   if (test_command_lines_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_0");
     return 0;
   }
 
@@ -7972,7 +9986,7 @@ static int test_command_lines_1_skip (void)
 static int test_command_lines_1 (void)
 {
   if (test_command_lines_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_1");
     return 0;
   }
 
@@ -8102,7 +10116,7 @@ static int test_command_lines_2_skip (void)
 static int test_command_lines_2 (void)
 {
   if (test_command_lines_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_2");
     return 0;
   }
 
@@ -8244,7 +10258,7 @@ static int test_command_lines_3_skip (void)
 static int test_command_lines_3 (void)
 {
   if (test_command_lines_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_3");
     return 0;
   }
 
@@ -8386,7 +10400,7 @@ static int test_command_lines_4_skip (void)
 static int test_command_lines_4 (void)
 {
   if (test_command_lines_4_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_4");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_4");
     return 0;
   }
 
@@ -8540,7 +10554,7 @@ static int test_command_lines_5_skip (void)
 static int test_command_lines_5 (void)
 {
   if (test_command_lines_5_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_5");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_5");
     return 0;
   }
 
@@ -8706,7 +10720,7 @@ static int test_command_lines_6_skip (void)
 static int test_command_lines_6 (void)
 {
   if (test_command_lines_6_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_6");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_6");
     return 0;
   }
 
@@ -8824,7 +10838,7 @@ static int test_command_lines_7_skip (void)
 static int test_command_lines_7 (void)
 {
   if (test_command_lines_7_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_7");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_7");
     return 0;
   }
 
@@ -8954,7 +10968,7 @@ static int test_command_lines_8_skip (void)
 static int test_command_lines_8 (void)
 {
   if (test_command_lines_8_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_8");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_8");
     return 0;
   }
 
@@ -9096,7 +11110,7 @@ static int test_command_lines_9_skip (void)
 static int test_command_lines_9 (void)
 {
   if (test_command_lines_9_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_9");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_9");
     return 0;
   }
 
@@ -9238,7 +11252,7 @@ static int test_command_lines_10_skip (void)
 static int test_command_lines_10 (void)
 {
   if (test_command_lines_10_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_lines_10");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_10");
     return 0;
   }
 
@@ -9380,7 +11394,7 @@ static int test_command_0_skip (void)
 static int test_command_0 (void)
 {
   if (test_command_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_0");
     return 0;
   }
 
@@ -9495,7 +11509,7 @@ static int test_command_1_skip (void)
 static int test_command_1 (void)
 {
   if (test_command_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_1");
     return 0;
   }
 
@@ -9610,7 +11624,7 @@ static int test_command_2_skip (void)
 static int test_command_2 (void)
 {
   if (test_command_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_2");
     return 0;
   }
 
@@ -9725,7 +11739,7 @@ static int test_command_3_skip (void)
 static int test_command_3 (void)
 {
   if (test_command_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_3");
     return 0;
   }
 
@@ -9840,7 +11854,7 @@ static int test_command_4_skip (void)
 static int test_command_4 (void)
 {
   if (test_command_4_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_4");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_4");
     return 0;
   }
 
@@ -9955,7 +11969,7 @@ static int test_command_5_skip (void)
 static int test_command_5 (void)
 {
   if (test_command_5_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_5");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_5");
     return 0;
   }
 
@@ -10070,7 +12084,7 @@ static int test_command_6_skip (void)
 static int test_command_6 (void)
 {
   if (test_command_6_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_6");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_6");
     return 0;
   }
 
@@ -10185,7 +12199,7 @@ static int test_command_7_skip (void)
 static int test_command_7 (void)
 {
   if (test_command_7_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_7");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_7");
     return 0;
   }
 
@@ -10300,7 +12314,7 @@ static int test_command_8_skip (void)
 static int test_command_8 (void)
 {
   if (test_command_8_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_8");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_8");
     return 0;
   }
 
@@ -10415,7 +12429,7 @@ static int test_command_9_skip (void)
 static int test_command_9 (void)
 {
   if (test_command_9_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_9");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_9");
     return 0;
   }
 
@@ -10530,7 +12544,7 @@ static int test_command_10_skip (void)
 static int test_command_10 (void)
 {
   if (test_command_10_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_10");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_10");
     return 0;
   }
 
@@ -10645,7 +12659,7 @@ static int test_command_11_skip (void)
 static int test_command_11 (void)
 {
   if (test_command_11_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_command_11");
+    printf ("%s skipped (reason: environment variable set)\n", "test_command_11");
     return 0;
   }
 
@@ -10753,7 +12767,7 @@ static int test_file_0_skip (void)
 static int test_file_0 (void)
 {
   if (test_file_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_file_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_file_0");
     return 0;
   }
 
@@ -10854,7 +12868,7 @@ static int test_file_1_skip (void)
 static int test_file_1 (void)
 {
   if (test_file_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_file_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_file_1");
     return 0;
   }
 
@@ -10956,7 +12970,7 @@ static int test_file_2_skip (void)
 static int test_file_2 (void)
 {
   if (test_file_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_file_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_file_2");
     return 0;
   }
 
@@ -11044,7 +13058,7 @@ static int test_umount_all_0_skip (void)
 static int test_umount_all_0 (void)
 {
   if (test_umount_all_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_umount_all_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_0");
     return 0;
   }
 
@@ -11146,7 +13160,7 @@ static int test_umount_all_1_skip (void)
 static int test_umount_all_1 (void)
 {
   if (test_umount_all_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_umount_all_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_1");
     return 0;
   }
 
@@ -11312,7 +13326,7 @@ static int test_mounts_0_skip (void)
 static int test_mounts_0 (void)
 {
   if (test_mounts_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mounts_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mounts_0");
     return 0;
   }
 
@@ -11420,7 +13434,7 @@ static int test_umount_0_skip (void)
 static int test_umount_0 (void)
 {
   if (test_umount_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_umount_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_umount_0");
     return 0;
   }
 
@@ -11528,7 +13542,7 @@ static int test_umount_1_skip (void)
 static int test_umount_1 (void)
 {
   if (test_umount_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_umount_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_umount_1");
     return 0;
   }
 
@@ -11631,7 +13645,7 @@ static int test_write_file_0_skip (void)
 static int test_write_file_0 (void)
 {
   if (test_write_file_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_0");
     return 0;
   }
 
@@ -11733,7 +13747,7 @@ static int test_write_file_1_skip (void)
 static int test_write_file_1 (void)
 {
   if (test_write_file_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_1");
     return 0;
   }
 
@@ -11835,7 +13849,7 @@ static int test_write_file_2_skip (void)
 static int test_write_file_2 (void)
 {
   if (test_write_file_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_2");
     return 0;
   }
 
@@ -11937,7 +13951,7 @@ static int test_write_file_3_skip (void)
 static int test_write_file_3 (void)
 {
   if (test_write_file_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_3");
     return 0;
   }
 
@@ -12039,7 +14053,7 @@ static int test_write_file_4_skip (void)
 static int test_write_file_4 (void)
 {
   if (test_write_file_4_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_4");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_4");
     return 0;
   }
 
@@ -12141,7 +14155,7 @@ static int test_write_file_5_skip (void)
 static int test_write_file_5 (void)
 {
   if (test_write_file_5_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_write_file_5");
+    printf ("%s skipped (reason: environment variable set)\n", "test_write_file_5");
     return 0;
   }
 
@@ -12243,7 +14257,7 @@ static int test_mkfs_0_skip (void)
 static int test_mkfs_0 (void)
 {
   if (test_mkfs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkfs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkfs_0");
     return 0;
   }
 
@@ -12345,7 +14359,7 @@ static int test_lvcreate_0_skip (void)
 static int test_lvcreate_0 (void)
 {
   if (test_lvcreate_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvcreate_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvcreate_0");
     return 0;
   }
 
@@ -12583,7 +14597,7 @@ static int test_vgcreate_0_skip (void)
 static int test_vgcreate_0 (void)
 {
   if (test_vgcreate_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_vgcreate_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_vgcreate_0");
     return 0;
   }
 
@@ -12740,7 +14754,7 @@ static int test_pvcreate_0_skip (void)
 static int test_pvcreate_0 (void)
 {
   if (test_pvcreate_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvcreate_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvcreate_0");
     return 0;
   }
 
@@ -12884,7 +14898,7 @@ static int test_is_dir_0_skip (void)
 static int test_is_dir_0 (void)
 {
   if (test_is_dir_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_is_dir_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_0");
     return 0;
   }
 
@@ -12983,7 +14997,7 @@ static int test_is_dir_1_skip (void)
 static int test_is_dir_1 (void)
 {
   if (test_is_dir_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_is_dir_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_1");
     return 0;
   }
 
@@ -13082,7 +15096,7 @@ static int test_is_file_0_skip (void)
 static int test_is_file_0 (void)
 {
   if (test_is_file_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_is_file_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_is_file_0");
     return 0;
   }
 
@@ -13181,7 +15195,7 @@ static int test_is_file_1_skip (void)
 static int test_is_file_1 (void)
 {
   if (test_is_file_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_is_file_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_is_file_1");
     return 0;
   }
 
@@ -13280,7 +15294,7 @@ static int test_exists_0_skip (void)
 static int test_exists_0 (void)
 {
   if (test_exists_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_exists_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_exists_0");
     return 0;
   }
 
@@ -13379,7 +15393,7 @@ static int test_exists_1_skip (void)
 static int test_exists_1 (void)
 {
   if (test_exists_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_exists_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_exists_1");
     return 0;
   }
 
@@ -13478,7 +15492,7 @@ static int test_mkdir_p_0_skip (void)
 static int test_mkdir_p_0 (void)
 {
   if (test_mkdir_p_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_0");
     return 0;
   }
 
@@ -13577,7 +15591,7 @@ static int test_mkdir_p_1_skip (void)
 static int test_mkdir_p_1 (void)
 {
   if (test_mkdir_p_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_1");
     return 0;
   }
 
@@ -13676,7 +15690,7 @@ static int test_mkdir_p_2_skip (void)
 static int test_mkdir_p_2 (void)
 {
   if (test_mkdir_p_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_2");
     return 0;
   }
 
@@ -13775,7 +15789,7 @@ static int test_mkdir_p_3_skip (void)
 static int test_mkdir_p_3 (void)
 {
   if (test_mkdir_p_3_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_3");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_3");
     return 0;
   }
 
@@ -13870,7 +15884,7 @@ static int test_mkdir_p_4_skip (void)
 static int test_mkdir_p_4 (void)
 {
   if (test_mkdir_p_4_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_p_4");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_4");
     return 0;
   }
 
@@ -13965,7 +15979,7 @@ static int test_mkdir_0_skip (void)
 static int test_mkdir_0 (void)
 {
   if (test_mkdir_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_0");
     return 0;
   }
 
@@ -14064,7 +16078,7 @@ static int test_mkdir_1_skip (void)
 static int test_mkdir_1 (void)
 {
   if (test_mkdir_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mkdir_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_1");
     return 0;
   }
 
@@ -14151,7 +16165,7 @@ static int test_rm_rf_0_skip (void)
 static int test_rm_rf_0 (void)
 {
   if (test_rm_rf_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rm_rf_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rm_rf_0");
     return 0;
   }
 
@@ -14274,7 +16288,7 @@ static int test_rmdir_0_skip (void)
 static int test_rmdir_0 (void)
 {
   if (test_rmdir_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rmdir_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_0");
     return 0;
   }
 
@@ -14369,7 +16383,7 @@ static int test_rmdir_1_skip (void)
 static int test_rmdir_1 (void)
 {
   if (test_rmdir_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rmdir_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_1");
     return 0;
   }
 
@@ -14456,7 +16470,7 @@ static int test_rmdir_2_skip (void)
 static int test_rmdir_2 (void)
 {
   if (test_rmdir_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rmdir_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_2");
     return 0;
   }
 
@@ -14551,7 +16565,7 @@ static int test_rm_0_skip (void)
 static int test_rm_0 (void)
 {
   if (test_rm_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rm_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rm_0");
     return 0;
   }
 
@@ -14646,7 +16660,7 @@ static int test_rm_1_skip (void)
 static int test_rm_1 (void)
 {
   if (test_rm_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rm_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rm_1");
     return 0;
   }
 
@@ -14733,7 +16747,7 @@ static int test_rm_2_skip (void)
 static int test_rm_2 (void)
 {
   if (test_rm_2_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_rm_2");
+    printf ("%s skipped (reason: environment variable set)\n", "test_rm_2");
     return 0;
   }
 
@@ -14828,7 +16842,7 @@ static int test_read_lines_0_skip (void)
 static int test_read_lines_0 (void)
 {
   if (test_read_lines_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_read_lines_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_0");
     return 0;
   }
 
@@ -14969,7 +16983,7 @@ static int test_read_lines_1_skip (void)
 static int test_read_lines_1 (void)
 {
   if (test_read_lines_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_read_lines_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_1");
     return 0;
   }
 
@@ -15074,7 +17088,7 @@ static int test_lvs_0_skip (void)
 static int test_lvs_0 (void)
 {
   if (test_lvs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvs_0");
     return 0;
   }
 
@@ -15211,7 +17225,7 @@ static int test_lvs_1_skip (void)
 static int test_lvs_1 (void)
 {
   if (test_lvs_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_lvs_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_lvs_1");
     return 0;
   }
 
@@ -15407,7 +17421,7 @@ static int test_vgs_0_skip (void)
 static int test_vgs_0 (void)
 {
   if (test_vgs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_vgs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_vgs_0");
     return 0;
   }
 
@@ -15544,7 +17558,7 @@ static int test_vgs_1_skip (void)
 static int test_vgs_1 (void)
 {
   if (test_vgs_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_vgs_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_vgs_1");
     return 0;
   }
 
@@ -15701,7 +17715,7 @@ static int test_pvs_0_skip (void)
 static int test_pvs_0 (void)
 {
   if (test_pvs_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvs_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvs_0");
     return 0;
   }
 
@@ -15839,7 +17853,7 @@ static int test_pvs_1_skip (void)
 static int test_pvs_1 (void)
 {
   if (test_pvs_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_pvs_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_pvs_1");
     return 0;
   }
 
@@ -15983,7 +17997,7 @@ static int test_list_partitions_0_skip (void)
 static int test_list_partitions_0 (void)
 {
   if (test_list_partitions_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_list_partitions_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_0");
     return 0;
   }
 
@@ -16091,7 +18105,7 @@ static int test_list_partitions_1_skip (void)
 static int test_list_partitions_1 (void)
 {
   if (test_list_partitions_1_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_list_partitions_1");
+    printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_1");
     return 0;
   }
 
@@ -16211,7 +18225,7 @@ static int test_list_devices_0_skip (void)
 static int test_list_devices_0 (void)
 {
   if (test_list_devices_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_list_devices_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_list_devices_0");
     return 0;
   }
 
@@ -16327,7 +18341,7 @@ static int test_ls_0_skip (void)
 static int test_ls_0 (void)
 {
   if (test_ls_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ls_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_ls_0");
     return 0;
   }
 
@@ -16495,7 +18509,7 @@ static int test_cat_0_skip (void)
 static int test_cat_0 (void)
 {
   if (test_cat_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_cat_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_cat_0");
     return 0;
   }
 
@@ -16597,7 +18611,7 @@ static int test_touch_0_skip (void)
 static int test_touch_0 (void)
 {
   if (test_touch_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_touch_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_touch_0");
     return 0;
   }
 
@@ -16696,7 +18710,7 @@ static int test_sync_0_skip (void)
 static int test_sync_0 (void)
 {
   if (test_sync_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_sync_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_sync_0");
     return 0;
   }
 
@@ -16751,7 +18765,7 @@ static int test_mount_0_skip (void)
 static int test_mount_0 (void)
 {
   if (test_mount_0_skip ()) {
-    printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_mount_0");
+    printf ("%s skipped (reason: environment variable set)\n", "test_mount_0");
     return 0;
   }
 
@@ -16961,9 +18975,105 @@ int main (int argc, char *argv[])
   /* Cancel previous alarm. */
   alarm (0);
 
-  nr_tests = 153;
+  nr_tests = 169;
 
   test_num++;
+  printf ("%3d/%3d test_mkswap_U_0\n", test_num, nr_tests);
+  if (test_mkswap_U_0 () == -1) {
+    printf ("test_mkswap_U_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkswap_L_0\n", test_num, nr_tests);
+  if (test_mkswap_L_0 () == -1) {
+    printf ("test_mkswap_L_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_mkswap_0\n", test_num, nr_tests);
+  if (test_mkswap_0 () == -1) {
+    printf ("test_mkswap_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_initrd_list_0\n", test_num, nr_tests);
+  if (test_initrd_list_0 () == -1) {
+    printf ("test_initrd_list_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_du_0\n", test_num, nr_tests);
+  if (test_du_0 () == -1) {
+    printf ("test_du_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_tail_n_0\n", test_num, nr_tests);
+  if (test_tail_n_0 () == -1) {
+    printf ("test_tail_n_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_tail_n_1\n", test_num, nr_tests);
+  if (test_tail_n_1 () == -1) {
+    printf ("test_tail_n_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_tail_n_2\n", test_num, nr_tests);
+  if (test_tail_n_2 () == -1) {
+    printf ("test_tail_n_2 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_tail_0\n", test_num, nr_tests);
+  if (test_tail_0 () == -1) {
+    printf ("test_tail_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_head_n_0\n", test_num, nr_tests);
+  if (test_head_n_0 () == -1) {
+    printf ("test_head_n_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_head_n_1\n", test_num, nr_tests);
+  if (test_head_n_1 () == -1) {
+    printf ("test_head_n_1 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_head_n_2\n", test_num, nr_tests);
+  if (test_head_n_2 () == -1) {
+    printf ("test_head_n_2 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_head_0\n", test_num, nr_tests);
+  if (test_head_0 () == -1) {
+    printf ("test_head_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_wc_c_0\n", test_num, nr_tests);
+  if (test_wc_c_0 () == -1) {
+    printf ("test_wc_c_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_wc_w_0\n", test_num, nr_tests);
+  if (test_wc_w_0 () == -1) {
+    printf ("test_wc_w_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
+  printf ("%3d/%3d test_wc_l_0\n", test_num, nr_tests);
+  if (test_wc_l_0 () == -1) {
+    printf ("test_wc_l_0 FAILED\n");
+    failed++;
+  }
+  test_num++;
   printf ("%3d/%3d test_mkdtemp_0\n", test_num, nr_tests);
   if (test_mkdtemp_0 () == -1) {
     printf ("test_mkdtemp_0 FAILED\n");