[PATCH 1/2][linux-aws/disco] UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is not present
Seth Forshee
seth.forshee at canonical.com
Fri Apr 5 20:51:12 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1823407
Signed-off-by: Seth Forshee <seth.forshee 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
--
2.20.1
More information about the kernel-team
mailing list