[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <va6ympcdo4jxfcqnr6uels4hg62sxgzeabdxjkdr7nkufjktk7@4fishek5fpgo>
Date: Mon, 1 Sep 2025 02:34:05 -0700
From: Breno Leitao <leitao@...ian.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org, joe@...a.to,
sdf@...ichev.me, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] selftests: net: py: don't default to
shell=True
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.
What about something as?
if isinstance(comm, str):
comm = comm.split()
Powered by blists - more mailing lists