[PATCH mptcp-next] Squash to "selftests: mptcp: add fastclose testcases"

Geliang Tang posted 1 patch 2 years, 1 month ago
Failed in applying to current master (apply log)
tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
[PATCH mptcp-next] Squash to "selftests: mptcp: add fastclose testcases"
Posted by Geliang Tang 2 years, 1 month ago
This patch makes the fastclose testcase more stable. I had tested it
over 10,000 times, no failures occurred.

1. Drop "fastclose test 2". The two tests are somewhat repetitive, and
test 2 is more likely to fail than test 1.

And patch 7 in this series ("selftests: mptcp: fastclose check in
mptcp_connect") should be dropped too. It may break mptcp_connect.sh.

2. Use the test_linkfail value to make 1024KB test files. So patch 4
in the "add mp_fail testcases" series ("selftests: mptcp: reuse linkfail
to make given size files") and its squash-to patch (Squash to "selftests:
mptcp: reuse linkfail to make given size files v8") need to be moved into
this series, just before the commit ("selftests: mptcp: add fastclose
testcases").

The order of all the mp_fastclose and mp_fail testcases patches in my
tree looks like this:

pick a854ead2766e mptcp: add the mibs for MP_FASTCLOSE
pick 57f50b740bdc selftests: mptcp: add the MP_FASTCLOSE mibs check
pick 12ae36a6ccc1 mptcp: add the mibs for MP_RST
pick fc3da2c8bcbc selftests: mptcp: add the MP_RST mibs check
pick 963f2f26574e Squash to "selftests: mptcp: add the MP_RST mibs check v3"
pick 46680be81472 selftests: mptcp: add extra_args in do_transfer
pick 81803638389d selftests: mptcp: reuse linkfail to make given size files
pick fe9ed20f6bdc Squash to "selftests: mptcp: reuse linkfail to make given size files v8"
pick 24ba919394f9 selftests: mptcp: add fastclose testcases
pick fb989057969a Squash to "selftests: mptcp: add fastclose testcases"
pick 9985ed286b3a Squash to "mptcp: infinite mapping receiving"
pick 0d5bc6ecc54d Squash to "selftests: mptcp: add infinite map mibs check"
pick 2ed9ce9e914b selftests: mptcp: add more arguments for chk_join_nr
pick 82435d67b9e8 Squash to "selftests: mptcp: add more arguments for chk_join_nr v8"
pick bcc0e73c5acb selftests: mptcp: add the MP_FAIL testcases

If it's better to resend the whole series, please let me know.

3. Please update the subject:

'''
selftests: mptcp: add fastclose testcase
'''

And update the commit log:

'''
This patch added the self test for MP_FASTCLOSE. Reused the argment
addr_nr_ns2 of do_transfer() to pass the extra argments '-I 2' to
mptcp_connect commands. Then mptcp_connect disconnected the
connections to trigger the MP_FASTCLOSE sending and receiving. Used
chk_fclose_nr to check the MP_FASTCLOSE mibs and used chk_rst_nr to
check the MP_RST mibs. This test used the test_linkfail value to make
1024KB test files.

The output looks like this:

Created /tmp/tmp.XB8sfv1hJ0 (size 1024 KB) containing data sent by client
Created /tmp/tmp.RtTDbzqrXI (size 1024 KB) containing data sent by server
001 fastclose test                syn[ ok ] - synack[ ok ] - ack[ ok ]
                                  ctx[ ok ] - fclzrx[ ok ]
                                  rtx[ ok ] - rstrx [ ok ]   invert
'''

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

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 2e95a8d321ab..1ef0119d7b7a 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2289,16 +2289,10 @@ userspace_tests()
 fastclose_tests()
 {
 	reset
-	run_tests $ns1 $ns2 10.0.1.1 0 0 fastclose_2
-	chk_join_nr "fastclose test 1" 0 0 0
+	run_tests $ns1 $ns2 10.0.1.1 1024 0 fastclose_2
+	chk_join_nr "fastclose test" 0 0 0
 	chk_fclose_nr 1 1
 	chk_rst_nr 1 1 invert
-
-	reset
-	run_tests $ns1 $ns2 10.0.1.1 0 0 fastclose_3 slow
-	chk_join_nr "fastclose test 2" 0 0 0
-	chk_fclose_nr 2 2
-	chk_rst_nr 2 2 invert
 }
 
 all_tests()
-- 
2.34.1


Re: [PATCH mptcp-next] Squash to "selftests: mptcp: add fastclose testcases"
Posted by Mat Martineau 2 years, 1 month ago
On Fri, 18 Feb 2022, Geliang Tang wrote:

> This patch makes the fastclose testcase more stable. I had tested it
> over 10,000 times, no failures occurred.
>

It seems mostly stable to me too.

The first time I tried "./mptcp_join.sh -zC" I got a failure! I have not 
been able to reproduce it.

The output:

001 fastclose test                       syn[ ok ] - synack[ ok ] - ack[ ok ]
                                          sum[ ok ] - csum  [ ok ]
                                          ftx[ ok ] - failrx[ ok ]
                                          rtx[ ok ] - rstrx [ ok ]
                                          itx[ ok ] - infirx[ ok ]
                                          ctx[ ok ] - fclzrx[fail] got 0 MP_FASTCLOSE[s] RX expected 1
Server ns stats
TcpPassiveOpens                 2                  0.0
TcpInSegs                       361                0.0
TcpOutSegs                      917                0.0
TcpExtTW                        1                  0.0
TcpExtTCPPureAcks               130                0.0
TcpExtTCPBacklogCoalesce        4                  0.0
TcpExtTCPOrigDataSent           786                0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       26                 0.0
TcpExtTCPDelivered              785                0.0
MPTcpExtMPCapableSYNRX          2                  0.0
MPTcpExtMPCapableACKRX          2                  0.0
Client ns stats
TcpActiveOpens                  2                  0.0
TcpEstabResets                  1                  0.0
TcpInSegs                       344                0.0
TcpOutSegs                      926                0.0
TcpOutRsts                      2                  0.0
TcpExtTCPPureAcks               122                0.0
TcpExtTCPBacklogCoalesce        7                  0.0
TcpExtTCPOrigDataSent           788                0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       27                 0.0
TcpExtTCPDelivered              790                0.0
MPTcpExtMPCapableSYNTX          2                  0.0
MPTcpExtMPCapableSYNACKRX       2                  0.0
MPTcpExtMPFastcloseTx           1                  0.0
MPTcpExtMPRstTx                 1                  0.0
                                          rtx[ ok ] - rstrx [fail] got 0 MP_RST[s] RX expected 1
Server ns stats
TcpPassiveOpens                 2                  0.0
TcpInSegs                       361                0.0
TcpOutSegs                      917                0.0
TcpExtTW                        1                  0.0
TcpExtTCPPureAcks               130                0.0
TcpExtTCPBacklogCoalesce        4                  0.0
TcpExtTCPOrigDataSent           786                0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       26                 0.0
TcpExtTCPDelivered              785                0.0
MPTcpExtMPCapableSYNRX          2                  0.0
MPTcpExtMPCapableACKRX          2                  0.0
Client ns stats
TcpActiveOpens                  2                  0.0
TcpEstabResets                  1                  0.0
TcpInSegs                       344                0.0
TcpOutSegs                      926                0.0
TcpOutRsts                      2                  0.0
TcpExtTCPPureAcks               122                0.0
TcpExtTCPBacklogCoalesce        7                  0.0
TcpExtTCPOrigDataSent           788                0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       27                 0.0
TcpExtTCPDelivered              790                0.0
MPTcpExtMPCapableSYNTX          2                  0.0
MPTcpExtMPCapableSYNACKRX       2                  0.0
MPTcpExtMPFastcloseTx           1                  0.0
MPTcpExtMPRstTx                 1                  0.0
    invert

Given that I can't repro, I'm still ok with squashing this.

> 1. Drop "fastclose test 2". The two tests are somewhat repetitive, and
> test 2 is more likely to fail than test 1.

Ok. It didn't seem to add much coverage, I agree.

>
> And patch 7 in this series ("selftests: mptcp: fastclose check in
> mptcp_connect") should be dropped too. It may break mptcp_connect.sh.
>

I marked it as "Rejected" in patchwork.

> 2. Use the test_linkfail value to make 1024KB test files. So patch 4
> in the "add mp_fail testcases" series ("selftests: mptcp: reuse linkfail
> to make given size files") and its squash-to patch (Squash to "selftests:
> mptcp: reuse linkfail to make given size files v8") need to be moved into
> this series, just before the commit ("selftests: mptcp: add fastclose
> testcases").
>
> The order of all the mp_fastclose and mp_fail testcases patches in my
> tree looks like this:
>
> pick a854ead2766e mptcp: add the mibs for MP_FASTCLOSE
> pick 57f50b740bdc selftests: mptcp: add the MP_FASTCLOSE mibs check
> pick 12ae36a6ccc1 mptcp: add the mibs for MP_RST
> pick fc3da2c8bcbc selftests: mptcp: add the MP_RST mibs check
> pick 963f2f26574e Squash to "selftests: mptcp: add the MP_RST mibs check v3"
> pick 46680be81472 selftests: mptcp: add extra_args in do_transfer
> pick 81803638389d selftests: mptcp: reuse linkfail to make given size files
> pick fe9ed20f6bdc Squash to "selftests: mptcp: reuse linkfail to make given size files v8"
> pick 24ba919394f9 selftests: mptcp: add fastclose testcases
> pick fb989057969a Squash to "selftests: mptcp: add fastclose testcases"
> pick 9985ed286b3a Squash to "mptcp: infinite mapping receiving"
> pick 0d5bc6ecc54d Squash to "selftests: mptcp: add infinite map mibs check"
> pick 2ed9ce9e914b selftests: mptcp: add more arguments for chk_join_nr
> pick 82435d67b9e8 Squash to "selftests: mptcp: add more arguments for chk_join_nr v8"
> pick bcc0e73c5acb selftests: mptcp: add the MP_FAIL testcases
>
> If it's better to resend the whole series, please let me know.
>

Everything applied ok for me without conflicts. Matthieu would you prefer 
a resend?


-Mat


> 3. Please update the subject:
>
> '''
> selftests: mptcp: add fastclose testcase
> '''
>
> And update the commit log:
>
> '''
> This patch added the self test for MP_FASTCLOSE. Reused the argment
> addr_nr_ns2 of do_transfer() to pass the extra argments '-I 2' to
> mptcp_connect commands. Then mptcp_connect disconnected the
> connections to trigger the MP_FASTCLOSE sending and receiving. Used
> chk_fclose_nr to check the MP_FASTCLOSE mibs and used chk_rst_nr to
> check the MP_RST mibs. This test used the test_linkfail value to make
> 1024KB test files.
>
> The output looks like this:
>
> Created /tmp/tmp.XB8sfv1hJ0 (size 1024 KB) containing data sent by client
> Created /tmp/tmp.RtTDbzqrXI (size 1024 KB) containing data sent by server
> 001 fastclose test                syn[ ok ] - synack[ ok ] - ack[ ok ]
>                                  ctx[ ok ] - fclzrx[ ok ]
>                                  rtx[ ok ] - rstrx [ ok ]   invert
> '''
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 2e95a8d321ab..1ef0119d7b7a 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -2289,16 +2289,10 @@ userspace_tests()
> fastclose_tests()
> {
> 	reset
> -	run_tests $ns1 $ns2 10.0.1.1 0 0 fastclose_2
> -	chk_join_nr "fastclose test 1" 0 0 0
> +	run_tests $ns1 $ns2 10.0.1.1 1024 0 fastclose_2
> +	chk_join_nr "fastclose test" 0 0 0
> 	chk_fclose_nr 1 1
> 	chk_rst_nr 1 1 invert
> -
> -	reset
> -	run_tests $ns1 $ns2 10.0.1.1 0 0 fastclose_3 slow
> -	chk_join_nr "fastclose test 2" 0 0 0
> -	chk_fclose_nr 2 2
> -	chk_rst_nr 2 2 invert
> }
>
> all_tests()
> -- 
> 2.34.1
>
>
>

--
Mat Martineau
Intel

Re: [PATCH mptcp-next] Squash to "selftests: mptcp: add fastclose testcases"
Posted by Matthieu Baerts 2 years, 1 month ago
Hi Mat, Geliang,

On 19/02/2022 01:00, Mat Martineau wrote:
> On Fri, 18 Feb 2022, Geliang Tang wrote:
>> 2. Use the test_linkfail value to make 1024KB test files. So patch 4
>> in the "add mp_fail testcases" series ("selftests: mptcp: reuse linkfail
>> to make given size files") and its squash-to patch (Squash to "selftests:
>> mptcp: reuse linkfail to make given size files v8") need to be moved into
>> this series, just before the commit ("selftests: mptcp: add fastclose
>> testcases").
>>
>> The order of all the mp_fastclose and mp_fail testcases patches in my
>> tree looks like this:
>>
>> pick a854ead2766e mptcp: add the mibs for MP_FASTCLOSE
>> pick 57f50b740bdc selftests: mptcp: add the MP_FASTCLOSE mibs check
>> pick 12ae36a6ccc1 mptcp: add the mibs for MP_RST
>> pick fc3da2c8bcbc selftests: mptcp: add the MP_RST mibs check
>> pick 963f2f26574e Squash to "selftests: mptcp: add the MP_RST mibs
>> check v3"
>> pick 46680be81472 selftests: mptcp: add extra_args in do_transfer
>> pick 81803638389d selftests: mptcp: reuse linkfail to make given size
>> files
>> pick fe9ed20f6bdc Squash to "selftests: mptcp: reuse linkfail to make
>> given size files v8"
>> pick 24ba919394f9 selftests: mptcp: add fastclose testcases
>> pick fb989057969a Squash to "selftests: mptcp: add fastclose testcases"
>> pick 9985ed286b3a Squash to "mptcp: infinite mapping receiving"
>> pick 0d5bc6ecc54d Squash to "selftests: mptcp: add infinite map mibs
>> check"
>> pick 2ed9ce9e914b selftests: mptcp: add more arguments for chk_join_nr
>> pick 82435d67b9e8 Squash to "selftests: mptcp: add more arguments for
>> chk_join_nr v8"
>> pick bcc0e73c5acb selftests: mptcp: add the MP_FAIL testcases
>>
>> If it's better to resend the whole series, please let me know.
>>
> 
> Everything applied ok for me without conflicts. Matthieu would you
> prefer a resend?
If you don't mind, I'm going to apply Paolo's patches first and run
mptcp_join.sh selftests in a loop during the WE before adding more patches.

Regarding these patches, it should be fine, good there is this list :)

@Geliang: on the other hand, if it is easy for you squash all Squash-to
patches, rebase on top of the latest export branch and send all these
patches Mat reviewed in one big series, it might help me! Especially if
commit messages need to be updated :)

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