File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
tools/testing/selftests/net/mptcp Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 22# SPDX-License-Identifier: GPL-2.0
33
44. " $( dirname " ${0} " ) /../lib.sh"
5+ . " $( dirname " ${0} " ) /../net_helper.sh"
56
67readonly KSFT_PASS=0
78readonly KSFT_FAIL=1
@@ -363,20 +364,7 @@ mptcp_lib_check_transfer() {
363364
364365# $1: ns, $2: port
365366mptcp_lib_wait_local_port_listen () {
366- local listener_ns=" ${1} "
367- local port=" ${2} "
368-
369- local port_hex
370- port_hex=" $( printf " %04X" " ${port} " ) "
371-
372- local _
373- for _ in $( seq 10) ; do
374- ip netns exec " ${listener_ns} " cat /proc/net/tcp* | \
375- awk " BEGIN {rc=1} {if (\$ 2 ~ /:${port_hex} \$ / && \$ 4 ~ /0A/) \
376- {rc=0; exit}} END {exit rc}" &&
377- break
378- sleep 0.1
379- done
367+ wait_local_port_listen " ${@ } " " tcp"
380368}
381369
382370mptcp_lib_check_output () {
You can’t perform that action at this time.
0 commit comments