Skip to content

Commit ada95e5

Browse files
Cosmin Ratiuklassert
authored andcommitted
tools/selftests: Use a sensible timeout value for iperf3 client
The default timeout of cmd() is 5 seconds and Iperf3Runner requests the iperf3 client to run for 10 seconds, which clearly doesn't work since commit [1] enforced the timeout parameter. Use a value derived from duration as timeout (+5 seconds for startup/teardown/various other overhead). [1] commit f0bd193 ("selftests: net: fix timeout passed as positional argument to communicate()") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 parent ec54093 commit ada95e5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • tools/testing/selftests/drivers/net/lib/py

tools/testing/selftests/drivers/net/lib/py/load.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def start_client(self, background=False, streams=1, duration=10, reverse=False):
4848
Starts the iperf3 client with the configured options.
4949
"""
5050
cmdline = self._build_client(streams, duration, reverse)
51-
return cmd(cmdline, background=background, host=self.env.remote)
51+
kwargs = {"background": background, "host": self.env.remote}
52+
if not background:
53+
kwargs["timeout"] = duration + 5
54+
return cmd(cmdline, **kwargs)
5255

5356
def measure_bandwidth(self, reverse=False):
5457
"""

0 commit comments

Comments
 (0)