summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-02-09 10:09:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-10 09:25:41 +0000
commitba68ff04c5786eca7cd8dd44056705867dea8ac4 (patch)
tree501e602820a71668d808f07f7190555cfa7368a4
parent917a70cbc43ac1c70c477b220c4115735457ef04 (diff)
downloadopenembedded-core-contrib-ba68ff04c5786eca7cd8dd44056705867dea8ac4.tar.gz
oeqa ssh.py: add connection keep alive options to ssh client
Configure ssh client to test that connection with server is up. If the server does not respond within a minute then the connection, target machine or sshd daemon are stuck and it's better to exit the command execution with errors. Some tests can execute a long time without returning stdout/stderror data and it's difficult to adjust timers for those cases if connection to target machine or the target machine itself hangs and output is not expected in minutes or even hours. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
-rw-r--r--meta/lib/oeqa/core/target/ssh.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 13fd5b2a49..2597256c91 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -34,6 +34,8 @@ class OESSHTarget(OETarget):
self.timeout = timeout
self.user = user
ssh_options = [
+ '-o', 'ServerAliveCountMax=2',
+ '-o', 'ServerAliveInterval=30',
'-o', 'UserKnownHostsFile=/dev/null',
'-o', 'StrictHostKeyChecking=no',
'-o', 'LogLevel=ERROR'