From 4726bde47533df74a5e07a18cb002becb92c720b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 15 Jun 2002 10:17:35 +0000 Subject: use trap stuff from sample-test --- tests/mv/part-fail | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/mv/part-fail b/tests/mv/part-fail index 1915ccb33..b512db7f0 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -14,17 +14,18 @@ fi . $srcdir/../lang-default PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check -if test -z "$other_partition_tmpdir"; then - exit 77 -fi - pwd=`pwd` -tmp=part-fail.$$ -trap 'status=$?; cd $pwd; chmod u+w $other_partition_tmpdir;rm -rf $tmp $other_partition_tmpdir && exit $status' 0 +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 +if test -z "$other_partition_tmpdir"; then + (exit 77); exit +fi +t0="$t0 $other_partition_tmpdir" + framework_failure=0 -mkdir $tmp || framework_failure=1 +mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 touch k $other_partition_tmpdir/k || framework_failure=1 chmod u-w $other_partition_tmpdir || framework_failure=1 -- cgit v1.2.3-70-g09d2