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 working directory, not /tmp, in io/ftwtest-sh


One issue in cross-testing is io/ftwtest-sh (on the build system)
using a temporary directory that needs to be accessible to newly built
programs (on glibc's host).  While cross testing needs the build and
source directories to be shared between the two systems at the same
paths on both (changing that requirement would be pretty hard), it
does not otherwise need /tmp to be shared.

Hardcoded paths in /tmp are also a problem for concurrent test runs,
noted in bug 13888.  This patch changes this particular case to use
the working directory, not /tmp or TMPDIR.  (Other instances of bug
13888, that do not cause problems for cross testing but are still
issues for concurrent test runs, remain.)

Tested x86_64.

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

	[BZ #13888]
	* io/ftwtest-sh (tmp): Set to use the working directory, not /tmp
	or TMPDIR.
	(testout): Likewise.

diff --git a/io/ftwtest-sh b/io/ftwtest-sh
index 1822ea7..93b2e66 100644
--- a/io/ftwtest-sh
+++ b/io/ftwtest-sh
@@ -44,7 +44,7 @@ LANG=C
 export LANG
 
 # First create our scenario:
-tmp=`echo ${TMPDIR:-/tmp} | sed 's|\(.\)/*$|\1|'`
+tmp=`pwd | sed 's|\(.\)/*$|\1|'`
 tmpdir=$tmp/ftwtest.d
 
 [ -f ${objpfx}elf/ld.so ] && ldso=${objpfx}elf/ld.so
@@ -71,7 +71,7 @@ ln -s $tmpdir/foo/lvl1/lvl2/lvl3/lvl4 $tmpdir/foo/lvl1/link@1
 echo > $tmpdir/bar/xo
 chmod a-x,a+r $tmpdir/bar
 
-testout=${TMPDIR:-/tmp}/ftwtest.out
+testout=$tmp/ftwtest.out
 
 LD_LIBRARY_PATH=$objpfx $ldso $testprogram $tmpdir |
     sort > $testout

-- 
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]