From: Adhemerval Zanella Date: Wed, 3 Mar 2021 16:24:24 +0000 (-0300) Subject: io: Use temporary directory and file for ftwtest-sh X-Git-Tag: glibc-2.34~662 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87214a104e4296fdab67f3abdf8f2863862dbb4;p=thirdparty%2Fglibc.git io: Use temporary directory and file for ftwtest-sh It allows run it in parallel. Checked on x86_64-linux-gnu. Reviewed-by: Siddhesh Poyarekar --- diff --git a/io/ftwtest-sh b/io/ftwtest-sh index a9ae33ff309..b0d1389a735 100644 --- a/io/ftwtest-sh +++ b/io/ftwtest-sh @@ -43,15 +43,11 @@ export LC_ALL # First create our scenario: tmp=${objpfx}io -tmpdir=$tmp/ftwtest.d +tmpdir=$(mktemp -d $tmp/ftwtest.d.XXXXXX) +ftwtest=$(basename $tmpdir) trap 'chmod -fR a+x $tmpdir; rm -fr $tmpdir $testout' 0 1 2 3 15 -if test -d $tmpdir; then - chmod -fR a+x $tmpdir - rm -fr $tmpdir -fi -mkdir $tmpdir mkdir $tmpdir/foo mkdir $tmpdir/bar echo > $tmpdir/baz @@ -67,24 +63,24 @@ 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=$tmp/ftwtest-tmp.out +testout=$(mktemp $tmp/ftwtest-tmp-XXXXXX.out) $testprogram $tmpdir | sort > $testout cat < $testout cat < $testout cat </dev/null` cat </dev/null` cd "$tmp" -$testprogram --chdir ftwtest.d | +$testprogram --chdir $ftwtest | sort > $testout cd "$curwd" cat < $testout cd "$curwd" cat </dev/null` cd "$tmp" -$testprogram --chdir ftwtest.d/foo/lvl1/link@1 | +$testprogram --chdir $ftwtest/foo/lvl1/link@1 | sort > $testout cd "$curwd" cat < $testout cat < $testout cat <