Skip to contentSkip to conversation

add mp_fail testcases

PATCH Superseded Geliang Tang 1 participant 3 messages Feb 9, 2022

Subsystems (3)

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v3 cover add mp_fail testcases

v3:
- check the exit code of iptables.
- add ip6tables support for reset_with_fail too.
- add the null check for $packets
- rename nr_mp_fail to pedit_action and get_nr_mp_fail to
pedit_action_happened

This is v12 of the mp_fail testcases with Matt's changes. It works well and it's very stable.

Geliang Tang (2):
Squash to "mptcp: infinite mapping receiving"
selftests: mptcp: add mp_fail testcases

 net/mptcp/subflow.c                           |   1 +
 tools/testing/selftests/net/mptcp/config      |   8 +
 .../testing/selftests/net/mptcp/mptcp_join.sh | 154 ++++++++++++++++--
 3 files changed, 149 insertions(+), 14 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/2 Squash to "mptcp: infinite mapping receiving"

Print out the infinite map received info.

---
 net/mptcp/subflow.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/subflow.c +1 -0
index 485f00dcaf84..ae4d855f3c2f 100644
@@ -962,6 +962,7 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
 
 	data_len = mpext->data_len;
 	if (data_len == 0) {
+		pr_debug("infinite mapping received");
 		MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPRX);
 		subflow->map_data_len = 0;
 		return MAPPING_INVALID;
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/2 selftests: mptcp: add mp_fail testcases

In reply to Geliang Tang

Added the test cases for MP_FAIL, the multiple subflows test for the MP_RST case and the single subflow one for the infinite mapping case.

Added a new function reset_with_fail(), in it use 'iptables' and 'tc action pedit' commands to trigger the checksum failures.

Added a new global variable pedit_action to trace whether the tc pedit action happened during the test. Check and set it in the new function pedit_action_happened(). Show it in the test description and pass it to chk_join_nr() to check the numbers of the checksum failures, MP_FAIL sending and receiving, the infinite mapping sending and receiving.

Added a new global variable validate_checksum to enable checksums for the MP_FAIL tests without passing the '-C' argument.

Also added the tests needed kernel configures in the config file.

---
 tools/testing/selftests/net/mptcp/config      |   8 +
 .../testing/selftests/net/mptcp/mptcp_join.sh | 154 ++++++++++++++++--
 2 files changed, 148 insertions(+), 14 deletions(-)
tools/testing/selftests/net/mptcp/config +8 -0
index d36b7da5082a..38021a0dd527 100644
@@ -12,6 +12,9 @@ CONFIG_NF_TABLES=m
 CONFIG_NFT_COMPAT=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_MATCH_BPF=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NF_TABLES_INET=y
 CONFIG_NFT_TPROXY=m
 CONFIG_NFT_SOCKET=m
@@ -19,3 +22,8 @@ CONFIG_IP_ADVANCED_ROUTER=y
 CONFIG_IP_MULTIPLE_TABLES=y
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_NET_ACT_CSUM=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_SCH_INGRESS=m
tools/testing/selftests/net/mptcp/mptcp_join.sh +140 -14

280 lines not on this page · raw message

Signature · 1 line
2.34.1