mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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>
This commit is contained in:
parent
b7c746a8ee
commit
c8da80af28
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user