test_infra: split SSH command helpers by retry behavior

Split the SSH helpers into a one-shot execution path and a retrying
wrapper with linear backoff.

This makes it possible to use a single bounded SSH attempt when tests
need a direct readiness probe while preserving the existing retrying
behavior for callers that expect it.

On-behalf-of: SAP philipp.schuster@sap.com

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-04-13 17:10:16 +02:00
committed by Rob Bradford
parent c77094bd54
commit a3b4687caa
2 changed files with 58 additions and 44 deletions

View File

@@ -7286,7 +7286,7 @@ mod windows {
}
fn ssh_cmd(&self, cmd: &str) -> String {
ssh_command_ip_with_auth(
ssh_command_ip_with_auth_retry(
cmd,
&self.auth,
&self.guest.network.guest_ip0,
@@ -7477,7 +7477,7 @@ mod windows {
// The timeout increase by n*1+n*2+n*3+..., therefore the initial
// interval must be small.
let tmo_int = 2;
let out = ssh_command_ip_with_auth(
let out = ssh_command_ip_with_auth_retry(
cmd,
&self.auth,
&self.guest.network.guest_ip0,