diff options
Diffstat (limited to 'tests/misc/sort-compress-proc')
-rwxr-xr-x | tests/misc/sort-compress-proc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/misc/sort-compress-proc b/tests/misc/sort-compress-proc index 8d0094f13..30f6b43b1 100755 --- a/tests/misc/sort-compress-proc +++ b/tests/misc/sort-compress-proc @@ -20,13 +20,6 @@ print_ver_ sort expensive_ -# Ensure that $TMPDIR is valid. -if test -d /tmp && test -w /tmp -then TMPDIR=/tmp -else TMPDIR=. -fi -export TMPDIR - seq -w 2000 > exp || fail=1 tac exp > in || fail=1 insize=$(stat -c %s - <in) || fail=1 @@ -78,10 +71,13 @@ rm -f ok rm -f compress -# Give compression subprocesses time to react when 'sort' exits. +# If $TMPDIR is relative, give subprocesses time to react when 'sort' exits. # Otherwise, under NFS, when 'sort' unlinks the temp files and they # are renamed to .nfsXXXX instead of being removed, the parent cleanup # of this directory will fail because the files are still open. -sleep 1 +case $TMPDIR in +/*) ;; +*) sleep 1;; +esac Exit $fail |