summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-05-17 01:16:10 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-05-17 01:16:10 +0000
commit07456e31ca3a365a3e2ac8d331da4897d8a967a9 (patch)
treeaf5bade8e8866aa6c3bdb1dadd8ba9144bb2a6e1
parent877d2a384aa9768b397ad54bcefcb0c61f1cfbae (diff)
Pull back some portability changes from -portable:
- TIMEOUT is a read-only variable in some shells - not all greps have -q so redirect to /dev/null instead.
-rw-r--r--regress/usr.bin/ssh/agent-timeout.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/regress/usr.bin/ssh/agent-timeout.sh b/regress/usr.bin/ssh/agent-timeout.sh
index 28b1be02811..68826594e47 100644
--- a/regress/usr.bin/ssh/agent-timeout.sh
+++ b/regress/usr.bin/ssh/agent-timeout.sh
@@ -1,9 +1,9 @@
-# $OpenBSD: agent-timeout.sh,v 1.1 2002/06/06 00:38:40 markus Exp $
+# $OpenBSD: agent-timeout.sh,v 1.2 2013/05/17 01:16:09 dtucker Exp $
# Placed in the Public Domain.
tid="agent timeout test"
-TIMEOUT=5
+SSHAGENT_TIMEOUT=10
trace "start agent"
eval `${SSHAGENT} -s` > /dev/null
@@ -13,7 +13,7 @@ if [ $r -ne 0 ]; then
else
trace "add keys with timeout"
for t in rsa rsa1; do
- ${SSHADD} -t ${TIMEOUT} $OBJ/$t > /dev/null 2>&1
+ ${SSHADD} -t ${SSHAGENT_TIMEOUT} $OBJ/$t > /dev/null 2>&1
if [ $? -ne 0 ]; then
fail "ssh-add did succeed exit code 0"
fi
@@ -23,10 +23,10 @@ else
if [ $n -ne 2 ]; then
fail "ssh-add -l did not return 2 keys: $n"
fi
- trace "sleeping 2*${TIMEOUT} seconds"
- sleep ${TIMEOUT}
- sleep ${TIMEOUT}
- ${SSHADD} -l 2> /dev/null | grep -q 'The agent has no identities.'
+ trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds"
+ sleep ${SSHAGENT_TIMEOUT}
+ sleep ${SSHAGENT_TIMEOUT}
+ ${SSHADD} -l 2> /dev/null | grep 'The agent has no identities.' >/dev/null
if [ $? -ne 0 ]; then
fail "ssh-add -l still returns keys after timeout"
fi