Skip to content

Commit 12deb63

Browse files
matttbeintel-lab-lkp
authored andcommitted
selftests: mptcp: reset the last TS before the first test
Just to slightly improve the precision of the duration of the first test. In mptcp_join.sh, the last append_prev_results is now done as soon as the last test is over: this will add the last result in the list, and get a more precise time for this last test. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 608aff4 commit 12deb63

File tree

6 files changed

+9
-1
lines changed

6 files changed

+9
-1
lines changed

tools/testing/selftests/net/mptcp/mptcp_connect.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,8 @@ stop_if_error()
847847
make_file "$cin" "client"
848848
make_file "$sin" "server"
849849

850+
mptcp_lib_subtests_last_ts_reset
851+
850852
check_mptcp_disabled
851853

852854
stop_if_error "The kernel configuration is not valid for MPTCP"

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3868,9 +3868,11 @@ if [ ${#tests[@]} -eq 0 ]; then
38683868
tests=("${all_tests_names[@]}")
38693869
fi
38703870

3871+
mptcp_lib_subtests_last_ts_reset
38713872
for subtests in "${tests[@]}"; do
38723873
"${subtests}"
38733874
done
3875+
append_prev_results
38743876

38753877
if [ ${ret} -ne 0 ]; then
38763878
echo
@@ -3881,7 +3883,6 @@ if [ ${ret} -ne 0 ]; then
38813883
echo
38823884
fi
38833885

3884-
append_prev_results
38853886
mptcp_lib_result_print_all_tap
38863887

38873888
exit $ret

tools/testing/selftests/net/mptcp/mptcp_sockopt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ init
349349
make_file "$cin" "client" 1
350350
make_file "$sin" "server" 1
351351
trap cleanup EXIT
352+
mptcp_lib_subtests_last_ts_reset
352353

353354
run_tests $ns1 $ns2 10.0.1.1
354355
run_tests $ns1 $ns2 dead:beef:1::1

tools/testing/selftests/net/mptcp/pm_netlink.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ check()
137137
fi
138138
}
139139

140+
mptcp_lib_subtests_last_ts_reset
141+
140142
check "show_endpoints" "" "defaults addr list"
141143

142144
default_limits="$(get_limits)"

tools/testing/selftests/net/mptcp/simult_flows.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ while getopts "bcdhi" option;do
286286
done
287287

288288
setup
289+
mptcp_lib_subtests_last_ts_reset
289290
run_test 10 10 0 0 "balanced bwidth"
290291
run_test 10 10 1 25 "balanced bwidth with unbalanced delay"
291292

tools/testing/selftests/net/mptcp/userspace_pm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ mptcp_lib_events "${ns2}" "${client_evts}" client_evts_pid
150150
server_evts=$(mktemp)
151151
mptcp_lib_events "${ns1}" "${server_evts}" server_evts_pid
152152
sleep 0.5
153+
mptcp_lib_subtests_last_ts_reset
153154

154155
print_title "Init"
155156
print_test "Created network namespaces ns1, ns2"

0 commit comments

Comments
 (0)