diff options
author | Mahesh Bandewar <maheshb@google.com> | 2019-07-02 00:39:01 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-02 05:34:46 +0300 |
commit | 509e56b37cc32c9b5fc2be585c25d1e60d6a1d73 (patch) | |
tree | 30d85bf915bacf13f14ea2d3c40bbc68815d799d /tools/testing/selftests/net/test_blackhole_dev.sh | |
parent | 8d7017fd621d02ff0d47d19484350c2356828483 (diff) | |
download | linux-509e56b37cc32c9b5fc2be585c25d1e60d6a1d73.tar.xz |
blackhole_dev: add a selftest
Since this is not really a device with all capabilities, this test
ensures that it has *enough* to make it through the data path
without causing unwanted side-effects (read crash!).
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/test_blackhole_dev.sh')
-rwxr-xr-x | tools/testing/selftests/net/test_blackhole_dev.sh | 11 |
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 000000000000..3119b80e711f --- /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 |