On Sat, 30 Dec 2023, Geliang Tang wrote:
> Now both a v4 address and a v4-mapped address are supported when
> destroying a userspace pm subflow, this patch adds random tests for both
> addresses.
>
> Signed-off-by: Geliang Tang <geliang.tang@linux.dev>
Hi Geliang,
The changes look good. I'm marking this as "Changes Required" in patchwork
since it depends on patch 5 (which only needs some commit message
updates). Would be good to have a Fixes tag if this is going to -net too.
- Mat
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 3a5b63026191..915ec79f5030 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -3340,12 +3340,13 @@ userspace_pm_rm_sf()
> {
> local evts=$evts_ns1
> local t=${3:-1}
> - local ip=4
> + local ip
> local tk da dp sp
> local cnt
>
> [ "$1" == "$ns2" ] && evts=$evts_ns2
> - if mptcp_lib_is_v6 $2; then ip=6; fi
> + [ -n "$(mptcp_lib_evts_get_info "saddr4" "$evts" $t)" ] && ip=4
> + [ -n "$(mptcp_lib_evts_get_info "saddr6" "$evts" $t)" ] && ip=6
> tk=$(mptcp_lib_evts_get_info token "$evts")
> da=$(mptcp_lib_evts_get_info "daddr$ip" "$evts" $t)
> dp=$(mptcp_lib_evts_get_info dport "$evts" $t)
> @@ -3448,7 +3449,11 @@ userspace_tests()
> chk_subflows_total 2 2
> chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
> userspace_pm_rm_addr $ns1 10
> - userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED
> + if [ $((RANDOM%2)) -eq 0 ]; then
> + userspace_pm_rm_sf $ns1 ::ffff:10.0.2.1 $SUB_ESTABLISHED
> + else
> + userspace_pm_rm_sf $ns1 10.0.2.1 $SUB_ESTABLISHED
> + fi
> chk_rm_nr 1 1 invert
> chk_mptcp_info subflows 0 subflows 0
> chk_subflows_total 1 1
> --
> 2.39.2
>
>
>