From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 87CB1386F46D; Fri, 5 Mar 2021 19:18:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87CB1386F46D Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/y2038] io: Use temporary directory and file for ftwtest-sh X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/y2038 X-Git-Oldrev: 3c667926673bac6017bf78569f582f6baee9948f X-Git-Newrev: e2feb3736fa389cb9bbebf5b6d53f1b2978cf8ea Message-Id: <20210305191804.87CB1386F46D@sourceware.org> Date: Fri, 5 Mar 2021 19:18:04 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:18:04 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e2feb3736fa389cb9bbebf5b6d53f1b2978cf8ea commit e2feb3736fa389cb9bbebf5b6d53f1b2978cf8ea Author: Adhemerval Zanella Date: Wed Mar 3 13:24:24 2021 -0300 io: Use temporary directory and file for ftwtest-sh Instead of creating files on glibc source dir. It also allows run in parallel. Checked on x86_64-linux-gnu. Diff: --- io/ftwtest-sh | 246 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 121 insertions(+), 125 deletions(-) diff --git a/io/ftwtest-sh b/io/ftwtest-sh index a9ae33ff30..6d553dad5d 100644 --- a/io/ftwtest-sh +++ b/io/ftwtest-sh @@ -42,16 +42,12 @@ LC_ALL=C export LC_ALL # First create our scenario: -tmp=${objpfx}io -tmpdir=$tmp/ftwtest.d +tmp=/tmp +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 +#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 <