mbox series

[net,0/2] selftests: pmtu.sh: Fix cleanup of processes launched in subshell.

Message ID cover.1646776561.git.gnault@redhat.com (mailing list archive)
Headers show
Series selftests: pmtu.sh: Fix cleanup of processes launched in subshell. | expand

Message

Guillaume Nault March 8, 2022, 10:14 p.m. UTC
Depending on the options used, pmtu.sh may launch tcpdump and nettest
processes in the background. However it fails to clean them up after
the tests complete.

Patch 1 allows the cleanup() function to read the list of PIDs launched
by the tests.
Patch 2 fixes the way the nettest PIDs are retrieved.

v2:
  * Use tcpdump's immediate mode to capture packets even in short lived
    tests.
  * Add patch 2 to fix the nettest_pids list.

Guillaume Nault (2):
  selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
  selftests: pmtu.sh: Kill nettest processes launched in subshell.

 tools/testing/selftests/net/pmtu.sh | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

Comments

Shuah Khan March 8, 2022, 11:51 p.m. UTC | #1
On 3/8/22 3:14 PM, Guillaume Nault wrote:
> Depending on the options used, pmtu.sh may launch tcpdump and nettest
> processes in the background. However it fails to clean them up after
> the tests complete.
> 
> Patch 1 allows the cleanup() function to read the list of PIDs launched
> by the tests.
> Patch 2 fixes the way the nettest PIDs are retrieved.
> 
> v2:
>    * Use tcpdump's immediate mode to capture packets even in short lived
>      tests.
>    * Add patch 2 to fix the nettest_pids list.
> 
> Guillaume Nault (2):
>    selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
>    selftests: pmtu.sh: Kill nettest processes launched in subshell.
> 
>   tools/testing/selftests/net/pmtu.sh | 21 +++++++++++++++++----
>   1 file changed, 17 insertions(+), 4 deletions(-)
> 

Both of these look good to me. One nit on commit header. Please
include net in the patch subject line in the future.

e.g: selftests:net pmtu.sh

Tested them on my system. Seeing these messages even after building
nettest:

'nettest' command not found; skipping tests
   xfrm6udp not supported
TEST: vti6: PMTU exceptions (ESP-in-UDP)                            [SKIP]
'nettest' command not found; skipping tests
   xfrm4udp not supported
TEST: vti4: PMTU exceptions (ESP-in-UDP)                            [SKIP]
'nettest' command not found; skipping tests
   xfrm6udprouted not supported
TEST: vti6: PMTU exceptions, routed (ESP-in-UDP)                    [SKIP]
'nettest' command not found; skipping tests
   xfrm4udprouted not supported

Might not be related to this patch though. I jusr ran pmtu.sh from
net directory.


Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah
Guillaume Nault March 9, 2022, 12:55 a.m. UTC | #2
On Tue, Mar 08, 2022 at 04:51:46PM -0700, Shuah Khan wrote:
> On 3/8/22 3:14 PM, Guillaume Nault wrote:
> > Depending on the options used, pmtu.sh may launch tcpdump and nettest
> > processes in the background. However it fails to clean them up after
> > the tests complete.
> > 
> > Patch 1 allows the cleanup() function to read the list of PIDs launched
> > by the tests.
> > Patch 2 fixes the way the nettest PIDs are retrieved.
> > 
> > v2:
> >    * Use tcpdump's immediate mode to capture packets even in short lived
> >      tests.
> >    * Add patch 2 to fix the nettest_pids list.
> > 
> > Guillaume Nault (2):
> >    selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
> >    selftests: pmtu.sh: Kill nettest processes launched in subshell.
> > 
> >   tools/testing/selftests/net/pmtu.sh | 21 +++++++++++++++++----
> >   1 file changed, 17 insertions(+), 4 deletions(-)
> > 
> 
> Both of these look good to me. One nit on commit header. Please
> include net in the patch subject line in the future.
> 
> e.g: selftests:net pmtu.sh

Thanks, I'll do that next time (I just reused keywords used by other
commits for this file).

> Tested them on my system. Seeing these messages even after building
> nettest:
> 
> 'nettest' command not found; skipping tests
>   xfrm6udp not supported
> TEST: vti6: PMTU exceptions (ESP-in-UDP)                            [SKIP]
> 'nettest' command not found; skipping tests
>   xfrm4udp not supported
> TEST: vti4: PMTU exceptions (ESP-in-UDP)                            [SKIP]
> 'nettest' command not found; skipping tests
>   xfrm6udprouted not supported
> TEST: vti6: PMTU exceptions, routed (ESP-in-UDP)                    [SKIP]
> 'nettest' command not found; skipping tests
>   xfrm4udprouted not supported
> 
> Might not be related to this patch though. I jusr ran pmtu.sh from
> net directory.

Personally I just modified my PATH before running pmtu.sh. Not sure if
there's a better way. But in any case, that's not related to this
patch.

> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> 
> thanks,
> -- Shuah
>
patchwork-bot+netdevbpf@kernel.org March 10, 2022, 5 a.m. UTC | #3
Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 8 Mar 2022 23:14:57 +0100 you wrote:
> Depending on the options used, pmtu.sh may launch tcpdump and nettest
> processes in the background. However it fails to clean them up after
> the tests complete.
> 
> Patch 1 allows the cleanup() function to read the list of PIDs launched
> by the tests.
> Patch 2 fixes the way the nettest PIDs are retrieved.
> 
> [...]

Here is the summary with links:
  - [net,1/2] selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
    https://git.kernel.org/netdev/net/c/18dfc667550f
  - [net,2/2] selftests: pmtu.sh: Kill nettest processes launched in subshell.
    https://git.kernel.org/netdev/net/c/94a4a4fe4c69

You are awesome, thank you!