# HG changeset patch # User Bruno Haible # Date 1173574311 0 # Node ID 6db7303a603340beccb3a7c848def3fbb544e96a # Parent d100772cfc2b8abc6f14ce85c806ad8a50954ef7 Choose better temporary filenames. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-10 Bruno Haible + + * 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 * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c --- a/tests/test-binary-io.c +++ b/tests/test-binary-io.c @@ -37,18 +37,18 @@ { /* 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 @@ 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); } diff --git a/tests/test-binary-io.sh b/tests/test-binary-io.sh --- a/tests/test-binary-io.sh +++ b/tests/test-binary-io.sh @@ -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