From 474125db122c2dc2e54f2b64bdece9c568f61991 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 4 Aug 2022 16:38:19 +0200 Subject: [PATCH] performance-metrics: Improve reliability of virtio_net_latency_us The test virtio_net_latency_us recently failed because of the ethr tool couldn't complete the latency measurement with the following error message: Error dialing the latency connection: dial tcp4 :0-\u003e172.19.0.2:8888: connect: connection refused The "connection refused" error comes from the Golang Dial function which couldn't complete as expected because there was no server listening on the specified port at the specified destination. In other words, the ethr server wasn't ready when the ethr client tried to connect to it. The easy way to avoid this problem is simply by increasing the sleep time between the command spawning the ethr server in the guest and the command running the ethr client from the host. Signed-off-by: Sebastien Boeuf --- performance-metrics/src/performance_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-metrics/src/performance_tests.rs b/performance-metrics/src/performance_tests.rs index 93808c380..eb6388211 100644 --- a/performance-metrics/src/performance_tests.rs +++ b/performance-metrics/src/performance_tests.rs @@ -312,7 +312,7 @@ fn measure_virtio_net_latency(guest: &Guest, test_timeout: u32) -> Result /dev/null &", ethr_remote_path)) .map_err(InfraError::SshCommand)?; - thread::sleep(Duration::new(1, 0)); + thread::sleep(Duration::new(10, 0)); // Start the ethr client on the host let log_file = guest