changeset 15810:bf1b12f633c4

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
author Jim Meyering <meyering@redhat.com>
date Sat, 01 Oct 2011 15:06:43 +0200
parents 6f74138bc272
children bc3da814a8b3
files ChangeLog tests/test-linkat.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
 
--- a/tests/test-linkat.c
+++ b/tests/test-linkat.c
@@ -117,6 +117,7 @@
     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);