summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-01-03 12:09:42 +0000
committerColin Watson <cjwatson@debian.org>2017-01-16 15:02:54 +0000
commit6ca09916439a58f0789deb79960ee5defc05a946 (patch)
tree2dfc8dc5a56ce659c62c7120fb001671e94ba3b4 /regress/test-exec.sh
parent166f04046035ffca27c820649df360eaa5dd1b99 (diff)
Create mux socket for regress in temp directory
In some setups, creating the socket under OBJ may result in a path that is too long for a Unix domain socket. Add a helper to let us portably create a temporary directory instead. Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2660 Last-Update: 2017-01-03 Patch-Name: regress-mktemp.patch
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index bfa48803b..13a8e18f3 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -317,6 +317,14 @@ stop_sshd ()
317 fi 317 fi
318} 318}
319 319
320TMP=
321
322make_tmpdir ()
323{
324 TMP="$($OBJ/mkdtemp openssh-regress-XXXXXXXXXXXX)" || \
325 fatal "failed to create temporary directory"
326}
327
320# helper 328# helper
321cleanup () 329cleanup ()
322{ 330{
@@ -327,6 +335,9 @@ cleanup ()
327 kill $SSH_PID 335 kill $SSH_PID
328 fi 336 fi
329 fi 337 fi
338 if [ "x$TMP" != "x" ]; then
339 rm -rf "$TMP"
340 fi
330 stop_sshd 341 stop_sshd
331} 342}
332 343