Netdev List
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Simon Horman <horms@kernel.org>,
	Cosmin Ratiu <cratiu@nvidia.com>, Petr Machata <petrm@nvidia.com>,
	Breno Leitao <leitao@debian.org>, Nimrod Oren <noren@nvidia.com>,
	Gal Pressman <gal@nvidia.com>,
	Willem de Bruijn <willemb@google.com>,
	Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>,
	<linux-kselftest@vger.kernel.org>
Subject: [PATCH net-next 1/3] selftests: Disable stdin for remote commands over ssh
Date: Mon, 18 May 2026 12:36:51 +0300	[thread overview]
Message-ID: <20260518093653.551166-2-cratiu@nvidia.com> (raw)
In-Reply-To: <20260518093653.551166-1-cratiu@nvidia.com>

Local ssh clients executing remote commands get their stdin inherited
from the test process, but stdin isn't needed or useful, as remote
commands shouldn't read stdin in any case.

Explicitly disable stdin for remote ssh commands to avoid executing
remote commands which hang on stdin input.

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
---
 tools/testing/selftests/drivers/net/lib/py/remote_ssh.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py b/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
index 924addde19a3..b8c042689d20 100644
--- a/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
+++ b/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
@@ -21,6 +21,7 @@ class Remote:
 
     def cmd(self, comm):
         return subprocess.Popen(["ssh", "-q", self.name, comm],
+                                stdin=subprocess.DEVNULL,
                                 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
     def _mktmp(self):
-- 
2.53.0


  reply	other threads:[~2026-05-18  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  9:36 [PATCH net-next 0/3] selftests: Use a master ssh connection for remote commands Cosmin Ratiu
2026-05-18  9:36 ` Cosmin Ratiu [this message]
2026-05-18  9:36 ` [PATCH net-next 2/3] selftests: Wrap remote command executions in PTYs Cosmin Ratiu
2026-05-18  9:36 ` [PATCH net-next 3/3] selftests: Use a master ssh connection for remote commands Cosmin Ratiu
2026-05-19 23:08   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260518093653.551166-2-cratiu@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dimitri.daskalakis1@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noren@nvidia.com \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox