summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2026-05-27 22:11:36 +1000
committerJakub Kicinski <kuba@kernel.org>2026-05-28 16:38:13 -0700
commitc8da80af2838e68a262d0045999b808e9cd27237 (patch)
treec14660eff6aa0adeb753878ab34db34b4c5000f3 /tools
parentb7c746a8eeeadf046120849e0018060fdfc19247 (diff)
selftests: mptcp: sockopt: set EXIT trap earlier
Set the EXIT trap for cleanup immediately after creating temporary file variables, before init and make_file, to ensure cleanup runs on any failure or interruption during the early setup phase. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260527-net-mptcp-sft-bufferbloat-exit-v1-3-9afc4e742090@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/mptcp/mptcp_sockopt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
index ab8bce06b262..e850a87429b6 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
@@ -355,10 +355,10 @@ sin=$(mktemp)
sout=$(mktemp)
cin=$(mktemp)
cout=$(mktemp)
+trap cleanup EXIT
init
make_file "$cin" "client" 1
make_file "$sin" "server" 1
-trap cleanup EXIT
mptcp_lib_subtests_last_ts_reset
run_tests $ns1 $ns2 10.0.1.1