Showed in the output whether the inverted namespaces check order is used.
Since if we pass -Cz to mptcp_join.sh, the MP_RST information is showed
twice:
001 fastclose test 1 syn[ ok ] - synack[ ok ] - ack[ ok ]
sum[ ok ] - csum [ ok ]
ftx[ ok ] - frx [ ok ]
rtx[ ok ] - rstrx [ ok ]
itx[ ok ] - irx [ ok ]
ctx[ ok ] - fclzrx[ ok ]
rtx[ ok ] - rstrx [ ok ] - invert
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 000272eec5a5..3252865352f3 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -806,14 +806,14 @@ chk_rst_nr()
{
local rst_tx=$1
local rst_rx=$2
- local invert=${3:-""}
+ local ns_invert=${3:-""}
local count
local dump_stats
- if [ -z $invert ]; then
+ if [ -z $ns_invert ]; then
ns_tx=$ns1
ns_rx=$ns2
- elif [ $invert = "invert" ]; then
+ elif [ $ns_invert = "invert" ]; then
ns_tx=$ns2
ns_rx=$ns1
fi
@@ -837,7 +837,15 @@ chk_rst_nr()
ret=1
dump_stats=1
else
- echo "[ ok ]"
+ if [ -z $ns_invert ]; then
+ echo "[ ok ]"
+ elif [ $ns_invert = "invert" ]; then
+ echo -n "[ ok ]"
+ fi
+ fi
+
+ if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then
+ echo " - invert"
fi
[ "${dump_stats}" = 1 ] && dump_stats
--
2.34.1