From: Harish Sadineni <[email protected]> Reusing SSH Connection to speed up remote login process using multiplexing to reduce time taken while running oe-selftest for gcc.
Signed-off-by: Harish Sadineni <[email protected]> --- meta/lib/oeqa/selftest/cases/gcc.py | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh/sshd_config | 2 +- meta/recipes-devtools/gcc/gcc-testsuite.inc | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py index 4cc0894d42..992a5b74be 100644 --- a/meta/lib/oeqa/selftest/cases/gcc.py +++ b/meta/lib/oeqa/selftest/cases/gcc.py @@ -5,6 +5,7 @@ # import os import time +import subprocess from oeqa.core.decorator import OETestTag from oeqa.core.case import OEPTestResultTestCase from oeqa.selftest.case import OESelftestTestCase @@ -83,6 +84,15 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): # validate that SSH is working status, _ = qemu.run("uname") self.assertEqual(status, 0) + qemu_ip = qemu.ip + ssh_command = [ + "ssh", "-o", "StrictHostKeyChecking=no", + "-o", "UserKnownHostsFile=/dev/null", + "-o", "ControlMaster=auto", + "-o", "ControlPath=~/.ssh/control-%r@%h:%p", + "-o", "Controlpersist=yes", "root@{}".format(qemu_ip), + "exit" ] + subprocess.run(ssh_command, check=True) return self.run_check(*args, ssh=qemu.ip, **kwargs) diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config b/meta/recipes-connectivity/openssh/openssh/sshd_config index b9357ef6c5..37ffe28142 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshd_config +++ b/meta/recipes-connectivity/openssh/openssh/sshd_config @@ -34,7 +34,7 @@ Include /etc/ssh/sshd_config.d/*.conf #PermitRootLogin prohibit-password #StrictModes yes #MaxAuthTries 6 -#MaxSessions 10 +MaxSessions 1000 #PubkeyAuthentication yes diff --git a/meta/recipes-devtools/gcc/gcc-testsuite.inc b/meta/recipes-devtools/gcc/gcc-testsuite.inc index 0a950b6c9e..62e9691a99 100644 --- a/meta/recipes-devtools/gcc/gcc-testsuite.inc +++ b/meta/recipes-devtools/gcc/gcc-testsuite.inc @@ -87,7 +87,8 @@ python check_prepare() { content.append("set_board_info username {0}".format(d.getVar("TOOLCHAIN_TEST_HOST_USER"))) port = d.getVar("TOOLCHAIN_TEST_HOST_PORT") - content.append("set_board_info rsh_prog \"/usr/bin/ssh -p {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port)) + qemuip_address = d.getVar("TOOLCHAIN_TEST_HOST") + content.append("set_board_info rsh_prog \"/usr/bin/ssh -S ~/.ssh/control-root@{0}:{1} \"".format( qemuip_address, port)) content.append("set_board_info rcp_prog \"/usr/bin/scp -P {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port)) return "\n".join(content) -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#198507): https://lists.openembedded.org/g/openembedded-core/message/198507 Mute This Topic: https://lists.openembedded.org/mt/105595460/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
