aboutsummaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2018-08-28 10:47:58 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2018-08-28 10:47:58 +0000
commitd46065df2d60bfbd08939733bd79b2a440d6fbc8 (patch)
tree720921fc9471de3c67f5b8dc1404c8f6c6a02cb1 /regress/test-exec.sh
parent3d0e42005d3bf786341ab96cfa1788bc601faa12 (diff)
downloadsrc-d46065df2d60bfbd08939733bd79b2a440d6fbc8.tar.gz
src-d46065df2d60bfbd08939733bd79b2a440d6fbc8.zip
Vendor import of OpenSSH 7.8p1.vendor/openssh/7.8p1
Notes
Notes: svn path=/vendor-crypto/openssh/dist/; revision=338344 svn path=/vendor-crypto/openssh/7.8p1/; revision=338345; tag=vendor/openssh/7.8p1
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 b6169f15703a..40d46e3cd4ca 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.62 2018/03/16 09:06:31 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.64 2018/08/10 01:35:49 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -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
@@ -163,9 +166,13 @@ if [ "x$USE_VALGRIND" != "x" ]; then
esac
if [ x"$VG_SKIP" = "x" ]; then
+ VG_LEAK="--leak-check=no"
+ if [ x"$VALGRIND_CHECK_LEAKS" != "x" ]; then
+ VG_LEAK="--leak-check=full"
+ fi
VG_IGNORE="/bin/*,/sbin/*,/usr/*,/var/*"
VG_LOG="$OBJ/valgrind-out/${VG_TEST}."
- VG_OPTS="--track-origins=yes --leak-check=full"
+ VG_OPTS="--track-origins=yes $VG_LEAK"
VG_OPTS="$VG_OPTS --trace-children=yes"
VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}"
VG_PATH="valgrind"
@@ -318,6 +325,12 @@ stop_sshd ()
fi
}
+make_tmpdir ()
+{
+ SSH_REGRESS_TMP="$($OBJ/mkdtemp openssh-XXXXXXXX)" || \
+ fatal "failed to create temporary directory"
+}
+
# helper
cleanup ()
{
@@ -328,6 +341,9 @@ cleanup ()
kill $SSH_PID
fi
fi
+ if [ "x$SSH_REGRESS_TMP" != "x" ]; then
+ rm -rf "$SSH_REGRESS_TMP"
+ fi
stop_sshd
}
@@ -375,7 +391,10 @@ fail ()
save_debug_log "FAIL: $@"
RESULT=1
echo "$@"
-
+ if test "x$TEST_SSH_FAIL_FATAL" != "x" ; then
+ cleanup
+ exit $RESULT
+ fi
}
fatal ()
@@ -512,10 +531,13 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
>> $OBJ/authorized_keys_$USER
# Convert rsa2 host key to PuTTY format
- ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa > \
+ cp $OBJ/rsa $OBJ/rsa_oldfmt
+ ${SSHKEYGEN} -p -N '' -m PEM -f $OBJ/rsa_oldfmt >/dev/null
+ ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa_oldfmt > \
${OBJ}/.putty/sshhostkeys
- ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa >> \
+ ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa_oldfmt >> \
${OBJ}/.putty/sshhostkeys
+ rm -f $OBJ/rsa_oldfmt
# Setup proxied session
mkdir -p ${OBJ}/.putty/sessions