diff mbox series

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

Message ID 192d32dcf9dc61f93efb4d31c46a4a509f3a9f0f.1621332213.git.geliangtang@gmail.com (mailing list archive)
State Superseded, archived
Delegated to: Mat Martineau
Headers show
Series [mptcp-next] Squash to "selftests: mptcp: add deny_join_id0 testcases" | expand

Commit Message

Geliang Tang May 18, 2021, 10:05 a.m. UTC
Update the testcases.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 .../testing/selftests/net/mptcp/mptcp_join.sh | 35 ++++++++++++++-----
 1 file changed, 26 insertions(+), 9 deletions(-)

Comments

Mat Martineau May 20, 2021, 10:59 p.m. UTC | #1
On Tue, 18 May 2021, Geliang Tang wrote:

> Update the testcases.
>

Since there are now other changes to v6, please include the selftest 
updates in v7 of the 'c' bit patchset. Thanks.

Mat


> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> .../testing/selftests/net/mptcp/mptcp_join.sh | 35 ++++++++++++++-----
> 1 file changed, 26 insertions(+), 9 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 17b385f011d2..fe46d666b18c 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -1491,24 +1491,41 @@ deny_join_id0_tests()
> 	run_tests $ns1 $ns2 10.0.1.1
> 	chk_join_nr "single subflow allow join id0 ns2" 0 0 0
>
> -	# subflow and address allow join id0
> +	# signal address allow join id0 ns1
> +	reset_with_allow_join_id0 1 0
> +	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
> +	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> +	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
> +	run_tests $ns1 $ns2 10.0.1.1
> +	chk_join_nr "signal address allow join id0 ns1" 1 1 0
> +	chk_add_nr 1 1
> +
> +	# signal address allow join id0 ns2
> +	reset_with_allow_join_id0 0 1
> +	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
> +	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> +	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
> +	run_tests $ns1 $ns2 10.0.1.1
> +	chk_join_nr "signal address allow join id0 ns2" 1 1 1
> +	chk_add_nr 1 1
> +
> +	# subflow and address allow join id0 ns1
> 	reset_with_allow_join_id0 0 1
> 	ip netns exec $ns1 ./pm_nl_ctl limits 2 2
> 	ip netns exec $ns2 ./pm_nl_ctl limits 2 2
> 	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
> 	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
> 	run_tests $ns1 $ns2 10.0.1.1
> -	chk_join_nr "subflow and address allow join id0" 2 2 2
> +	chk_join_nr "subflow and address allow join id0 1" 2 2 2
>
> -	# signal address allow join id0
> -	# ADD_ADDRs are not affected by allow_join_id0 value.
> -	reset_with_allow_join_id0 0 0
> -	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
> -	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> +	# subflow and address allow join id0 ns2
> +	reset_with_allow_join_id0 1 0
> +	ip netns exec $ns1 ./pm_nl_ctl limits 2 2
> +	ip netns exec $ns2 ./pm_nl_ctl limits 2 2
> 	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
> +	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
> 	run_tests $ns1 $ns2 10.0.1.1
> -	chk_join_nr "signal address allow join id0" 1 1 1
> -	chk_add_nr 1 1
> +	chk_join_nr "subflow and address allow join id0 2" 2 2 1
> }
>
> all_tests()
>

--
Mat Martineau
Intel
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 17b385f011d2..fe46d666b18c 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -1491,24 +1491,41 @@  deny_join_id0_tests()
 	run_tests $ns1 $ns2 10.0.1.1
 	chk_join_nr "single subflow allow join id0 ns2" 0 0 0
 
-	# subflow and address allow join id0
+	# signal address allow join id0 ns1
+	reset_with_allow_join_id0 1 0
+	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
+	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
+	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
+	run_tests $ns1 $ns2 10.0.1.1
+	chk_join_nr "signal address allow join id0 ns1" 1 1 0
+	chk_add_nr 1 1
+
+	# signal address allow join id0 ns2
+	reset_with_allow_join_id0 0 1
+	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
+	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
+	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
+	run_tests $ns1 $ns2 10.0.1.1
+	chk_join_nr "signal address allow join id0 ns2" 1 1 1
+	chk_add_nr 1 1
+
+	# subflow and address allow join id0 ns1
 	reset_with_allow_join_id0 0 1
 	ip netns exec $ns1 ./pm_nl_ctl limits 2 2
 	ip netns exec $ns2 ./pm_nl_ctl limits 2 2
 	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
 	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
 	run_tests $ns1 $ns2 10.0.1.1
-	chk_join_nr "subflow and address allow join id0" 2 2 2
+	chk_join_nr "subflow and address allow join id0 1" 2 2 2
 
-	# signal address allow join id0
-	# ADD_ADDRs are not affected by allow_join_id0 value.
-	reset_with_allow_join_id0 0 0
-	ip netns exec $ns1 ./pm_nl_ctl limits 1 1
-	ip netns exec $ns2 ./pm_nl_ctl limits 1 1
+	# subflow and address allow join id0 ns2
+	reset_with_allow_join_id0 1 0
+	ip netns exec $ns1 ./pm_nl_ctl limits 2 2
+	ip netns exec $ns2 ./pm_nl_ctl limits 2 2
 	ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
+	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
 	run_tests $ns1 $ns2 10.0.1.1
-	chk_join_nr "signal address allow join id0" 1 1 1
-	chk_add_nr 1 1
+	chk_join_nr "subflow and address allow join id0 2" 2 2 1
 }
 
 all_tests()