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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h64p3wdg.fsf@kurt.kurt.home>
Date: Thu, 20 Feb 2025 08:31:39 +0100
From: Kurt Kanzenbach <kurt@...utronix.de>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
 andrew+netdev@...n.ch, horms@...nel.org, jdamato@...tly.com,
 stfomichev@...il.com, petrm@...dia.com, Jakub Kicinski <kuba@...nel.org>,
 Stanislav Fomichev <sdf@...ichev.me>
Subject: Re: [PATCH net-next v2 6/7] selftests: drv-net: improve the use of
 ksft helpers in XSK queue test

On Wed Feb 19 2025, Jakub Kicinski wrote:
> Avoid exceptions when xsk attr is not present, and add a proper ksft
> helper for "not in" condition.
>
> Acked-by: Stanislav Fomichev <sdf@...ichev.me>
> Reviewed-by: Joe Damato <jdamato@...tly.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  tools/testing/selftests/drivers/net/queues.py | 9 +++++----
>  tools/testing/selftests/net/lib/py/ksft.py    | 5 +++++
>  2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/queues.py b/tools/testing/selftests/drivers/net/queues.py
> index 7af2adb61c25..a49f1a146e28 100755
> --- a/tools/testing/selftests/drivers/net/queues.py
> +++ b/tools/testing/selftests/drivers/net/queues.py
> @@ -2,7 +2,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
>  from lib.py import ksft_disruptive, ksft_exit, ksft_run
> -from lib.py import ksft_eq, ksft_raises, KsftSkipEx, KsftFailEx
> +from lib.py import ksft_eq, ksft_not_in, ksft_raises, KsftSkipEx, KsftFailEx
>  from lib.py import EthtoolFamily, NetdevFamily, NlError
>  from lib.py import NetDrvEnv
>  from lib.py import bkg, cmd, defer, ip
> @@ -47,10 +47,11 @@ import struct
>                  if q['type'] == 'tx':
>                      tx = True
>  
> -                ksft_eq(q['xsk'], {})
> +                ksft_eq(q.get('xsk', None), {},
> +                        comment="xsk attr on queue we configured")

Thanks. That's much better than getting exceptions in the case where no
xsk attribute is available:

Tested-by: Kurt Kanzenbach <kurt@...utronix.de>

Download attachment "signature.asc" of type "application/pgp-signature" (862 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ