summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/test_blackhole_dev.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/net/test_blackhole_dev.sh')
-rwxr-xr-xtools/testing/selftests/net/test_blackhole_dev.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/test_blackhole_dev.sh b/tools/testing/selftests/net/test_blackhole_dev.sh
new file mode 100755
index 000000000..3119b80e7
--- /dev/null
+++ b/tools/testing/selftests/net/test_blackhole_dev.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# Runs blackhole-dev test using blackhole-dev kernel module
+
+if /sbin/modprobe -q test_blackhole_dev ; then
+ /sbin/modprobe -q -r test_blackhole_dev;
+ echo "test_blackhole_dev: ok";
+else
+ echo "test_blackhole_dev: [FAIL]";
+ exit 1;
+fi