public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] selftests: net: fix timeout passed as positional argument to communicate()
@ 2026-02-15 12:51 Gal Pressman
  2026-02-15 17:23 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Gal Pressman @ 2026-02-15 12:51 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, netdev
  Cc: Simon Horman, Shuah Khan, David Wei, linux-kselftest,
	Gal Pressman, Nimrod Oren

The cited commit refactored the hardcoded timeout=5 into a parameter,
but dropped the keyword from the communicate() call.
Since Popen.communicate()'s first positional argument is 'input' (not
'timeout'), the timeout value is silently treated as stdin input and the
call never enforces a timeout.

Pass timeout as a keyword argument to restore the intended behavior.

Fixes: 1cf270424218 ("net: selftest: add test for netdev netlink queue-get API")
Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
 tools/testing/selftests/net/lib/py/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/lib/py/utils.py b/tools/testing/selftests/net/lib/py/utils.py
index 106ee1f2df86..73b1b0460436 100644
--- a/tools/testing/selftests/net/lib/py/utils.py
+++ b/tools/testing/selftests/net/lib/py/utils.py
@@ -86,7 +86,7 @@ class cmd:
             os.write(self.ksft_term_fd, b"1")
         if terminate:
             self.proc.terminate()
-        stdout, stderr = self.proc.communicate(timeout)
+        stdout, stderr = self.proc.communicate(timeout=timeout)
         self.stdout = stdout.decode("utf-8")
         self.stderr = stderr.decode("utf-8")
         self.proc.stdout.close()
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-15 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-15 12:51 [PATCH net] selftests: net: fix timeout passed as positional argument to communicate() Gal Pressman
2026-02-15 17:23 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox