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
208 ss -N "${ns}" -inHM dport "${port}" | \
218 local delta_ms=250 # half what we waited before, just to be sure
224 if { [ -z "${cnt}" ] || [ -z "${now}" ]; } &&
228 elif [ "$((cnt + delta_ms))" -lt "${now}" ]; then
232 mptcp_lib_pr_fail "value of ${info} changed by $((now - cnt))ms," \
248 sleep 0.5 # wait to check after if the timestamps difference
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 &
336 wait_msk_nr $((NR_CLIENTS*2)) "many msk socket present"
337 chk_msk_inuse $((NR_CLIENTS*2)) "many"
338 chk_msk_cestab $((NR_CLIENTS*2)) "many"
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 &
352 chk_listener_nr $NR_SERVERS "many listener sockets"
356 echo a | ip netns exec $ns ./mptcp_connect -p $((I + 20001)) 127.0.0.1 >/dev/null 2>&1 &