Skip to content

Commit

Permalink
selftests: mptcp: clean tmp files in simult_flows
Browse files Browse the repository at this point in the history
[ Upstream commit bfd862a ]

'$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: 1a418cb ("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>
  • Loading branch information
matttbe authored and gregkh committed Sep 22, 2021
1 parent e35820f commit 5d37e73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/net/mptcp/simult_flows.sh
Expand Up @@ -22,8 +22,8 @@ usage() {

cleanup()
{
rm -f "$cin" "$cout"
rm -f "$sin" "$sout"
rm -f "$cout" "$sout"
rm -f "$large" "$small"
rm -f "$capout"

local netns
Expand Down

0 comments on commit 5d37e73

Please sign in to comment.