summaryrefslogtreecommitdiff
path: root/regress/agent-timeout.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-06-05 06:41:44 +0100
committerColin Watson <cjwatson@debian.org>2019-06-05 06:41:44 +0100
commit102062f825fb26a74295a1c089c00c4c4c76b68a (patch)
tree3db66bc8c8483cce66516dff36f6ef56065143d9 /regress/agent-timeout.sh
parent3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff)
parentfd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff)
Import openssh_8.0p1.orig.tar.gz
Diffstat (limited to 'regress/agent-timeout.sh')
-rw-r--r--regress/agent-timeout.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/regress/agent-timeout.sh b/regress/agent-timeout.sh
index 9598c2032..80012f80c 100644
--- a/regress/agent-timeout.sh
+++ b/regress/agent-timeout.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: agent-timeout.sh,v 1.3 2015/03/03 22:35:19 markus Exp $ 1# $OpenBSD: agent-timeout.sh,v 1.4 2019/01/28 00:08:26 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="agent timeout test" 4tid="agent timeout test"
@@ -12,16 +12,18 @@ if [ $r -ne 0 ]; then
12 fail "could not start ssh-agent: exit code $r" 12 fail "could not start ssh-agent: exit code $r"
13else 13else
14 trace "add keys with timeout" 14 trace "add keys with timeout"
15 keys=0
15 for t in ${SSH_KEYTYPES}; do 16 for t in ${SSH_KEYTYPES}; do
16 ${SSHADD} -t ${SSHAGENT_TIMEOUT} $OBJ/$t > /dev/null 2>&1 17 ${SSHADD} -t ${SSHAGENT_TIMEOUT} $OBJ/$t > /dev/null 2>&1
17 if [ $? -ne 0 ]; then 18 if [ $? -ne 0 ]; then
18 fail "ssh-add did succeed exit code 0" 19 fail "ssh-add did succeed exit code 0"
19 fi 20 fi
21 keys=$((${keys} + 1))
20 done 22 done
21 n=`${SSHADD} -l 2> /dev/null | wc -l` 23 n=`${SSHADD} -l 2> /dev/null | wc -l`
22 trace "agent has $n keys" 24 trace "agent has $n keys"
23 if [ $n -ne 2 ]; then 25 if [ $n -ne $keys ]; then
24 fail "ssh-add -l did not return 2 keys: $n" 26 fail "ssh-add -l did not return $keys keys: $n"
25 fi 27 fi
26 trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds" 28 trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds"
27 sleep ${SSHAGENT_TIMEOUT} 29 sleep ${SSHAGENT_TIMEOUT}