Message ID | 20201021142923.66419-1-paolo.pisati@canonical.com |
---|---|
State | New |
Headers | show |
Series | [G/master,SRU] UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is not present | expand |
On 21/10/2020 15:29, Paolo Pisati wrote: > From: Seth Forshee <seth.forshee@canonical.com> > > BugLink: https://bugs.launchpad.net/bugs/1900855 > BugLink: https://bugs.launchpad.net/bugs/1823407 > > [Impact] > > Groovy/linux-aws is carrying this patch: > > 0deca25e3bb1 UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is > not present > > since the fix is not AWS specific, (and other kernels/selftests might benefit > from it), fold it in generic and make it disappear from linux-aws after next > rebase. > > [Fix] > > Cherry-pick the above SAUCE patch > > [Regression potential] > > It's a seltest fix. > > Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com> > (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e) > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> > --- > tools/testing/selftests/net/test_bpf.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh > index 65677909c574..fa1ec4aa0ada 100755 > --- a/tools/testing/selftests/net/test_bpf.sh > +++ b/tools/testing/selftests/net/test_bpf.sh > @@ -2,7 +2,10 @@ > # SPDX-License-Identifier: GPL-2.0 > # Runs bpf test using test_bpf kernel module > > -if /sbin/modprobe -q test_bpf ; then > +# Test whether test_bpf module exists > +if ! /sbin/modprobe -q -n test_bpf; then > + echo "SKIP: test_bpf module not found" > +elif /sbin/modprobe -q test_bpf ; then > /sbin/modprobe -q -r test_bpf; > echo "test_bpf: ok"; > else > Seems reasonable to me. Thanks Paolo. Acked-by: Colin Ian King <colin.king@canonical.com>
On 21.10.20 16:29, Paolo Pisati wrote: > From: Seth Forshee <seth.forshee@canonical.com> > > BugLink: https://bugs.launchpad.net/bugs/1900855 > BugLink: https://bugs.launchpad.net/bugs/1823407 > > [Impact] > > Groovy/linux-aws is carrying this patch: > > 0deca25e3bb1 UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is > not present > > since the fix is not AWS specific, (and other kernels/selftests might benefit > from it), fold it in generic and make it disappear from linux-aws after next > rebase. > > [Fix] > > Cherry-pick the above SAUCE patch > > [Regression potential] > > It's a seltest fix. > > Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com> > (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e) > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > tools/testing/selftests/net/test_bpf.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh > index 65677909c574..fa1ec4aa0ada 100755 > --- a/tools/testing/selftests/net/test_bpf.sh > +++ b/tools/testing/selftests/net/test_bpf.sh > @@ -2,7 +2,10 @@ > # SPDX-License-Identifier: GPL-2.0 > # Runs bpf test using test_bpf kernel module > > -if /sbin/modprobe -q test_bpf ; then > +# Test whether test_bpf module exists > +if ! /sbin/modprobe -q -n test_bpf; then > + echo "SKIP: test_bpf module not found" > +elif /sbin/modprobe -q test_bpf ; then > /sbin/modprobe -q -r test_bpf; > echo "test_bpf: ok"; > else >
On 21.10.20 16:29, Paolo Pisati wrote: > From: Seth Forshee <seth.forshee@canonical.com> > > BugLink: https://bugs.launchpad.net/bugs/1900855 > BugLink: https://bugs.launchpad.net/bugs/1823407 > > [Impact] > > Groovy/linux-aws is carrying this patch: > > 0deca25e3bb1 UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is > not present > > since the fix is not AWS specific, (and other kernels/selftests might benefit > from it), fold it in generic and make it disappear from linux-aws after next > rebase. > > [Fix] > > Cherry-pick the above SAUCE patch > > [Regression potential] > > It's a seltest fix. > > Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com> > (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e) > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> > --- Applied to groovy/master-next. Thanks. Since groovy is released now, would this also be something still needed on hirsute? -Stefan > tools/testing/selftests/net/test_bpf.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh > index 65677909c574..fa1ec4aa0ada 100755 > --- a/tools/testing/selftests/net/test_bpf.sh > +++ b/tools/testing/selftests/net/test_bpf.sh > @@ -2,7 +2,10 @@ > # SPDX-License-Identifier: GPL-2.0 > # Runs bpf test using test_bpf kernel module > > -if /sbin/modprobe -q test_bpf ; then > +# Test whether test_bpf module exists > +if ! /sbin/modprobe -q -n test_bpf; then > + echo "SKIP: test_bpf module not found" > +elif /sbin/modprobe -q test_bpf ; then > /sbin/modprobe -q -r test_bpf; > echo "test_bpf: ok"; > else >
On 27.10.20 09:32, Stefan Bader wrote: > On 21.10.20 16:29, Paolo Pisati wrote: >> From: Seth Forshee <seth.forshee@canonical.com> >> >> BugLink: https://bugs.launchpad.net/bugs/1900855 >> BugLink: https://bugs.launchpad.net/bugs/1823407 >> >> [Impact] >> >> Groovy/linux-aws is carrying this patch: >> >> 0deca25e3bb1 UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is >> not present >> >> since the fix is not AWS specific, (and other kernels/selftests might benefit >> from it), fold it in generic and make it disappear from linux-aws after next >> rebase. >> >> [Fix] >> >> Cherry-pick the above SAUCE patch >> >> [Regression potential] >> >> It's a seltest fix. >> >> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> >> Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com> >> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> >> (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e) >> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> >> --- > > Applied to groovy/master-next. Thanks. Since groovy is released now, would this > also be something still needed on hirsute? Oh, one more comment, I took the liberty of removing the original bug link and only keeping the one for folding the patch into master when I applied the patch. -Stefan > > -Stefan > >> tools/testing/selftests/net/test_bpf.sh | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh >> index 65677909c574..fa1ec4aa0ada 100755 >> --- a/tools/testing/selftests/net/test_bpf.sh >> +++ b/tools/testing/selftests/net/test_bpf.sh >> @@ -2,7 +2,10 @@ >> # SPDX-License-Identifier: GPL-2.0 >> # Runs bpf test using test_bpf kernel module >> >> -if /sbin/modprobe -q test_bpf ; then >> +# Test whether test_bpf module exists >> +if ! /sbin/modprobe -q -n test_bpf; then >> + echo "SKIP: test_bpf module not found" >> +elif /sbin/modprobe -q test_bpf ; then >> /sbin/modprobe -q -r test_bpf; >> echo "test_bpf: ok"; >> else >> > > >
On Tue, Oct 27, 2020 at 09:32:24AM +0100, Stefan Bader wrote: > Applied to groovy/master-next. Thanks. Since groovy is released now, would this > also be something still needed on hirsute? Yes, and i've just applied it to 5.10.
diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh index 65677909c574..fa1ec4aa0ada 100755 --- a/tools/testing/selftests/net/test_bpf.sh +++ b/tools/testing/selftests/net/test_bpf.sh @@ -2,7 +2,10 @@ # SPDX-License-Identifier: GPL-2.0 # Runs bpf test using test_bpf kernel module -if /sbin/modprobe -q test_bpf ; then +# Test whether test_bpf module exists +if ! /sbin/modprobe -q -n test_bpf; then + echo "SKIP: test_bpf module not found" +elif /sbin/modprobe -q test_bpf ; then /sbin/modprobe -q -r test_bpf; echo "test_bpf: ok"; else