selftests: mptcp: add fastclose testcase
authorGeliang Tang <geliang.tang@suse.com>
Fri, 4 Mar 2022 19:36:33 +0000 (11:36 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Mar 2022 05:54:31 +0000 (21:54 -0800)
commit01542c9bf9ab04493e027f55b5e0d5fdfdc1780f
treec9ebd3619ac874539d98a303dc59658e2ca6da04
parent34b572b76fecbcc4f209f87269a07ccb9872f6f2
selftests: mptcp: add fastclose testcase

This patch added the self test for MP_FASTCLOSE. Reused the argument
addr_nr_ns2 of do_transfer() to pass the extra arguments '-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>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh