selftests/net: move test out of Makefile into a shell script
authorShuah Khan <shuahkh@osg.samsung.com>
Thu, 30 Oct 2014 22:52:15 +0000 (16:52 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 5 Nov 2014 15:12:40 +0000 (08:12 -0700)
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>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/test_bpf.sh [new file with mode: 0755]

index c7493b8f9b0ee5b951d73d64e7502e809be2d5ed..62f22cc9941ce7595d8ff7a085b339adc044eb0e 100644 (file)
@@ -14,12 +14,6 @@ all: $(NET_PROGS)
 run_tests: all
        @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]"
        @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]"
-       @if /sbin/modprobe test_bpf ; then \
-               /sbin/rmmod test_bpf; \
-               echo "test_bpf: ok"; \
-       else \
-               echo "test_bpf: [FAIL]"; \
-               exit 1; \
-       fi
+       ./test_bpf.sh
 clean:
        $(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 (executable)
index 0000000..8b29796
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Runs bpf test using test_bpf kernel module
+
+if /sbin/modprobe -q test_bpf ; then
+       /sbin/modprobe -q -r test_bpf;
+       echo "test_bpf: ok";
+else
+       echo "test_bpf: [FAIL]";
+       exit 1;
+fi
This page took 0.024661 seconds and 5 git commands to generate.