Skip to content

Commit

Permalink
selftests: mptcp: update output info of chk_rm_nr
Browse files Browse the repository at this point in the history
This patch updated the output info of chk_rm_nr. Renamed 'sf' to 'rmsf',
which means 'remove subflow'. Added the display of whether the inverted
namespaces has been used to check the mib counters.

The new output looks like this:

 002 remove multiple subflows          syn[ ok ] - synack[ ok ] - ack[ ok ]
                                       rm [ ok ] - rmsf  [ ok ]
 003 remove single address             syn[ ok ] - synack[ ok ] - ack[ ok ]
                                       add[ ok ] - echo  [ ok ]
                                       rm [ ok ] - rmsf  [ ok ]   invert

Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
geliangtang authored and kuba-moo committed Mar 5, 2022
1 parent 26516e1 commit 7d9bf01
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1153,15 +1153,14 @@ chk_rm_nr()
local invert=${3:-""}
local count
local dump_stats
local addr_ns
local subflow_ns
local addr_ns=$ns1
local subflow_ns=$ns2
local extra_msg=""

if [ -z $invert ]; then
addr_ns=$ns1
subflow_ns=$ns2
elif [ $invert = "invert" ]; then
if [[ $invert = "invert" ]]; then
addr_ns=$ns2
subflow_ns=$ns1
extra_msg=" invert"
fi

printf "%-${nr_blank}s %s" " " "rm "
Expand All @@ -1175,18 +1174,20 @@ chk_rm_nr()
echo -n "[ ok ]"
fi

echo -n " - sf "
echo -n " - rmsf "
count=`ip netns exec $subflow_ns nstat -as | grep MPTcpExtRmSubflow | awk '{print $2}'`
[ -z "$count" ] && count=0
if [ "$count" != "$rm_subflow_nr" ]; then
echo "[fail] got $count RM_SUBFLOW[s] expected $rm_subflow_nr"
ret=1
dump_stats=1
else
echo "[ ok ]"
echo -n "[ ok ]"
fi

[ "${dump_stats}" = 1 ] && dump_stats

echo "$extra_msg"
}

chk_prio_nr()
Expand Down

0 comments on commit 7d9bf01

Please sign in to comment.