This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use build directory instead of /tmp in globtest.sh


This patch makes posix/globtest.sh use temporary directories within
the build tree, not /tmp, to avoid requiring /tmp to be shared between
the build and host systems.  Once /tmp is not being used there is no
longer any need to use mktemp to determine unique paths, so the paths
are just given as `pwd`/globtest-dir and `pwd`/globtest-out.

Tested x86_64.

2012-10-23  Joseph Myers  <joseph@codesourcery.com>

	* posix/globtest.sh (TMPDIR): Do not set.
	(testdir): Define using `pwd` not $TMPDIR.
	(testout): Likewise.

diff --git a/posix/globtest.sh b/posix/globtest.sh
index 286b1b4..f08d026 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -46,9 +46,10 @@ LANG=C
 export LANG
 
 # Create the arena
-: ${TMPDIR=/tmp}
-testdir=$(mktemp -d $TMPDIR/globtest-dir.XXXXXX)
-testout=$(mktemp $TMPDIR/globtest-out.XXXXXX)
+testdir=`pwd`/globtest-dir
+testout=`pwd`/globtest-out
+rm -rf $testdir $testout
+mkdir $testdir
 
 trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]