Lines Matching +full:many +full:- +full:to +full:- +full:many
2 # SPDX-License-Identifier: GPL-2.0
4 # Double quotes to prevent globbing and word splitting is recommended in new
5 # code but we accept it, especially because there were too many before having
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
52 local skip="${4-SKIP}"
78 __chk_nr "ss -inmHMN $ns | $condition" "$@"
83 __chk_msk_nr "grep -c token:" "$@"
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:"
107 while [ $i -lt $timeout ]; do
108 nr=$(ss -inmHMN $ns | $condition)
110 [ $nr -gt $max ] && max=$nr
116 if [ $i -ge $timeout ]; then
132 __chk_msk_nr "grep -c fallback" "$@"
137 __chk_msk_nr "grep -c remote_key" "$@"
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
176 listen_nr=$(ss -N "${ns}" -Ml | grep -c LISTEN)
180 if [ "$(get_msk_inuse)" -eq $expected ]; then
193 local msg="....chk ${2:-${expected}} cestab"
195 if [ "${expected}" -eq 0 ]; then
209 ss_token="$(ss -inmHMN $ns |
212 token="$(ip netns exec $ns ./mptcp_diag -t $ss_token |\
213 awk -F':[ \t]+' '/^token/ {print $2}')"
218 if [ -n "$ss_token" ] && [ "$ss_token" = "$token" ]; then
236 ss_output=$(ss -tniN $ns)
239 grep -m1 -Eo '[0-9.]+:[0-9].+ +[0-9.]+:[0-9.]+')
241 ss_token=$(echo "$ss_output" | grep -m1 -Eo 'token:[^ ]+')
243 inet_diag_token=$(ip netns exec $ns ./mptcp_diag -s "$subflow_line" | \
244 grep -Eo 'token:[^ ]+')
249 if [ -n "$ss_token" ] && [ "$ss_token" = "$inet_diag_token" ]; then
264 ss -N "${ns}" -inHM dport "${port}" | \
274 local delta_ms=250 # half what we waited before, just to be sure
280 if { [ -z "${cnt}" ] || [ -z "${now}" ]; } &&
284 elif [ "$((cnt + delta_ms))" -lt "${now}" ]; then
288 mptcp_lib_pr_fail "value of ${info} changed by $((now - cnt))ms," \
304 sleep 0.5 # wait to check after if the timestamps difference
320 ip netns exec ${listener_ns} grep -q " 0100007F:${port_hex} " /proc/net/tcp && break
331 ./mptcp_connect -p 10000 -l -t ${timeout_poll} -w 20 \
340 ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} -w 20 \
353 chk_msk_inuse 0 "2->0"
354 chk_msk_cestab 0 "2->0"
359 ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} -w 20 \
365 ./mptcp_connect -p 10001 -r 0 -t ${timeout_poll} -w 20 \
373 chk_msk_inuse 0 "1->0"
374 chk_msk_cestab 0 "1->0"
381 ./mptcp_connect -p $((I+10001)) -l -w 20 \
382 -t ${timeout_poll} 0.0.0.0 >/dev/null &
390 ./mptcp_connect -p $((I+10001)) -w 20 \
391 -t ${timeout_poll} 127.0.0.1 >/dev/null &
394 wait_msk_nr $((NR_CLIENTS*2)) "many msk socket present"
395 chk_msk_inuse $((NR_CLIENTS*2)) "many"
396 chk_msk_cestab $((NR_CLIENTS*2)) "many"
399 chk_msk_inuse 0 "many->0"
400 chk_msk_cestab 0 "many->0"
405 ip netns exec $ns ./mptcp_connect -p $((I + 20001)) \
406 -t ${timeout_poll} -l 0.0.0.0 >/dev/null 2>&1 &
410 chk_listener_nr $NR_SERVERS "many listener sockets"
414 echo a | ip netns exec $ns ./mptcp_connect -p $((I + 20001)) 127.0.0.1 >/dev/null 2>&1 &