From: Jakub Kicinski <kuba@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
joe@dama.to, sdf@fomichev.me, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] selftests: net: py: don't default to shell=True
Date: Mon, 1 Sep 2025 10:38:19 -0700 [thread overview]
Message-ID: <20250901103819.77b8fc19@kernel.org> (raw)
In-Reply-To: <va6ympcdo4jxfcqnr6uels4hg62sxgzeabdxjkdr7nkufjktk7@4fishek5fpgo>
On Mon, 1 Sep 2025 02:34:05 -0700 Breno Leitao wrote:
> On Sat, Aug 30, 2025 at 11:43:17AM -0700, Jakub Kicinski wrote:
> > @@ -45,6 +48,10 @@ import time
> > if host:
> > self.proc = host.cmd(comm)
> > else:
> > + # If user doesn't explicitly request shell try to avoid it.
> > + if shell is None and isinstance(comm, str) and ' ' in comm:
> > + comm = comm.split()
>
> I am wondering if you can always split the string, independently if
> shell is True or now. Passing comm as a list is usually recommend, even
> when shell is enabled. Also, if there is no space, split() will return
> the same string.
Not sure how that'll interact with various shells..
I'd rather play it safe.
next prev parent reply other threads:[~2025-09-01 17:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-30 18:43 [PATCH net-next 1/2] selftests: drv-net: adjust tests before defaulting to shell=False Jakub Kicinski
2025-08-30 18:43 ` [PATCH net-next 2/2] selftests: net: py: don't default to shell=True Jakub Kicinski
2025-09-01 9:34 ` Breno Leitao
2025-09-01 17:38 ` Jakub Kicinski [this message]
2025-09-02 8:16 ` Breno Leitao
2025-09-01 9:04 ` [PATCH net-next 1/2] selftests: drv-net: adjust tests before defaulting to shell=False Breno Leitao
2025-09-02 23:20 ` patchwork-bot+netdevbpf
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=20250901103819.77b8fc19@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=joe@dama.to \
--cc=leitao@debian.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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;
as well as URLs for NNTP newsgroup(s).