1
0
Fork 0

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>
hifive-unleashed-5.1
Shuah Khan 2014-10-30 16:52:15 -06:00
parent 0df1f2487d
commit 7069a97a14
2 changed files with 11 additions and 7 deletions

View 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)

View File

@ -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