Message ID | 031f4529f5e9daf33e4818b48693e1b0eb25814d.1710748923.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Mat Martineau |
Headers | show |
Series | display "last time" actions info | expand |
Context | Check | Description |
---|---|---|
matttbe/build | success | Build and static analysis OK |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 39 lines checked |
matttbe/shellcheck | success | No ShellCheck issues |
matttbe/KVM_Validation__normal | success | Success! ✅ |
matttbe/KVM_Validation__debug | warning | Unstable: 2 failed test(s): packetdrill_sockopts selftest_mptcp_join |
matttbe/KVM_Validation__btf__only_bpftest_all_ | success | Success! ✅ |
On Mon, 18 Mar 2024, Geliang Tang wrote: > From: Geliang Tang <tanggeliang@kylinos.cn> > > This patch adds a new helper show_mptcp_info() to show the counters in > mptcp_info of the given infos. Use it to show newly added last_data_sent, > last_data_recv and last_ack_recv in mptcp_info in endpoint_tests(). > > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> > --- > .../testing/selftests/net/mptcp/mptcp_join.sh | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh > index 70621cbbab09..6a6caf472d68 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh Hi Geliang - diag.sh would be a better location for new mptcp_info tests. Could check that the timestamps move forward when data is sent or received, that would verify functionality more than the informational messages below. Thanks, Mat > @@ -1855,6 +1855,25 @@ chk_subflows_total() > fi > } > > +show_mptcp_info() > +{ > + local info > + > + for info in "${@}"; do > + local cnt1 > + local cnt2 > + > + cnt1=$(ss -N $ns1 -inmHM | mptcp_lib_get_info_value "$info" "$info") > + cnt2=$(ss -N $ns2 -inmHM | mptcp_lib_get_info_value "$info" "$info") > + print_check "mptcp_info ${info:0:15}=$cnt1:$cnt2" > + if [ -z "$cnt1" ] || [ -z "$cnt2" ]; then > + print_skip > + else > + print_ok > + fi > + done > +} > + > chk_link_usage() > { > local ns=$1 > @@ -3589,6 +3608,7 @@ endpoint_tests() > $ns2 10.0.2.2 id 1 flags implicit > chk_mptcp_info subflows 1 subflows 1 > chk_mptcp_info add_addr_signal 1 add_addr_accepted 1 > + show_mptcp_info last_data_sent last_data_recv last_ack_recv > > pm_nl_add_endpoint $ns2 10.0.2.2 id 33 2>/dev/null > pm_nl_check_endpoint "ID change is prevented" \ > @@ -3612,6 +3632,7 @@ endpoint_tests() > wait_mpj $ns2 > chk_subflow_nr "before delete" 2 > chk_mptcp_info subflows 1 subflows 1 > + show_mptcp_info last_data_sent last_data_recv last_ack_recv > > pm_nl_del_endpoint $ns2 2 10.0.2.2 > sleep 0.5 > -- > 2.40.1 > > >
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 70621cbbab09..6a6caf472d68 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1855,6 +1855,25 @@ chk_subflows_total() fi } +show_mptcp_info() +{ + local info + + for info in "${@}"; do + local cnt1 + local cnt2 + + cnt1=$(ss -N $ns1 -inmHM | mptcp_lib_get_info_value "$info" "$info") + cnt2=$(ss -N $ns2 -inmHM | mptcp_lib_get_info_value "$info" "$info") + print_check "mptcp_info ${info:0:15}=$cnt1:$cnt2" + if [ -z "$cnt1" ] || [ -z "$cnt2" ]; then + print_skip + else + print_ok + fi + done +} + chk_link_usage() { local ns=$1 @@ -3589,6 +3608,7 @@ endpoint_tests() $ns2 10.0.2.2 id 1 flags implicit chk_mptcp_info subflows 1 subflows 1 chk_mptcp_info add_addr_signal 1 add_addr_accepted 1 + show_mptcp_info last_data_sent last_data_recv last_ack_recv pm_nl_add_endpoint $ns2 10.0.2.2 id 33 2>/dev/null pm_nl_check_endpoint "ID change is prevented" \ @@ -3612,6 +3632,7 @@ endpoint_tests() wait_mpj $ns2 chk_subflow_nr "before delete" 2 chk_mptcp_info subflows 1 subflows 1 + show_mptcp_info last_data_sent last_data_recv last_ack_recv pm_nl_del_endpoint $ns2 2 10.0.2.2 sleep 0.5