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

Colin Ian King colin.king at canonical.com
Wed Oct 21 14:31:24 UTC 2020


On 21/10/2020 15: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>
> ---
>  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 at canonical.com>



More information about the kernel-team mailing list