diff options
| author | Cosmin Ratiu <cratiu@nvidia.com> | 2026-04-22 17:06:46 +0300 |
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2026-04-28 07:47:18 +0300 |
| commit | ada95e5e603bc6e353ee029f2ba7a7d9a42ad018 (patch) | |
| tree | a246370ae26abb57d7b4140d489f038f6725386b | |
| parent | ec54093e6a8f87e800bb6aa15eb7fc1e33faa524 (diff) | |
| download | linux-ada95e5e603bc6e353ee029f2ba7a7d9a42ad018.tar.xz | |
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 f0bd19316663 ("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>
| -rw-r--r-- | tools/testing/selftests/drivers/net/lib/py/load.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/lib/py/load.py b/tools/testing/selftests/drivers/net/lib/py/load.py index f181fa2d38fc..e24660e5c27f 100644 --- a/tools/testing/selftests/drivers/net/lib/py/load.py +++ b/tools/testing/selftests/drivers/net/lib/py/load.py @@ -48,7 +48,10 @@ class Iperf3Runner: Starts the iperf3 client with the configured options. """ cmdline = self._build_client(streams, duration, reverse) - return cmd(cmdline, background=background, host=self.env.remote) + kwargs = {"background": background, "host": self.env.remote} + if not background: + kwargs["timeout"] = duration + 5 + return cmd(cmdline, **kwargs) def measure_bandwidth(self, reverse=False): """ |
