summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-06-15 10:17:35 +0000
committerJim Meyering <jim@meyering.net>2002-06-15 10:17:35 +0000
commit4726bde47533df74a5e07a18cb002becb92c720b (patch)
tree63e36a548d31286aac5f254043d5854aad0ab1a9 /tests/mv
parenta44fd51a814af05b1fe85d19baaa688a69feb8fb (diff)
downloadcoreutils-4726bde47533df74a5e07a18cb002becb92c720b.tar.xz
use trap stuff from sample-test
Diffstat (limited to 'tests/mv')
-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