lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALs4sv1Z+oWNT5myaEr=LyZsLCGUYfOKAet_bc+fmw7g8PbaxA@mail.gmail.com>
Date: Sun, 8 Feb 2026 21:56:39 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Bobby Eshleman <bobbyeshleman@...il.com>
Cc: Michael Chan <michael.chan@...adcom.com>, davem@...emloft.net, netdev@...r.kernel.org, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	andrew+netdev@...n.ch, andrew.gospodarek@...adcom.com
Subject: Re: [PATCH net v2 4/4] selftests: drv-net: rss_ctx: test RSS contexts
 persist after ifdown/up

> > +
> > +    import subprocess
> > +    max_wait = 10
> > +    ping_success = False
> > +    remote_addr = cfg.remote_addr_v[cfg.addr_ipver]
> > +    for attempt in range(max_wait):
> > +        try:
> > +            result = subprocess.run(['ping', '-c', '1', '-W', '1', remote_addr],
> > +                                  capture_output=True, timeout=2)
> > +            if result.returncode == 0:
> > +                ping_success = True
> > +                break
>
> This might be wanting to use utils.py's cmd()?

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)
Also, even when the test succeeds, after the suite exits, I cannot
ping the remote host for a long time. In contrast, my manual loop
worked 100pc of the times I tested.
I am using the command like below:

   for _ in range(10):
        if cmd(f"ping -c 1 -W 1 {remote_addr}", fail=False, timeout=2).ret == 0:
            break
        time.sleep(1)
    else:
        raise KsftSkipEx("Cannot reach remote host after interface up")

I am not a py expert so is there something I am missing?

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ