summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-08-24 12:49:36 +0100
committerColin Watson <cjwatson@debian.org>2018-08-30 00:57:27 +0100
commit816386e17654ca36834bebbf351419e460fad8f6 (patch)
tree3dc79d831cb73bc25b92f5a4d18f8e328c0c570a /regress/test-exec.sh
parent3e6f76c7039d3df22b1d0a3a5f30150efb09b69d (diff)
parent16a47fc4b04977a14f44dd433c8da1499fa80671 (diff)
New upstream release (7.8p1)
Closes: #907534
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh32
1 files changed, 27 insertions, 5 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index b6169f157..40d46e3cd 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.62 2018/03/16 09:06:31 dtucker Exp $ 1# $OpenBSD: test-exec.sh,v 1.64 2018/08/10 01:35:49 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -76,6 +76,9 @@ SFTP=sftp
76SFTPSERVER=/usr/libexec/openssh/sftp-server 76SFTPSERVER=/usr/libexec/openssh/sftp-server
77SCP=scp 77SCP=scp
78 78
79# Set by make_tmpdir() on demand (below).
80SSH_REGRESS_TMP=
81
79# Interop testing 82# Interop testing
80PLINK=plink 83PLINK=plink
81PUTTYGEN=puttygen 84PUTTYGEN=puttygen
@@ -163,9 +166,13 @@ if [ "x$USE_VALGRIND" != "x" ]; then
163 esac 166 esac
164 167
165 if [ x"$VG_SKIP" = "x" ]; then 168 if [ x"$VG_SKIP" = "x" ]; then
169 VG_LEAK="--leak-check=no"
170 if [ x"$VALGRIND_CHECK_LEAKS" != "x" ]; then
171 VG_LEAK="--leak-check=full"
172 fi
166 VG_IGNORE="/bin/*,/sbin/*,/usr/*,/var/*" 173 VG_IGNORE="/bin/*,/sbin/*,/usr/*,/var/*"
167 VG_LOG="$OBJ/valgrind-out/${VG_TEST}." 174 VG_LOG="$OBJ/valgrind-out/${VG_TEST}."
168 VG_OPTS="--track-origins=yes --leak-check=full" 175 VG_OPTS="--track-origins=yes $VG_LEAK"
169 VG_OPTS="$VG_OPTS --trace-children=yes" 176 VG_OPTS="$VG_OPTS --trace-children=yes"
170 VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}" 177 VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}"
171 VG_PATH="valgrind" 178 VG_PATH="valgrind"
@@ -318,6 +325,12 @@ stop_sshd ()
318 fi 325 fi
319} 326}
320 327
328make_tmpdir ()
329{
330 SSH_REGRESS_TMP="$($OBJ/mkdtemp openssh-XXXXXXXX)" || \
331 fatal "failed to create temporary directory"
332}
333
321# helper 334# helper
322cleanup () 335cleanup ()
323{ 336{
@@ -328,6 +341,9 @@ cleanup ()
328 kill $SSH_PID 341 kill $SSH_PID
329 fi 342 fi
330 fi 343 fi
344 if [ "x$SSH_REGRESS_TMP" != "x" ]; then
345 rm -rf "$SSH_REGRESS_TMP"
346 fi
331 stop_sshd 347 stop_sshd
332} 348}
333 349
@@ -375,7 +391,10 @@ fail ()
375 save_debug_log "FAIL: $@" 391 save_debug_log "FAIL: $@"
376 RESULT=1 392 RESULT=1
377 echo "$@" 393 echo "$@"
378 394 if test "x$TEST_SSH_FAIL_FATAL" != "x" ; then
395 cleanup
396 exit $RESULT
397 fi
379} 398}
380 399
381fatal () 400fatal ()
@@ -512,10 +531,13 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
512 >> $OBJ/authorized_keys_$USER 531 >> $OBJ/authorized_keys_$USER
513 532
514 # Convert rsa2 host key to PuTTY format 533 # Convert rsa2 host key to PuTTY format
515 ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa > \ 534 cp $OBJ/rsa $OBJ/rsa_oldfmt
535 ${SSHKEYGEN} -p -N '' -m PEM -f $OBJ/rsa_oldfmt >/dev/null
536 ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa_oldfmt > \
516 ${OBJ}/.putty/sshhostkeys 537 ${OBJ}/.putty/sshhostkeys
517 ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa >> \ 538 ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa_oldfmt >> \
518 ${OBJ}/.putty/sshhostkeys 539 ${OBJ}/.putty/sshhostkeys
540 rm -f $OBJ/rsa_oldfmt
519 541
520 # Setup proxied session 542 # Setup proxied session
521 mkdir -p ${OBJ}/.putty/sessions 543 mkdir -p ${OBJ}/.putty/sessions