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>
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