Skip to content

Commit 12492c0

Browse files
committed
upstream: also check that an active session inhibits
UnusedConnectionTimeout idea markus@ OpenBSD-Regress-ID: 55c0fb61f3bf9e092b0a53f9041d3d2012f14003
1 parent cef2593 commit 12492c0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

regress/connection-timeout.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: connection-timeout.sh,v 1.1 2023/01/17 10:02:34 djm Exp $
1+
# $OpenBSD: connection-timeout.sh,v 1.2 2023/01/17 10:15:10 djm Exp $
22
# Placed in the Public Domain.
33

44
tid="unused connection timeout"
@@ -58,10 +58,17 @@ sleep 8
5858
check_ssh && fail "ssh unexpectedly present"
5959
stop_ssh
6060

61-
verbose "timeout after session"
61+
verbose "session inhibits timeout"
62+
rm -f $OBJ/copy.1
6263
start_ssh
63-
${REAL_SSH} -qoControlPath=$CTL -oControlMaster=no -Fnone somehost "exit 0" ||
64-
fail "session failed"
64+
${REAL_SSH} -qoControlPath=$CTL -oControlMaster=no -Fnone somehost \
65+
"sleep 8; touch $OBJ/copy.1" &
66+
check_ssh || fail "ssh unexpectedly missing"
67+
wait
68+
test -f $OBJ/copy.1 || fail "missing result file"
69+
70+
verbose "timeout after session"
71+
# Session should still be running from previous
6572
sleep 8
6673
check_ssh && fail "ssh unexpectedly present"
6774
stop_ssh

0 commit comments

Comments
 (0)