Re: [PATCH net v2 4/4] selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up
From: Pavan Chebbi <pavan.chebbi@broadcom.com>
Date: 2026-02-11 05:15:36
On Wed, Feb 11, 2026 at 9:47 AM Jakub Kicinski [off-list ref] wrote:
On Wed, 11 Feb 2026 09:28:22 +0530 Pavan Chebbi wrote:quoted
On Wed, Feb 11, 2026 at 7:16 AM Jakub Kicinski [off-list ref] wrote:quoted
quoted
I checked and tried using the cmd() and it indeed eliminates a lot of lines here. But the test itself becomes a little unreliable. I often see TimeoutError: [Errno Wait for file contents failed] /sys/class/net/ens2f0np0/carrier from the wait_file (Jakub asked me to use wait_file)Does the link take more than the default 5 sec to come up? wait_file() has a deadline param that should let us wait longerI did try with increased deadline. But I don't think it's helping.If you check the carrier manually in a second terminal while it's running -- do you see it go to 1? The helper keeps the file open
Thanks for the nudge. I think I get the real issue now. It's not the
cmd() but ifup.exec()
I am using :
ifup = defer(ip, f"link set dev {cfg.ifname} up")
and later
ifup.exec()
I see that exec() takes unusually long time for carrier to go to 1.
Upto 20s and sometimes still fails.
Same with both direct exec or deferred. And this explains why I cannot
ping for long time after suite exists. Thats because I rely on defer()
to bring the interface up after bnxt exits with carrier 0 for the
second test.
If replace the exec with direct call to ip(f"link set dev {cfg.ifname}
up") I see it works reliably.
<-->
cmd() doesn't do any magic, it basically does:
proc = subprocess.Popen(comm, shell=shell,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
pass_fds=pass_fds, env=env)
proc.communicate(timeout)
So pretty much the same code as your subprocess.run().
It has support for communicating with extra fds toYes, sorry, this was a red herring for me
Attachments
- smime.p7s [application/pkcs7-signature] 5469 bytes