[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6882c3f-4ecf-4b4e-c20e-09b88da4fbd6@gmail.com>
Date: Thu, 7 Oct 2021 00:35:14 +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 08/11] selftests: net/fcnal: Replace sleep after server
start with -k
On 06.10.2021 17:54, David Ahern wrote:
> 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@...il.com>
>> ---
>> 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?
I counted the [FAIL] or [ OK ] markers but not the output of nettest
itself. I don't know what to look for, I guess I could diff the outputs?
Shouldn't it be sufficient to compare the exit codes of the nettest client?
The output is also modified by a previous change to not capture server
output separately and instead let it be combined with that of the
client. That change is required for this one, doing out=$(nettest -k)
does not return on fork unless the pipe is also closed.
I did not look at your change, mine is relatively minimal because it
only changes who decide when the server goes into the background: the
shell script or the server itself. This makes it work very easily even
for tests with multiple server instances.
--
Regards,
Leonard
Powered by blists - more mailing lists