Lines Matching +full:max +full:- +full:msg

2 # SPDX-License-Identifier: GPL-2.0
22 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGUSR1 &>/dev/null
25 [ -z "$(ip netns pids "${ns}")" ] && break
34 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGKILL &>/dev/null
51 local msg="$3"
52 local skip="${4-SKIP}"
57 mptcp_lib_print_title "$msg"
61 mptcp_lib_result_skip "${msg}"
64 mptcp_lib_result_fail "${msg}"
69 mptcp_lib_result_pass "${msg}"
78 __chk_nr "ss -inmHMN $ns | $condition" "$@"
83 __chk_msk_nr "grep -c token:" "$@"
89 local msg="$2"
91 __chk_nr "ss -nlHMON $ns | wc -l" "$expected" "$msg - mptcp" 0
92 __chk_nr "ss -nlHtON $ns | wc -l" "$expected" "$msg - subflows"
97 local condition="grep -c token:"
100 local msg nr
101 local max=0
105 msg=$*
107 while [ $i -lt $timeout ]; do
108 nr=$(ss -inmHMN $ns | $condition)
110 [ $nr -gt $max ] && max=$nr
115 mptcp_lib_print_title "$msg"
116 if [ $i -ge $timeout ]; then
117 mptcp_lib_pr_fail "timeout while expecting $expected max $max last $nr"
118 mptcp_lib_result_fail "${msg} # timeout"
122 mptcp_lib_result_fail "${msg} # unexpected result"
126 mptcp_lib_result_pass "${msg}"
132 __chk_msk_nr "grep -c fallback" "$@"
137 __chk_msk_nr "grep -c remote_key" "$@"
144 local msg="$3"
146 __chk_nr "ss -N $ns -Ml '$filter' | grep -c LISTEN" "$expected" "$msg" 0
163 nr=$(ss -Ml $filter | wc -l)
169 local msg="....chk ${2:-${expected}} msk in use"
172 if [ "${expected}" -eq 0 ]; then
173 msg+=" after flush"
176 listen_nr=$(ss -N "${ns}" -Ml | grep -c LISTEN)
180 if [ "$(get_msk_inuse)" -eq $expected ]; then
186 __chk_nr get_msk_inuse $expected "${msg}" 0
193 local msg="....chk ${2:-${expected}} cestab"
195 if [ "${expected}" -eq 0 ]; then
196 msg+=" after flush"
200 "${expected}" "${msg}" ""
208 ss -N "${ns}" -inHM dport "${port}" | \
217 local msg="....chk ${info}"
223 mptcp_lib_print_title "${msg}"
224 if { [ -z "${cnt}" ] || [ -z "${now}" ]; } &&
227 mptcp_lib_result_skip "${msg}"
228 elif [ "$((cnt + delta_ms))" -lt "${now}" ]; then
230 mptcp_lib_result_pass "${msg}"
232 mptcp_lib_pr_fail "value of ${info} changed by $((now - cnt))ms," \
234 mptcp_lib_result_fail "${msg}"
264 ip netns exec ${listener_ns} grep -q " 0100007F:${port_hex} " /proc/net/tcp && break
275 ./mptcp_connect -p 10000 -l -t ${timeout_poll} -w 20 \
284 ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} -w 20 \
295 chk_msk_inuse 0 "2->0"
296 chk_msk_cestab 0 "2->0"
301 ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} -w 20 \
307 ./mptcp_connect -p 10001 -r 0 -t ${timeout_poll} -w 20 \
315 chk_msk_inuse 0 "1->0"
316 chk_msk_cestab 0 "1->0"
323 ./mptcp_connect -p $((I+10001)) -l -w 20 \
324 -t ${timeout_poll} 0.0.0.0 >/dev/null &
332 ./mptcp_connect -p $((I+10001)) -w 20 \
333 -t ${timeout_poll} 127.0.0.1 >/dev/null &
341 chk_msk_inuse 0 "many->0"
342 chk_msk_cestab 0 "many->0"
347 ip netns exec $ns ./mptcp_connect -p $((I + 20001)) \
348 -t ${timeout_poll} -l 0.0.0.0 >/dev/null 2>&1 &
356 echo a | ip netns exec $ns ./mptcp_connect -p $((I + 20001)) 127.0.0.1 >/dev/null 2>&1 &