selftests: mptcp: clean tmp files in simult_flows
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Wed, 1 Sep 2021 17:15:37 +0000 (10:15 -0700)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:32:59 +0000 (12:32 +0100)
commitdcd1ed4a7135155f0b43cd2a142a68ffea866c3f
tree2c7ef48dd3fcd3e74d73f92702ec8f3b3147a9de
parent1fc9e61df14dd7c495603bdf237f620881327ebf
selftests: mptcp: clean tmp files in simult_flows

[ Upstream commit bfd862a7e9318dd906844807a713d27cdd1a72b1 ]

'$cin' and '$sin' variables are local to a function: they are then not
available from the cleanup trap.

Instead, we need to use '$large' and '$small' that are not local and
defined just before setting the trap.

Without this patch, running this script in a loop might cause a:

  write: No space left on device

issue.

Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/mptcp/simult_flows.sh