From: Jakub Kicinski <kuba@kernel.org>
To: Gal Pressman <gal@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, <netdev@vger.kernel.org>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
"Breno Leitao" <leitao@debian.org>, David Wei <dw@davidwei.uk>,
<linux-kselftest@vger.kernel.org>, Nimrod Oren <noren@nvidia.com>
Subject: Re: [PATCH net v2 1/2] selftests: net: pass bpftrace timeout to cmd()
Date: Mon, 9 Mar 2026 19:41:08 -0700 [thread overview]
Message-ID: <20260309194108.4a68fec9@kernel.org> (raw)
In-Reply-To: <20260308192126.2490631-2-gal@nvidia.com>
On Sun, 8 Mar 2026 21:21:25 +0200 Gal Pressman wrote:
> @@ -240,8 +240,9 @@ def bpftrace(expr, json=None, ns=None, host=None, timeout=None):
> cmd_arr += ['-f', 'json', '-q']
> if timeout:
> expr += ' interval:s:' + str(timeout) + ' { exit(); }'
> + timeout += 5
it may be easy to miss that input arg is modified so..
> cmd_arr += ['-e', expr]
> - cmd_obj = cmd(cmd_arr, ns=ns, host=host, shell=False)
> + cmd_obj = cmd(cmd_arr, ns=ns, host=host, shell=False, timeout=timeout)
timeout=(timeout + 5)
here instead could potentially be cleaner, but up to you.
next prev parent reply other threads:[~2026-03-10 2:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 19:21 [PATCH net v2 0/2] selftests: net: fix cmd.process() timeout handling Gal Pressman
2026-03-08 19:21 ` [PATCH net v2 1/2] selftests: net: pass bpftrace timeout to cmd() Gal Pressman
2026-03-10 2:41 ` Jakub Kicinski [this message]
2026-03-10 8:51 ` Gal Pressman
2026-03-08 19:21 ` [PATCH net v2 2/2] selftests: net: fix timeout passed as positional argument to communicate() Gal Pressman
2026-03-10 2:40 ` [PATCH net v2 0/2] selftests: net: fix cmd.process() timeout handling Jakub Kicinski
2026-03-10 8:52 ` Gal Pressman
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=20260309194108.4a68fec9@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@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=shuah@kernel.org \
/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