selftests: mptcp: userspace: avoid read errors
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Wed, 25 Jan 2023 10:47:28 +0000 (11:47 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 26 Jan 2023 12:33:30 +0000 (13:33 +0100)
commit8dbdf24f4e9e060e4c4a3ad282a4a57f80f48b1f
tree48c4d49ba25d1e7249017290613549eb1579aa94
parent10d4273411be6ead4d4d8a50a0593da15154f43f
selftests: mptcp: userspace: avoid read errors

During the cleanup phase, the server pids were killed with a SIGTERM
directly, not using a SIGUSR1 first to quit safely. As a result, this
test was often ending with two error messages:

  read: Connection reset by peer

While at it, use a for-loop to terminate all the PIDs the same way.

Also the different files are now removed after having killed the PIDs
using them. It makes more sense to do that in this order.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/mptcp/userspace_pm.sh