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

Petr Vorel pvorel@suse.cz
Tue Sep 3 11:49:58 CEST 2024


Hi Wei,

> In sle-micro we encounter following error when do modprobe:
> root# modprobe mpls_router
> modprobe: ERROR: module 'mpls_router' is unsupported
> modprobe: ERROR: Use --allow-unsupported or set allow_unsupported_modules 1 in
> modprobe: ERROR: /etc/modprobe.d/10-unsupported-modules.conf
> modprobe: ERROR: could not insert 'mpls_router': Operation not permitted

This is needed in other mpls tests (mpls0[2-4].sh, it needs to be in mpls_lib.sh
to be reused.

Kind regards,
Petr

> 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
> +		ROD modprobe --allow-unsupported mpls_router
> +	else
> +		ROD modprobe mpls_router
> +	fi
>  }

>  test1()


More information about the ltp mailing list