Subject: Re: [PATCH net v2 1/2] selftests: net: pass bpftrace timeout to cmd()

From: Jakub Kicinski <[email-masked]>
Date: Mon, 9 Mar 2026 19:41:08 -0700

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.