[PATCH mptcp-next] selftests: mptcp: fix a mp_fail test warning

Geliang Tang posted 1 patch 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/6dd3d1ae0042025c2b4b4fde0e341562c200024a.1651537116.git.geliang.tang@suse.com
Maintainers: Mat Martineau <mathew.j.martineau@linux.intel.com>, Geliang Tang <geliang.tang@suse.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Eric Dumazet <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, Matthieu Baerts <matthieu.baerts@tessares.net>
tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
1 file changed, 1 insertion(+)
[PATCH mptcp-next] selftests: mptcp: fix a mp_fail test warning
Posted by Geliang Tang 1 year, 11 months ago
Older version tc command (iprout2 5.3) shows actions in multiple lines,
not a single line. Then the following unexpected MP_FAIL selftest output
occurs:

 file received by server has inverted byte at 169
 ./mptcp_join.sh: line 1277: [: [{"total acts":1},{"actions":[{"order":0 pedit ,"control_action":{"type":"pipe"}keys 1
         index 1 ref 1 bind 1,"installed":0,"last_used":0
         key #0  at 148: val ff000000 mask ffffffff
 5: integer expression expected
 001 Infinite map                      syn[ ok ] - synack[ ok ] - ack[ ok ]
                                       sum[ ok ] - csum  [ ok ]
                                       ftx[ ok ] - failrx[ ok ]
                                       rtx[ ok ] - rstrx [ ok ]
                                       itx[ ok ] - infirx[ ok ]
                                       ftx[ ok ] - failrx[ ok ] invert

This patch adds a 'grep' before 'sed' to fix this.

Fixes: b6e074e171bc ("selftests: mptcp: add infinite map testcase")
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index b703b61562bf..cb1ba78da3ce 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2693,6 +2693,7 @@ fastclose_tests()
 pedit_action_pkts()
 {
 	tc -n $ns2 -j -s action show action pedit index 100 | \
+		grep "packets" | \
 		sed 's/.*"packets":\([0-9]\+\),.*/\1/'
 }
 
-- 
2.34.1


Re: [PATCH mptcp-next] selftests: mptcp: fix a mp_fail test warning
Posted by Matthieu Baerts 1 year, 11 months ago
Hi Geliang,

On 03/05/2022 02:19, Geliang Tang wrote:
> Older version tc command (iprout2 5.3) shows actions in multiple lines,
> not a single line. Then the following unexpected MP_FAIL selftest output
> occurs:
> 
>  file received by server has inverted byte at 169
>  ./mptcp_join.sh: line 1277: [: [{"total acts":1},{"actions":[{"order":0 pedit ,"control_action":{"type":"pipe"}keys 1
>          index 1 ref 1 bind 1,"installed":0,"last_used":0
>          key #0  at 148: val ff000000 mask ffffffff
>  5: integer expression expected
>  001 Infinite map                      syn[ ok ] - synack[ ok ] - ack[ ok ]
>                                        sum[ ok ] - csum  [ ok ]
>                                        ftx[ ok ] - failrx[ ok ]
>                                        rtx[ ok ] - rstrx [ ok ]
>                                        itx[ ok ] - infirx[ ok ]
>                                        ftx[ ok ] - failrx[ ok ] invert
> 
> This patch adds a 'grep' before 'sed' to fix this.

Thank you for the patch!

Now in our tree (fix for net-next) with my RvB tag and without the
iproute2 typo:

New patches for t/upstream:
- d691758ed81c: selftests: mptcp: fix a mp_fail test warning
- Results: c3f5d94e8dc4..9cac72edfb62 (export)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220503T163309
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH mptcp-next] selftests: mptcp: fix a mp_fail test warning
Posted by Geliang Tang 1 year, 11 months ago
On Tue, May 03, 2022 at 08:19:21AM +0800, Geliang Tang wrote:
> Older version tc command (iprout2 5.3) shows actions in multiple lines,
                            
Here's a typo in commit log, it should be 'iproute2 5.3'. Please help me
to fix this when merging this patch.

Thanks,
-Geliang

> not a single line. Then the following unexpected MP_FAIL selftest output
> occurs:
> 
>  file received by server has inverted byte at 169
>  ./mptcp_join.sh: line 1277: [: [{"total acts":1},{"actions":[{"order":0 pedit ,"control_action":{"type":"pipe"}keys 1
>          index 1 ref 1 bind 1,"installed":0,"last_used":0
>          key #0  at 148: val ff000000 mask ffffffff
>  5: integer expression expected
>  001 Infinite map                      syn[ ok ] - synack[ ok ] - ack[ ok ]
>                                        sum[ ok ] - csum  [ ok ]
>                                        ftx[ ok ] - failrx[ ok ]
>                                        rtx[ ok ] - rstrx [ ok ]
>                                        itx[ ok ] - infirx[ ok ]
>                                        ftx[ ok ] - failrx[ ok ] invert
> 
> This patch adds a 'grep' before 'sed' to fix this.
> 
> Fixes: b6e074e171bc ("selftests: mptcp: add infinite map testcase")
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index b703b61562bf..cb1ba78da3ce 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -2693,6 +2693,7 @@ fastclose_tests()
>  pedit_action_pkts()
>  {
>  	tc -n $ns2 -j -s action show action pedit index 100 | \
> +		grep "packets" | \
>  		sed 's/.*"packets":\([0-9]\+\),.*/\1/'
>  }
>  
> -- 
> 2.34.1
>