test-linkat: don't leave behind a temporary file
authorJim Meyering <meyering@redhat.com>
Sat, 1 Oct 2011 13:06:43 +0000 (15:06 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 1 Oct 2011 13:06:43 +0000 (15:06 +0200)
* tests/test-linkat.c (main): Don't forget to remove a temporary file.
Otherwise, coreutils' "make distcheck" would fail with this:
  Only in /c/cu/tests/torture/coreutils/test/\
    coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
  make[2]: *** [my-distcheck] Error 1

ChangeLog
tests/test-linkat.c

index 779e00d..7ad4703 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-10-01  Jim Meyering  <meyering@redhat.com>
 
+       test-linkat: don't leave behind a temporary file
+       * tests/test-linkat.c (main): Don't forget to remove a temporary file.
+       Otherwise, coreutils' "make distcheck" would fail with this:
+         Only in /c/cu/tests/torture/coreutils/test/\
+           coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
+         make[2]: *** [my-distcheck] Error 1
+
        float, math: add omitted file
        * lib/itold.c: Add file, required for yesterday's float change.
 
index 40b8371..6da82b0 100644 (file)
@@ -117,6 +117,7 @@ main (void)
     ASSERT (linkat (AT_FDCWD, BASE "oo", 99, "bar", 0) == -1);
     ASSERT (errno == EBADF);
   }
+  ASSERT (unlink (BASE "oo") == 0);
 
   /* Test basic link functionality, without mentioning symlinks.  */
   result = test_link (do_link, true);