Choose better temporary filenames.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Mar 2007 00:51:51 +0000 (00:51 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Mar 2007 00:51:51 +0000 (00:51 +0000)
ChangeLog
tests/test-binary-io.c
tests/test-binary-io.sh

index 5f26043f551dce03ab7e1b492e9ac9a79aaaf974..79d7e668364eae68b848977da2b10c41efbd48b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-10  Bruno Haible  <bruno@clisp.org>
+
+       * tests/test-binary-io.sh: Use temporary filenames that are not so
+       likely to clash with those of other tests (in a parallel make).
+       * tests/test-binary-io.c: Likewise.
+
 2007-03-10  Bruno Haible  <bruno@clisp.org>
 
        * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
index 3f5e9ccbf92a032020dea93517c91b0bc3e6f3bd..718a66e54f9f1610ca3d341a3d65665dcf447763 100644 (file)
@@ -37,18 +37,18 @@ main ()
 {
   /* Test the O_BINARY macro.  */
   {
-    int fd = open ("output2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY);
+    int fd = open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY);
     if (write (fd, "Hello\n", 6) < 0)
       exit (1);
     close (fd);
   }
   {
     struct stat statbuf;
-    if (stat ("output2.tmp", &statbuf) < 0)
+    if (stat ("t-bin-out2.tmp", &statbuf) < 0)
       exit (1);
     ASSERT (statbuf.st_size == 6);
   }
-  unlink ("output2.tmp");
+  unlink ("t-bin-out2.tmp");
 
   /* Test the SET_BINARY macro.  */
   SET_BINARY (1);
@@ -57,7 +57,7 @@ main ()
   fclose (stderr);
   {
     struct stat statbuf;
-    if (stat ("output.tmp", &statbuf) < 0)
+    if (stat ("t-bin-out1.tmp", &statbuf) < 0)
       exit (1);
     ASSERT (statbuf.st_size == 6);
   }
index 22c4dcd40ce6e34867563a05b65fc96eb0b7600c..33e128c3093e2c7f00e9c8dc7f8e393be87c0b2d 100755 (executable)
@@ -3,8 +3,8 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
-tmpfiles="$tmpfiles output.tmp output2.tmp"
-./test-binary-io${EXEEXT} > output.tmp || exit 1
+tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
 
 rm -fr $tmpfiles