summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mv/part-fail15
1 files changed, 8 insertions, 7 deletions
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