tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
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
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
© 2016 - 2026 Red Hat, Inc.