[LTP] [PATCH v3] mpls01.sh: Add --allow-unsupported for modprobe

Cyril Hrubis chrubis@suse.cz
Tue Sep 3 12:16:06 CEST 2024


Hi!
> Signed-off-by: Wei Gao <wegao@suse.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/network/mpls/mpls01.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
> index 196b5b2f9..892b5bd85 100755
> --- a/testcases/network/mpls/mpls01.sh
> +++ b/testcases/network/mpls/mpls01.sh
> @@ -21,7 +21,11 @@ cleanup()
>  
>  setup()
>  {
> -	ROD modprobe mpls_router
> +	if grep -q 'sl-micro' /etc/os-release; then

I do not like how specific is this check. The --allow-unsupported should
be at best no-op for SLE and openSUSE, right? So I would go for the
check of ID=suse rather than specifying just single variant.

> +		ROD modprobe --allow-unsupported mpls_router
> +	else
> +		ROD modprobe mpls_router
> +	fi
>  }
>  
>  test1()
> -- 
> 2.35.3
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list