summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2023-01-17 10:15:11 +0000
committerDamien Miller <djm@cvs.openbsd.org>2023-01-17 10:15:11 +0000
commit243cbcd3810ed56b9f136fefbc60aab737a91d94 (patch)
tree961028db9da34100c70775b257807b504a8ca2e3 /regress
parent0190b6f2f0692754adae24d6f3a2a4f9befb4829 (diff)
also check that an active session inhibits UnusedConnectionTimeout
idea markus@
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/ssh/connection-timeout.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/regress/usr.bin/ssh/connection-timeout.sh b/regress/usr.bin/ssh/connection-timeout.sh
index adaf8bab231..6c0c0b22567 100644
--- a/regress/usr.bin/ssh/connection-timeout.sh
+++ b/regress/usr.bin/ssh/connection-timeout.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: connection-timeout.sh,v 1.1 2023/01/17 10:02:34 djm Exp $
+# $OpenBSD: connection-timeout.sh,v 1.2 2023/01/17 10:15:10 djm Exp $
# Placed in the Public Domain.
tid="unused connection timeout"
@@ -58,10 +58,17 @@ sleep 8
check_ssh && fail "ssh unexpectedly present"
stop_ssh
-verbose "timeout after session"
+verbose "session inhibits timeout"
+rm -f $OBJ/copy.1
start_ssh
-${REAL_SSH} -qoControlPath=$CTL -oControlMaster=no -Fnone somehost "exit 0" ||
- fail "session failed"
+${REAL_SSH} -qoControlPath=$CTL -oControlMaster=no -Fnone somehost \
+ "sleep 8; touch $OBJ/copy.1" &
+check_ssh || fail "ssh unexpectedly missing"
+wait
+test -f $OBJ/copy.1 || fail "missing result file"
+
+verbose "timeout after session"
+# Session should still be running from previous
sleep 8
check_ssh && fail "ssh unexpectedly present"
stop_ssh