On Sat, 22 Jan 2022, Geliang Tang wrote:
> This patch added the setting flags test cases, using both addr-based and
> id-based lookups for the setting address.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/net/mptcp/pm_netlink.sh | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> index cbacf9f6538b..55df8b4e33fa 100755
> --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh
> +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> @@ -164,4 +164,14 @@ id 253 flags 10.0.0.5
> id 254 flags 10.0.0.2
> id 255 flags 10.0.0.3" "wrap-around ids"
>
> +ip netns exec $ns1 ./pm_nl_ctl flush
> +ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.1 flags subflow
> +ip netns exec $ns1 ./pm_nl_ctl set 10.0.1.1 flags backup
> +ip netns exec $ns1 ./pm_nl_ctl set 10.0.1.1 flags nobackup
> +ip netns exec $ns1 ./pm_nl_ctl set id 1 flags fullmesh
> +ip netns exec $ns1 ./pm_nl_ctl set id 1 flags nofullmesh
> +ip netns exec $ns1 ./pm_nl_ctl set id 1 flags backup,fullmesh
> +check "ip netns exec $ns1 ./pm_nl_ctl dump" "id 1 flags \
> +subflow,backup,fullmesh 10.0.1.1" "set flags"
> +
I think it would be worth it to check more of the intermediate states with
"pm_nl_ctl dump", not just after the last command. The first four 'set'
commands could have been broken and that wouldn't be detected.
--
Mat Martineau
Intel