summaryrefslogtreecommitdiffstats
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index f09fe0ec4..f0e3dabfe 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -76,6 +76,9 @@ SFTP=sftp
SFTPSERVER=/usr/libexec/openssh/sftp-server
SCP=scp
+# Set by make_tmpdir() on demand (below).
+SSH_REGRESS_TMP=
+
# Interop testing
PLINK=plink
PUTTYGEN=puttygen
@@ -322,6 +325,12 @@ stop_sshd ()
fi
}
+make_tmpdir ()
+{
+ SSH_REGRESS_TMP="$($OBJ/mkdtemp openssh-regress-XXXXXXXXXXXX)" || \
+ fatal "failed to create temporary directory"
+}
+
# helper
cleanup ()
{
@@ -332,6 +341,9 @@ cleanup ()
kill $SSH_PID
fi
fi
+ if [ "x$SSH_REGRESS_TMP" != "x" ]; then
+ rm -rf "$SSH_REGRESS_TMP"
+ fi
stop_sshd
}