Re: [PATCH net-next v2 2/4] selftests: drv-net: Improve bpftrace utility error handling
From: Breno Leitao
Date: Thu Jun 26 2025 - 09:11:54 EST
On Wed, Jun 25, 2025 at 02:48:16PM -0700, Jakub Kicinski wrote:
> On Wed, 25 Jun 2025 04:39:47 -0700 Breno Leitao wrote:
> > cmd_obj = cmd(cmd_arr, ns=ns, host=host, shell=False)
> > + if cmd_obj.ret != 0:
> > + raise Exception("Warning: bpftrace command returned a non-zero exit code.")
>
> cmd should already raise CmdExitFailure, unless fail=False / fail=None
> is specified.
Oh yea, even easier. I found the code, and it is much easier to just set
fail=True for this case. This will avoid hidden errors.