Commit 7d9bf018 authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

selftests: mptcp: update output info of chk_rm_nr

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: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 26516e10
...@@ -1153,15 +1153,14 @@ chk_rm_nr() ...@@ -1153,15 +1153,14 @@ chk_rm_nr()
local invert=${3:-""} local invert=${3:-""}
local count local count
local dump_stats local dump_stats
local addr_ns local addr_ns=$ns1
local subflow_ns local subflow_ns=$ns2
local extra_msg=""
if [ -z $invert ]; then if [[ $invert = "invert" ]]; then
addr_ns=$ns1
subflow_ns=$ns2
elif [ $invert = "invert" ]; then
addr_ns=$ns2 addr_ns=$ns2
subflow_ns=$ns1 subflow_ns=$ns1
extra_msg=" invert"
fi fi
printf "%-${nr_blank}s %s" " " "rm " printf "%-${nr_blank}s %s" " " "rm "
...@@ -1175,7 +1174,7 @@ chk_rm_nr() ...@@ -1175,7 +1174,7 @@ chk_rm_nr()
echo -n "[ ok ]" echo -n "[ ok ]"
fi fi
echo -n " - sf " echo -n " - rmsf "
count=`ip netns exec $subflow_ns nstat -as | grep MPTcpExtRmSubflow | awk '{print $2}'` count=`ip netns exec $subflow_ns nstat -as | grep MPTcpExtRmSubflow | awk '{print $2}'`
[ -z "$count" ] && count=0 [ -z "$count" ] && count=0
if [ "$count" != "$rm_subflow_nr" ]; then if [ "$count" != "$rm_subflow_nr" ]; then
...@@ -1183,10 +1182,12 @@ chk_rm_nr() ...@@ -1183,10 +1182,12 @@ chk_rm_nr()
ret=1 ret=1
dump_stats=1 dump_stats=1
else else
echo "[ ok ]" echo -n "[ ok ]"
fi fi
[ "${dump_stats}" = 1 ] && dump_stats [ "${dump_stats}" = 1 ] && dump_stats
echo "$extra_msg"
} }
chk_prio_nr() chk_prio_nr()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment