* [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe
@ 2024-08-30 9:57 Wei Gao via ltp
2024-08-30 10:38 ` Petr Vorel
2024-09-02 2:40 ` [LTP] [PATCH v2] " Wei Gao via ltp
0 siblings, 2 replies; 18+ messages in thread
From: Wei Gao via ltp @ 2024-08-30 9:57 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Wei Gao <wegao@suse.com>
---
testcases/network/mpls/mpls01.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
index 196b5b2f9..7f262d83e 100755
--- a/testcases/network/mpls/mpls01.sh
+++ b/testcases/network/mpls/mpls01.sh
@@ -21,7 +21,9 @@ cleanup()
setup()
{
- ROD modprobe mpls_router
+ if ! modprobe mpls_router > /dev/null 2>&1; then
+ ROD modprobe mpls_router --allow-unsupported
+ fi
}
test1()
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe
2024-08-30 9:57 [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe Wei Gao via ltp
@ 2024-08-30 10:38 ` Petr Vorel
2024-09-02 10:39 ` Cyril Hrubis
2024-09-02 2:40 ` [LTP] [PATCH v2] " Wei Gao via ltp
1 sibling, 1 reply; 18+ messages in thread
From: Petr Vorel @ 2024-08-30 10:38 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
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
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
> testcases/network/mpls/mpls01.sh | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
> index 196b5b2f9..7f262d83e 100755
> --- a/testcases/network/mpls/mpls01.sh
> +++ b/testcases/network/mpls/mpls01.sh
> @@ -21,7 +21,9 @@ cleanup()
> setup()
> {
> - ROD modprobe mpls_router
> + if ! modprobe mpls_router > /dev/null 2>&1; then
> + ROD modprobe mpls_router --allow-unsupported
I'm not sure with ROD. --allow-unsupported is SUSE specific modprobe extension,
which is used for SLES. It is also on Tumbleweed [1] [2] where does nothing.
If you try to run it with ROD, which quits testing on failure, all distros
except SUSE products/openSUSE (e.g. Debian, Fedora, ...) which don't have
mpls_router will TBROK in setup:
modprobe: unrecognised option '--allow-unsupported'.
And I'm not talking about these small distros which use busybox kmod
implementation, which would also fail.
Also you remove /dev/null 2>&1 from the first command, thus other distros would
not see error message about missing mpls_router module. Without looking into the
source the tester will be pretty confused.
I would do:
if grep -q suse /etc/os-release; then
ROD modprobe --allow-unsupported mpls_router
else
ROD modprobe mpls_router
fi
(nit: better to put the option before the module name.)
With this, you can put in the next version:
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> + fi
> }
> test1()
[1] https://build.opensuse.org/projects/Base:System/packages/kmod/files/0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch?expand=1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe
2024-08-30 10:38 ` Petr Vorel
@ 2024-09-02 10:39 ` Cyril Hrubis
2024-09-02 11:00 ` Petr Vorel
0 siblings, 1 reply; 18+ messages in thread
From: Cyril Hrubis @ 2024-09-02 10:39 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> I'm not sure with ROD. --allow-unsupported is SUSE specific modprobe extension,
> which is used for SLES. It is also on Tumbleweed [1] [2] where does nothing.
>
> If you try to run it with ROD, which quits testing on failure, all distros
> except SUSE products/openSUSE (e.g. Debian, Fedora, ...) which don't have
> mpls_router will TBROK in setup:
>
> modprobe: unrecognised option '--allow-unsupported'.
>
> And I'm not talking about these small distros which use busybox kmod
> implementation, which would also fail.
>
> Also you remove /dev/null 2>&1 from the first command, thus other distros would
> not see error message about missing mpls_router module. Without looking into the
> source the tester will be pretty confused.
>
> I would do:
>
> if grep -q suse /etc/os-release; then
There are a couple of english words that contain "suse" as a substring
if one of these ends up in the os-release it would match, e.g. the
os-release may contain VERSION="24 (Disused Miracle)". And yes both
Fedora and Ubuntu seems to include the the code names in the file.
So I would be stricter here and checked for ID=suse.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-02 10:39 ` Cyril Hrubis
@ 2024-09-02 11:00 ` Petr Vorel
0 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-09-02 11:00 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril, Wei,
> Hi!
> > if grep -q suse /etc/os-release; then
> There are a couple of english words that contain "suse" as a substring
> if one of these ends up in the os-release it would match, e.g. the
> os-release may contain VERSION="24 (Disused Miracle)". And yes both
> Fedora and Ubuntu seems to include the the code names in the file.
> So I would be stricter here and checked for ID=suse.
Very good point.
FYI SLES (removed non-related lines)
NAME="SLES"
VERSION="15-SP6"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP6"
ID="sles"
ID_LIKE="suse"
SLE Micro (removed non-related lines):
NAME="SL-Micro"
PRETTY_NAME="SUSE Linux Micro 6.0"
ID="sl-micro"
ID_LIKE="suse"
Debian:
NAME="Debian GNU/Linux"
ID=debian
=> SUSE quite all variables, but at least Debian not (ID=debian).
Therefore for more complex scenarios I would source the file
(. /etc/os-release). But in this case grep sl-micro could be enough
(unique enough).
Will you ack this change (RBT/ABT) in v2 [1] (newer version than this, I would
change before merge)?
- if grep -q suse /etc/os-release; then
+ if grep -q 'sl-micro' /etc/os-release; then
Kind regards,
Petr
[1] https://patchwork.ozlabs.org/project/ltp/patch/20240902024017.6404-1-wegao@suse.com/
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread
* [LTP] [PATCH v2] mpls01.sh: Add --allow-unsupported for modprobe
2024-08-30 9:57 [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe Wei Gao via ltp
2024-08-30 10:38 ` Petr Vorel
@ 2024-09-02 2:40 ` Wei Gao via ltp
2024-09-02 11:02 ` Petr Vorel
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
1 sibling, 2 replies; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-02 2:40 UTC (permalink / raw)
To: ltp
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
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..957f9d153 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 suse /etc/os-release; then
+ 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
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v2] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-02 2:40 ` [LTP] [PATCH v2] " Wei Gao via ltp
@ 2024-09-02 11:02 ` Petr Vorel
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
1 sibling, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-09-02 11:02 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
> 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
> 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..957f9d153 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 suse /etc/os-release; then
Cyril asked for more specific grep in v1
https://lore.kernel.org/ltp/ZtWV0R_oDb7BQdKm@yuki.lan/
My suggestion to change before merge:
https://lore.kernel.org/ltp/20240902110037.GD279460@pevik/
- if grep -q suse /etc/os-release; then
+ if grep -q 'sl-micro' /etc/os-release; then
Kind regards,
Petr
> + ROD modprobe --allow-unsupported mpls_router
> + else
> + ROD modprobe mpls_router
> + fi
> }
> test1()
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* [LTP] [PATCH v3] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-02 2:40 ` [LTP] [PATCH v2] " Wei Gao via ltp
2024-09-02 11:02 ` Petr Vorel
@ 2024-09-03 8:19 ` Wei Gao via ltp
2024-09-03 9:49 ` Petr Vorel
` (2 more replies)
1 sibling, 3 replies; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-03 8:19 UTC (permalink / raw)
To: ltp
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
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()
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v3] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
@ 2024-09-03 9:49 ` Petr Vorel
2024-09-03 10:16 ` Cyril Hrubis
2024-09-04 3:58 ` [LTP] [PATCH v4] " Wei Gao via ltp
2 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-09-03 9:49 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
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()
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v3] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
2024-09-03 9:49 ` Petr Vorel
@ 2024-09-03 10:16 ` Cyril Hrubis
2024-09-03 11:26 ` Petr Vorel
2024-09-04 3:58 ` [LTP] [PATCH v4] " Wei Gao via ltp
2 siblings, 1 reply; 18+ messages in thread
From: Cyril Hrubis @ 2024-09-03 10:16 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v3] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-03 10:16 ` Cyril Hrubis
@ 2024-09-03 11:26 ` Petr Vorel
0 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-09-03 11:26 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> 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?
Yes. I would personally avoid it (not needed so far), but sure it can work.
> So I would go for the
> check of ID=suse rather than specifying just single variant.
$ grep ^ID /etc/os-release # SLE Micro
ID="sl-micro"
ID_LIKE="suse"
$ grep ID_ /etc/os-release # Tumbleweed
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
$ grep ^ID /etc/os-release # SLES 15-SP6
ID="sles"
ID_LIKE="suse"
$ grep ^ID /etc/os-release # SLES 12-SP5 (still supported)
ID="sles"
If we dare to ignore SLE12-SP5 (and older), we could use:
=> grep -q -w ID_LIKE.*suse /etc/os-release
(Using -w to mitigate "suse" as part of longer word.)
There is another problem: mpls_setup() also tries to load modules
modprobe -a mpls_router mpls_iptunnel mpls_gso failed
on both lhost and rhost via:
tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
which is run on all mpls tests. And even mpls01.sh gets fixed,
the other 3 remaining tests fails due missing --allow-unsupported for other mpls
modules.
I guess we can expect both sides are the same distros, thus we could do
evaluation only on lhost. And, we could for simplicity run modprobe also on both
sides in mpls01.sh, thus putting it into function. This code could be in new
function and called in mpls_setup + in mpls01.sh:
local module
local args
grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
if [ "$TST_NEEDS_DRIVERS" ]; then
tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
fi
Wei, feel free to add it into new version. I can fix your grep in your version
and send a follow up patch. Whatever you prefer.
Kind regards,
Petr
> > + 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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread
* [LTP] [PATCH v4] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
2024-09-03 9:49 ` Petr Vorel
2024-09-03 10:16 ` Cyril Hrubis
@ 2024-09-04 3:58 ` Wei Gao via ltp
2024-09-04 4:47 ` Petr Vorel
2024-09-04 6:48 ` [LTP] [PATCH v5] " Wei Gao via ltp
2 siblings, 2 replies; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-04 3:58 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Wei Gao <wegao@suse.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/mpls/mpls01.sh | 4 ++--
testcases/network/mpls/mpls_lib.sh | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
index 196b5b2f9..e453f8130 100755
--- a/testcases/network/mpls/mpls01.sh
+++ b/testcases/network/mpls/mpls01.sh
@@ -21,7 +21,7 @@ cleanup()
setup()
{
- ROD modprobe mpls_router
+ mpls_setup_driver
}
test1()
@@ -66,5 +66,5 @@ test3()
tst_res TPASS "created and removed mpls routes"
}
-. tst_net.sh
+. mpls_lib.sh
tst_run
diff --git a/testcases/network/mpls/mpls_lib.sh b/testcases/network/mpls/mpls_lib.sh
index 380b568bb..2ded31ee9 100755
--- a/testcases/network/mpls/mpls_lib.sh
+++ b/testcases/network/mpls/mpls_lib.sh
@@ -33,6 +33,16 @@ mpls_virt_cleanup()
mpls_cleanup
}
+mpls_setup_driver()
+{
+ local args
+
+ grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
+ if [ "$TST_NEEDS_DRIVERS" ]; then
+ tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
+ fi
+}
+
mpls_setup()
{
local label="$1"
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v4] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-04 3:58 ` [LTP] [PATCH v4] " Wei Gao via ltp
@ 2024-09-04 4:47 ` Petr Vorel
2024-09-04 6:50 ` Wei Gao via ltp
2024-09-04 6:48 ` [LTP] [PATCH v5] " Wei Gao via ltp
1 sibling, 1 reply; 18+ messages in thread
From: Petr Vorel @ 2024-09-04 4:47 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
I suggest these changes:
1) use mpls_setup_driver also in mpls_setup()
- replace tst_net_run(). I don't understand why you did not do it in the
patchset (I suggested that), but I can replace it during merge.
2) update the commit message: s/mpls01.sh/mpls01/
(fixing all mpls tests)
With that:
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
+++ testcases/network/mpls/mpls_lib.sh
@@ -47,7 +47,7 @@ mpls_setup()
{
local label="$1"
- tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
+ mpls_setup_driver
ROD sysctl -q net.mpls.conf.$(tst_iface).input=1
tst_set_sysctl net.mpls.conf.lo.input 1 safe
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v4] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-04 4:47 ` Petr Vorel
@ 2024-09-04 6:50 ` Wei Gao via ltp
0 siblings, 0 replies; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-04 6:50 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Wed, Sep 04, 2024 at 06:47:10AM +0200, Petr Vorel wrote:
> Hi Wei,
>
> I suggest these changes:
>
> 1) use mpls_setup_driver also in mpls_setup()
> - replace tst_net_run(). I don't understand why you did not do it in the
> patchset (I suggested that), but I can replace it during merge.
Sorry i forget that, will sent another patch. Thanks for point that.
> 2) update the commit message: s/mpls01.sh/mpls01/
> (fixing all mpls tests)
>
> With that:
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr
>
> +++ testcases/network/mpls/mpls_lib.sh
> @@ -47,7 +47,7 @@ mpls_setup()
> {
> local label="$1"
>
> - tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
> + mpls_setup_driver
>
> ROD sysctl -q net.mpls.conf.$(tst_iface).input=1
> tst_set_sysctl net.mpls.conf.lo.input 1 safe
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread
* [LTP] [PATCH v5] mpls01.sh: Add --allow-unsupported for modprobe
2024-09-04 3:58 ` [LTP] [PATCH v4] " Wei Gao via ltp
2024-09-04 4:47 ` Petr Vorel
@ 2024-09-04 6:48 ` Wei Gao via ltp
2024-09-04 6:56 ` [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases) Wei Gao via ltp
1 sibling, 1 reply; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-04 6:48 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Wei Gao <wegao@suse.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/mpls/mpls01.sh | 4 ++--
testcases/network/mpls/mpls_lib.sh | 12 +++++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
index 196b5b2f9..e453f8130 100755
--- a/testcases/network/mpls/mpls01.sh
+++ b/testcases/network/mpls/mpls01.sh
@@ -21,7 +21,7 @@ cleanup()
setup()
{
- ROD modprobe mpls_router
+ mpls_setup_driver
}
test1()
@@ -66,5 +66,5 @@ test3()
tst_res TPASS "created and removed mpls routes"
}
-. tst_net.sh
+. mpls_lib.sh
tst_run
diff --git a/testcases/network/mpls/mpls_lib.sh b/testcases/network/mpls/mpls_lib.sh
index 380b568bb..3c63e16a7 100755
--- a/testcases/network/mpls/mpls_lib.sh
+++ b/testcases/network/mpls/mpls_lib.sh
@@ -33,11 +33,21 @@ mpls_virt_cleanup()
mpls_cleanup
}
+mpls_setup_driver()
+{
+ local args
+
+ grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
+ if [ "$TST_NEEDS_DRIVERS" ]; then
+ tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
+ fi
+}
+
mpls_setup()
{
local label="$1"
- tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
+ mpls_setup_driver
ROD sysctl -q net.mpls.conf.$(tst_iface).input=1
tst_set_sysctl net.mpls.conf.lo.input 1 safe
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 18+ messages in thread* [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases)
2024-09-04 6:48 ` [LTP] [PATCH v5] " Wei Gao via ltp
@ 2024-09-04 6:56 ` Wei Gao via ltp
2024-09-05 5:12 ` Petr Vorel
0 siblings, 1 reply; 18+ messages in thread
From: Wei Gao via ltp @ 2024-09-04 6:56 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Wei Gao <wegao@suse.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/mpls/mpls01.sh | 4 ++--
testcases/network/mpls/mpls_lib.sh | 12 +++++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh
index 196b5b2f9..e453f8130 100755
--- a/testcases/network/mpls/mpls01.sh
+++ b/testcases/network/mpls/mpls01.sh
@@ -21,7 +21,7 @@ cleanup()
setup()
{
- ROD modprobe mpls_router
+ mpls_setup_driver
}
test1()
@@ -66,5 +66,5 @@ test3()
tst_res TPASS "created and removed mpls routes"
}
-. tst_net.sh
+. mpls_lib.sh
tst_run
diff --git a/testcases/network/mpls/mpls_lib.sh b/testcases/network/mpls/mpls_lib.sh
index 380b568bb..3c63e16a7 100755
--- a/testcases/network/mpls/mpls_lib.sh
+++ b/testcases/network/mpls/mpls_lib.sh
@@ -33,11 +33,21 @@ mpls_virt_cleanup()
mpls_cleanup
}
+mpls_setup_driver()
+{
+ local args
+
+ grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
+ if [ "$TST_NEEDS_DRIVERS" ]; then
+ tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
+ fi
+}
+
mpls_setup()
{
local label="$1"
- tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
+ mpls_setup_driver
ROD sysctl -q net.mpls.conf.$(tst_iface).input=1
tst_set_sysctl net.mpls.conf.lo.input 1 safe
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases)
2024-09-04 6:56 ` [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases) Wei Gao via ltp
@ 2024-09-05 5:12 ` Petr Vorel
2024-09-05 8:47 ` Cyril Hrubis
0 siblings, 1 reply; 18+ messages in thread
From: Petr Vorel @ 2024-09-05 5:12 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
...
> +mpls_setup_driver()
> +{
> + local args
> +
> + grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
I'm going to merge in few hours with following change
- grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
+ grep -q -w ID_LIKE.*suse /etc/os-release && args='--allow-unsupported'
(to implement Cyril's wish to apply the change also for SLES and openSUSE. I'm
sorry although I suggested that in v4, then in the full example I in the end
used 'sl-micro'.
Kind regards,
Petr
> + if [ "$TST_NEEDS_DRIVERS" ]; then
> + tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
> + fi
> +}
> +
> mpls_setup()
> {
> local label="$1"
...
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases)
2024-09-05 5:12 ` Petr Vorel
@ 2024-09-05 8:47 ` Cyril Hrubis
2024-09-05 12:02 ` Petr Vorel
0 siblings, 1 reply; 18+ messages in thread
From: Cyril Hrubis @ 2024-09-05 8:47 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> > +mpls_setup_driver()
> > +{
> > + local args
> > +
> > + grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
>
> I'm going to merge in few hours with following change
>
> - grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
> + grep -q -w ID_LIKE.*suse /etc/os-release && args='--allow-unsupported'
>
> (to implement Cyril's wish to apply the change also for SLES and openSUSE. I'm
> sorry although I suggested that in v4, then in the full example I in the end
> used 'sl-micro'.
Works for me. Acked-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases)
2024-09-05 8:47 ` Cyril Hrubis
@ 2024-09-05 12:02 ` Petr Vorel
0 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-09-05 12:02 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> Hi!
> > > +mpls_setup_driver()
> > > +{
> > > + local args
> > > +
> > > + grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
> > I'm going to merge in few hours with following change
> > - grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
> > + grep -q -w ID_LIKE.*suse /etc/os-release && args='--allow-unsupported'
> > (to implement Cyril's wish to apply the change also for SLES and openSUSE. I'm
> > sorry although I suggested that in v4, then in the full example I in the end
> > used 'sl-micro'.
> Works for me. Acked-by: Cyril Hrubis <chrubis@suse.cz>
Thanks for your ack, merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2024-09-05 12:03 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 9:57 [LTP] [PATCH v1] mpls01.sh: Add --allow-unsupported for modprobe Wei Gao via ltp
2024-08-30 10:38 ` Petr Vorel
2024-09-02 10:39 ` Cyril Hrubis
2024-09-02 11:00 ` Petr Vorel
2024-09-02 2:40 ` [LTP] [PATCH v2] " Wei Gao via ltp
2024-09-02 11:02 ` Petr Vorel
2024-09-03 8:19 ` [LTP] [PATCH v3] " Wei Gao via ltp
2024-09-03 9:49 ` Petr Vorel
2024-09-03 10:16 ` Cyril Hrubis
2024-09-03 11:26 ` Petr Vorel
2024-09-04 3:58 ` [LTP] [PATCH v4] " Wei Gao via ltp
2024-09-04 4:47 ` Petr Vorel
2024-09-04 6:50 ` Wei Gao via ltp
2024-09-04 6:48 ` [LTP] [PATCH v5] " Wei Gao via ltp
2024-09-04 6:56 ` [LTP] [PATCH v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases) Wei Gao via ltp
2024-09-05 5:12 ` Petr Vorel
2024-09-05 8:47 ` Cyril Hrubis
2024-09-05 12:02 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox