From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 28E59388C031; Thu, 4 Mar 2021 17:36:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28E59388C031 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: 564369e5e1899b4d9b5a6e10a35754159559d14d X-Git-Newrev: 08cfbdd788bf6bee4d5e06d90fe27b5b332579d9 Message-Id: <20210304173608.28E59388C031@sourceware.org> Date: Thu, 4 Mar 2021 17:36:08 +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: Thu, 04 Mar 2021 17:36:08 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=08cfbdd788bf6bee4d5e06d90fe27b5b332579d9 commit 08cfbdd788bf6bee4d5e06d90fe27b5b332579d9 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 it to run on 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 <