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

Reflect the ns_invert.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v3:
 - add extra_msg

v2:
 - update the output message from
                                         rtx[ ok ] - rstrx [ ok ] - invert
 to
                                         rtx[ ok ] - rstrx [ ok ]   invert
---
 .../testing/selftests/net/mptcp/mptcp_join.sh | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 3252865352f3..93943cb5e4c9 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -809,13 +809,14 @@ chk_rst_nr()
 	local ns_invert=${3:-""}
 	local count
 	local dump_stats
+	local ns_tx=$ns1
+	local ns_rx=$ns2
+	local extra_msg=""
 
-	if [ -z $ns_invert ]; then
-		ns_tx=$ns1
-		ns_rx=$ns2
-	elif [ $ns_invert = "invert" ]; then
+	if [[ $ns_invert = "invert" ]]; then
 		ns_tx=$ns2
 		ns_rx=$ns1
+		extra_msg="   invert"
 	fi
 
 	printf "%-${nr_blank}s %s" " " "rtx"
@@ -837,16 +838,10 @@ chk_rst_nr()
 		ret=1
 		dump_stats=1
 	else
-		if [ -z $ns_invert ]; then
-			echo "[ ok ]"
-		elif [ $ns_invert = "invert" ]; then
-			echo -n "[ ok ]"
-		fi
+		echo -n "[ ok ]"
 	fi
 
-	if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then
-		echo " - invert"
-	fi
+	echo "$extra_msg"
 
 	[ "${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-15 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 22:16 [PATCH mptcp-next v3] Squash to "selftests: mptcp: add the MP_RST mibs check v3" 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.