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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7ac5d58-1e59-a657-a51b-4d757f7552ca@gmail.com>
Date:   Thu, 7 Oct 2021 23:52:39 +0300
From:   Leonard Crestez <cdleonard@...il.com>
To:     David Ahern <dsahern@...il.com>, Jakub Kicinski <kuba@...nel.org>,
        Shuah Khan <shuah@...nel.org>, David Ahern <dsahern@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Ido Schimmel <idosch@...dia.com>,
        Seth David Schoen <schoen@...alty.org>,
        netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout

On 07.10.2021 04:17, David Ahern wrote:
> On 10/6/21 3:26 PM, Leonard Crestez wrote:
>> On 06.10.2021 18:01, David Ahern wrote:
>>> On 10/6/21 5:47 AM, Leonard Crestez wrote:
>>>> Reduce default client timeout from 5 seconds to 500 miliseconds.
>>>> Can be overridden from environment by exporting NETTEST_CLIENT_TIMEOUT=5
>>>>
>>>> Some tests need ICMP timeouts so pass an explicit -t5 for those.
>>>>
>>>> Signed-off-by: Leonard Crestez <cdleonard@...il.com>
>>>> ---
>>>>    tools/testing/selftests/net/fcnal-test.sh | 17 +++++++++++------
>>>>    1 file changed, 11 insertions(+), 6 deletions(-)
>>>>
>>>
>>> The problem with blindly reducing the timeouts is running the script on
>>> a loaded server. Some tests are expected to timeout while for tests a
>>> timeout is a failure.
>>
>> Keeping the default value "5" would be fine as long as it is possible to
>> override externally and get fast results on a mostly-idle machine.
> 
> 5 is the default for nettest.c; the test script passes in -t1 for all tests.

An explicit -t is only passed for some of the tests

$ grep -c nettest.*-r tools/testing/selftests/net/fcnal-test.sh
243
$ grep -c nettest.*-t tools/testing/selftests/net/fcnal-test.sh
15

>> Placing a default value in the environment which is overriden by certain
>> tests achieves that.
>>
>> In theory it would also be possible for fcnal-test.sh to parse as
>> "--timeout" option and pass it into every single test but that solution
>> would cause much more code churn.
>>
>> Having default values in environment variables that can still be
>> overridden by command-line arguments is a common pattern in many tools.
>> It also avoids having to pass-through every flag through every
>> intermediate wrapper.
> 
> I do not agree with env variables here.

Would you agree with adding an option to fcnal-test.sh which decreases 
timeouts passed to nettest client calls?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ