[PATCH mptcp-next] Squash to "selftests: mptcp: add more arguments for chk_join_nr v7"

Geliang Tang posted 1 patch 2 years, 2 months ago
Failed in applying to current master (apply log)
tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH mptcp-next] Squash to "selftests: mptcp: add more arguments for chk_join_nr v7"
Posted by Geliang Tang 2 years, 2 months ago
Allow multiple checksum errors.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 0b739785efd1..0e4a4c58f264 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -752,7 +752,8 @@ chk_csum_nr()
 	printf " %-36s %s" "$msg" "sum"
 	count=`ip netns exec $ns1 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
 	[ -z "$count" ] && count=0
-	if [ "$count" != $csum_ns1 ]; then
+	# allow multiple checksum errors
+	if [ "$count" -lt $csum_ns1 ]; then
 		echo "[fail] got $count data checksum error[s] expected $csum_ns1"
 		ret=1
 		dump_stats=1
@@ -762,7 +763,7 @@ chk_csum_nr()
 	echo -n " - csum  "
 	count=`ip netns exec $ns2 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
 	[ -z "$count" ] && count=0
-	if [ "$count" != $csum_ns2 ]; then
+	if [ "$count" -lt $csum_ns2 ]; then
 		echo "[fail] got $count data checksum error[s] expected $csum_ns2"
 		ret=1
 		dump_stats=1
-- 
2.34.1


Re: [PATCH mptcp-next] Squash to "selftests: mptcp: add more arguments for chk_join_nr v7"
Posted by Mat Martineau 2 years, 2 months ago
On Sat, 12 Feb 2022, Geliang Tang wrote:

> Allow multiple checksum errors.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 0b739785efd1..0e4a4c58f264 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -752,7 +752,8 @@ chk_csum_nr()
> 	printf " %-36s %s" "$msg" "sum"
> 	count=`ip netns exec $ns1 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
> 	[ -z "$count" ] && count=0
> -	if [ "$count" != $csum_ns1 ]; then
> +	# allow multiple checksum errors
> +	if [ "$count" -lt $csum_ns1 ]; then

This breaks the other checksum tests - there are still tests where 
$csum_ns1 and $csum_ns2 default to 0 and the test should fail if $count > 
0.

> 		echo "[fail] got $count data checksum error[s] expected $csum_ns1"
> 		ret=1
> 		dump_stats=1
> @@ -762,7 +763,7 @@ chk_csum_nr()
> 	echo -n " - csum  "
> 	count=`ip netns exec $ns2 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
> 	[ -z "$count" ] && count=0
> -	if [ "$count" != $csum_ns2 ]; then
> +	if [ "$count" -lt $csum_ns2 ]; then
> 		echo "[fail] got $count data checksum error[s] expected $csum_ns2"
> 		ret=1
> 		dump_stats=1
> -- 
> 2.34.1
>
>
>

--
Mat Martineau
Intel