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: <87ikovhdhy.fsf@nvidia.com>
Date: Thu, 27 Feb 2025 11:42:32 +0100
From: Petr Machata <petrm@...dia.com>
To: Pablo Martin Medrano <pablmart@...hat.com>
CC: <netdev@...r.kernel.org>, "David S . Miller" <davem@...emloft.net>, "Eric
 Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Shuah Khan
	<shuah@...nel.org>, Petr Machata <petrm@...dia.com>
Subject: Re: [PATCH net v2] selftests/net: big_tcp: return xfail on slow
 machines


Pablo Martin Medrano <pablmart@...hat.com> writes:

> On Tue, 25 Feb 2025, Petr Machata wrote:
>
>> Due to all the &&'s peppered down there, do_test() only gets called at
>> most once, so it's OK in this case.
>
> Actually do_test() do always returns 0, so it gets called all times in the

You are right, I missed that you kept the ret == PASS test at the end of
the function. So just drop that? It's not adding anything, it could be
replaced with a : or true if you truly want to return 0. Then local
ret="PASS" can go away as well.

> code. check_err is setting RET and keeping it at the failing return
> value, so check_err is always returning error after the first error
>
> If I force the error by injecting in do_test():
>
>   if [ $gw_tso = off -a $cli_tso = on ]; then
>     check_err 1 "forced to fail when GW_GSO is off and CLI GSO is on"
>   else
>     check_err $ret_check_counter "fail on link1"
>   fi
>
> The output is:
>
>   Testing for BIG TCP:
>         CLI GSO | GW GRO | GW GSO | SER GRO
>   TEST: on        on       on       on                         [ OK ]
>   TEST: on        off      on       off                        [ OK ]
>   TEST: off       on       on       on                         [ OK ]
>   TEST: on        on       off      on                         [FAIL]
>           forced to fail when GW_GSO is off and CLI GSO is on
>   TEST: off       on       off      on                         [FAIL]
>           forced to fail when GW_GSO is off and CLI GSO is on
>   ***v4 Tests Done***
>
> So setting RET at the end of do_test is needed indeed.

The convention is to do it at the start of the test, before the first
check_err etc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ