ACK: [G/master][SRU] [PATCH] UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is not present

Stefan Bader stefan.bader at canonical.com
Thu Oct 22 06:35:55 UTC 2020


On 21.10.20 16:29, Paolo Pisati wrote:
> From: Seth Forshee <seth.forshee at 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 at canonical.com>
> Acked-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
> Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
> (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e)
> Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
Acked-by: Stefan Bader <stefan.bader at 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
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20201022/1ce1d2a2/attachment-0001.sig>


More information about the kernel-team mailing list