Message ID | 20240904065653.31086-1-wegao@suse.com |
---|---|
State | Accepted |
Headers | show |
Series | [v6] mpls01: Add --allow-unsupported for modprobe(fixing all mpls cases) | expand |
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" ...
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>
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
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