Re: [PATCH 08/11] selftests: net/fcnal: Replace sleep after server start with -k

From: David Ahern
Date: Wed Oct 06 2021 - 10:54:55 EST


On 10/6/21 5:47 AM, Leonard Crestez wrote:
> The -k switch makes the server fork into the background after the listen
> call is succesful, this can be used to replace most of the `sleep 1`
> statements in this script.
>
> Change performed with a vim command:
>
> s/nettest \(.*-s.*\) &\n\s*sleep 1\n/nettest \1 -k\r
>
> Signed-off-by: Leonard Crestez <cdleonard@xxxxxxxxx>
> ---
> tools/testing/selftests/net/fcnal-test.sh | 641 ++++++++--------------
> 1 file changed, 219 insertions(+), 422 deletions(-)
>

I have a change from January [1] that runs the tests with 1 binary -
takes both client and server side arguments, does the server setup,
switches namespaces as needed and then runs the client side. I got
bogged down validating the before and after which takes a long time
given the number of tests. The output in verbose mode is as important as
the pass / fail. Many of the tests document existing behavior as well as
intended behavior.

You used a search and replace to update the tests. Did you then do the
compare of test results - not pass / fail but output?


[1]
https://github.com/dsahern/linux/commit/8e16fbab1eb224298e3324a9ddf38e27eee439c7