All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "selftests: mptcp: add the MP_RST mibs check"
@ 2022-02-13  0:04 Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2022-02-13  0:04 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-13  0:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13  0:04 [PATCH mptcp-next] Squash to "selftests: mptcp: add the MP_RST mibs check" Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.