Skip to contentSkip to conversation

split MP_FAIL testcases

PATCH In review Geliang Tang 4 participants 6 messages Apr 1, 2022 – Apr 2, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover split MP_FAIL testcases

Split MP_FAIL testcases into two patches:

selftests: mptcp: add infinite map testcase
selftests: mptcp: add MP_FAIL reset testcase

The former can be upstreaming with the infinite map series, the latter stays on the export branch, waiting for the dropping bad data patches, and the fix for issue #265.

Geliang Tang (2):
Squash to "selftests: mptcp: add the MP_FAIL testcases"
selftests: mptcp: add MP_FAIL reset testcase

 tools/testing/selftests/net/mptcp/mptcp_join.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 Squash to "selftests: mptcp: add the MP_FAIL testcases"

Drop the multiple subflows testcase, make this patch for the infinite mapping only. Split the multiple subflows testcase into a new patch.

Please update the subject and commit log:

'''
selftests: mptcp: add infinite map testcase

Add the single subflow test case for MP_FAIL, to test the infinite mapping case. Use the test_linkfail value to make 128KB test files.

Add a new function reset_with_fail(), in it use 'iptables' and 'tc action pedit' rules to produce the bit flips to trigger the checksum failures. Set validate_checksum to enable checksums for the MP_FAIL tests without passing the '-C' argument. Set check_invert flag to enable the invert bytes check for the output data in check_transfer(). Instead of the file mismatch error, this test prints out the inverted bytes.

Add a new function pedit_action_pkts() to get the numbers of the packets edited by the tc pedit actions. Print this numbers to the output.

Also add the needed kernel configures in the selftests config file. '''

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ----------
 1 file changed, 10 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +0 -10
index 375b087edc7b..c7a26c40663f 100755
@@ -2698,16 +2698,6 @@ pedit_action_pkts()
 
 fail_tests()
 {
-	# multiple subflows
-	if reset_with_fail "MP_FAIL MP_RST" 2; then
-		tc -n $ns2 qdisc add dev ns2eth1 root netem rate 20mbit delay 1
-		pm_nl_set_limits $ns1 0 1
-		pm_nl_set_limits $ns2 0 1
-		pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow
-		run_tests $ns1 $ns2 10.0.1.1 1024
-		chk_join_nr 1 1 1 +1 +0 1 1 0 "$(pedit_action_pkts)"
-	fi
-
 	# single subflow
 	if reset_with_fail "Infinite map" 1; then
 		run_tests $ns1 $ns2 10.0.1.1 128
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 selftests: mptcp: add MP_FAIL reset testcase

In reply to Geliang Tang

Add the multiple subflows test case for MP_FAIL, to test the MP_FAIL reset case. Use the test_linkfail value to make 1024KB test files.

Invoke reset_with_fail() to use 'iptables' and 'tc action pedit' rules to produce the bit flips to trigger the checksum failures on ns2eth2. Add delays on ns2eth1 to make sure more data can translate on ns2eth2.

The check_invert flag is enabled in reset_with_fail(), so this test prints out the inverted bytes, instead of the file mismatch errors.

Invoke pedit_action_pkts() to get the numbers of the packets edited by the tc pedit actions, and print this numbers to the output.

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +10 -0
index c7a26c40663f..14fd24459a5d 100755
@@ -2704,6 +2704,16 @@ fail_tests()
 		chk_join_nr 0 0 0 +1 +0 1 0 1 "$(pedit_action_pkts)"
 		chk_fail_nr 1 -1 invert
 	fi
+
+	# multiple subflows
+	if reset_with_fail "MP_FAIL MP_RST" 2; then
+		tc -n $ns2 qdisc add dev ns2eth1 root netem rate 20mbit delay 1
+		pm_nl_set_limits $ns1 0 1
+		pm_nl_set_limits $ns2 0 1
+		pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow
+		run_tests $ns1 $ns2 10.0.1.1 1024
+		chk_join_nr 1 1 1 +1 +0 1 1 0 "$(pedit_action_pkts)"
+	fi
 }
 
 userspace_tests()
Signature · 1 line
2.34.1
#3 lore raw

Re: selftests: mptcp: add MP_FAIL reset testcase: Tests Results

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
- Unstable: 1 failed test(s): selftest_simult_flows 🔴:
- Task: https://cirrus-ci.com/task/6121269912403968
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6121269912403968/summary/summary.txt

- KVM Validation: debug:
- Unstable: 2 failed test(s): selftest_diag selftest_mptcp_join 🔴:
- Task: https://cirrus-ci.com/task/5839794935693312
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5839794935693312/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/729b24964314

Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

Reviewed-by on the v1 series
#4 lore raw
In reply to Geliang Tang
Quoted 9 lines · Geliang Tang

Split MP_FAIL testcases into two patches:

selftests: mptcp: add infinite map testcase
selftests: mptcp: add MP_FAIL reset testcase

The former can be upstreaming with the infinite map series, the latter stays on the export branch, waiting for the dropping bad data patches, and the fix for issue #265.

Quoted 9 lines

Geliang Tang (2):
Squash to "selftests: mptcp: add the MP_FAIL testcases"
selftests: mptcp: add MP_FAIL reset testcase

tools/testing/selftests/net/mptcp/mptcp_join.sh | 14 +++++++-------

1 file changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1

Fine with me to split the commit, thanks Geliang.

--
Mat Martineau
Intel

#5 lore raw
In reply to Geliang Tang

Hi Geliang, Mat,

Quoted 8 lines · Geliang Tang

Split MP_FAIL testcases into two patches:

selftests: mptcp: add infinite map testcase
selftests: mptcp: add MP_FAIL reset testcase

The former can be upstreaming with the infinite map series, the latter stays on the export branch, waiting for the dropping bad data patches, and the fix for issue #265.

Thank you for the patches and the reviews!

Now in our tree (feat. for net-next-next):

New patches for t/upstream:
- 0da1606b57c1: "squashed" patch 1/2 in "selftests: mptcp: add the MP_FAIL testcases"
- d703a6233117: tg:msg: update requested by Geliang
- Results: c56ab3a9d998..aba96189ad1a (export)

- 4c7ac3a904ee: selftests: mptcp: add MP_FAIL reset testcase
- Results: aba96189ad1a..463bac3cb3eb (export)

Builds and tests are now in progress:

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

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net