On Tue, 25 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.
>
Thanks for adding the checks!
> The output looks like this:
> set flags [ OK ]
> [ OK ]
> [ OK ]
> [ OK ]
> [ OK ]
One more small thing to ask: These empty lines could make it harder to see
what failed, especially in reports from CI that might not show the full
output of the script.
How about:
set flags (backup) [ OK ]
set flags (nobackup) [ OK ]
set flags (fullmesh) [ OK ]
set flags (nofullmesh) [ OK ]
set flags (backup,fullmesh) [ OK ]
?
-Mat
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> .../testing/selftests/net/mptcp/pm_netlink.sh | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> index cbacf9f6538b..ae735a380123 100755
> --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh
> +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> @@ -164,4 +164,22 @@ 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
> +check "ip netns exec $ns1 ./pm_nl_ctl dump" "id 1 flags \
> +subflow,backup 10.0.1.1" "set flags"
> +ip netns exec $ns1 ./pm_nl_ctl set 10.0.1.1 flags nobackup
> +check "ip netns exec $ns1 ./pm_nl_ctl dump" "id 1 flags \
> +subflow 10.0.1.1" ""
> +ip netns exec $ns1 ./pm_nl_ctl set id 1 flags fullmesh
> +check "ip netns exec $ns1 ./pm_nl_ctl dump" "id 1 flags \
> +subflow,fullmesh 10.0.1.1" ""
> +ip netns exec $ns1 ./pm_nl_ctl set id 1 flags nofullmesh
> +check "ip netns exec $ns1 ./pm_nl_ctl dump" "id 1 flags \
> +subflow 10.0.1.1" ""
> +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" ""
> +
> exit $ret
> --
> 2.31.1
>
>
>
--
Mat Martineau
Intel