lkml.org 
[lkml]   [2021]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout
From
Date


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@gmail.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.

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.

--
Regards,
Leonard

\
 
 \ /
  Last update: 2021-10-06 23:28    [W:0.089 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site