[PATCH mptcp-next v4] Squash to "selftests: mptcp: add the MP_RST mibs check v3"

Geliang Tang posted 1 patch 2 years, 2 months ago
Failed in applying to current master (apply log)
.../testing/selftests/net/mptcp/mptcp_join.sh | 21 +++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
[PATCH mptcp-next v4] Squash to "selftests: mptcp: add the MP_RST mibs check v3"
Posted by Geliang Tang 2 years, 2 months ago
Reflect the ns_invert.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v4:
 - show extra_msg after dump_stats

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 | 21 +++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 3252865352f3..644db851a56c 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,18 +838,12 @@ 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
-	fi
-
-	if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then
-		echo " - invert"
+		echo -n "[ ok ]"
 	fi
 
 	[ "${dump_stats}" = 1 ] && dump_stats
+
+	echo "$extra_msg"
 }
 
 chk_infi_nr()
-- 
2.34.1


Re: [PATCH mptcp-next v4] Squash to "selftests: mptcp: add the MP_RST mibs check v3"
Posted by Mat Martineau 2 years, 2 months ago
On Fri, 18 Feb 2022, Geliang Tang wrote:

> Reflect the ns_invert.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> v4:
> - show extra_msg after dump_stats
>

Looks ok to squash, thanks Geliang.

-Mat

> 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 | 21 +++++++------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 3252865352f3..644db851a56c 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,18 +838,12 @@ 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
> -	fi
> -
> -	if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then
> -		echo " - invert"
> +		echo -n "[ ok ]"
> 	fi
>
> 	[ "${dump_stats}" = 1 ] && dump_stats
> +
> +	echo "$extra_msg"
> }
>
> chk_infi_nr()
> -- 
> 2.34.1
>
>
>

--
Mat Martineau
Intel