diff options
| author | Shuah Khan <shuahkh@osg.samsung.com> | 2014-10-30 18:52:15 -0400 |
|---|---|---|
| committer | Shuah Khan <shuahkh@osg.samsung.com> | 2014-11-05 10:12:40 -0500 |
| commit | 7069a97a14155349545c73084f9f9f6b6380e0f7 (patch) | |
| tree | 268bc9eadb12c3817885e4920989436a5025c6ba /tools/testing | |
| parent | 0df1f2487d2f0d04703f142813d53615d62a1da4 (diff) | |
selftests/net: move test out of Makefile into a shell script
Currently bpf test run from the Makefile. Move it out of the
Makefile to be run from a shell script to allow the test to
be run as stand-alone test, in addition to allowing the test
run from a make target.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/net/Makefile | 8 | ||||
| -rwxr-xr-x | tools/testing/selftests/net/test_bpf.sh | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index c7493b8f9b0e..62f22cc9941c 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile | |||
| @@ -14,12 +14,6 @@ all: $(NET_PROGS) | |||
| 14 | run_tests: all | 14 | run_tests: all |
| 15 | @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]" | 15 | @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]" |
| 16 | @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]" | 16 | @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]" |
| 17 | @if /sbin/modprobe test_bpf ; then \ | 17 | ./test_bpf.sh |
| 18 | /sbin/rmmod test_bpf; \ | ||
| 19 | echo "test_bpf: ok"; \ | ||
| 20 | else \ | ||
| 21 | echo "test_bpf: [FAIL]"; \ | ||
| 22 | exit 1; \ | ||
| 23 | fi | ||
| 24 | clean: | 18 | clean: |
| 25 | $(RM) $(NET_PROGS) | 19 | $(RM) $(NET_PROGS) |
diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh new file mode 100755 index 000000000000..8b29796d46aa --- /dev/null +++ b/tools/testing/selftests/net/test_bpf.sh | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Runs bpf test using test_bpf kernel module | ||
| 3 | |||
| 4 | if /sbin/modprobe -q test_bpf ; then | ||
| 5 | /sbin/modprobe -q -r test_bpf; | ||
| 6 | echo "test_bpf: ok"; | ||
| 7 | else | ||
| 8 | echo "test_bpf: [FAIL]"; | ||
| 9 | exit 1; | ||
| 10 | fi | ||
