From 6ca09916439a58f0789deb79960ee5defc05a946 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 3 Jan 2017 12:09:42 +0000 Subject: 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 --- regress/test-exec.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'regress/test-exec.sh') 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 () fi } +TMP= + +make_tmpdir () +{ + TMP="$($OBJ/mkdtemp openssh-regress-XXXXXXXXXXXX)" || \ + fatal "failed to create temporary directory" +} + # helper cleanup () { @@ -327,6 +335,9 @@ cleanup () kill $SSH_PID fi fi + if [ "x$TMP" != "x" ]; then + rm -rf "$TMP" + fi stop_sshd } -- cgit v1.2.3