summaryrefslogtreecommitdiffstats
path: root/kernel/tools/testing/selftests/net/run_afpackettests
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/testing/selftests/net/run_afpackettests')
-rwxr-xr-xkernel/tools/testing/selftests/net/run_afpackettests26
1 files changed, 26 insertions, 0 deletions
diff --git a/kernel/tools/testing/selftests/net/run_afpackettests b/kernel/tools/testing/selftests/net/run_afpackettests
new file mode 100755
index 000000000..5246e782d
--- /dev/null
+++ b/kernel/tools/testing/selftests/net/run_afpackettests
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ $(id -u) != 0 ]; then
+ echo $msg must be run as root >&2
+ exit 0
+fi
+
+echo "--------------------"
+echo "running psock_fanout test"
+echo "--------------------"
+./psock_fanout
+if [ $? -ne 0 ]; then
+ echo "[FAIL]"
+else
+ echo "[PASS]"
+fi
+
+echo "--------------------"
+echo "running psock_tpacket test"
+echo "--------------------"
+./psock_tpacket
+if [ $? -ne 0 ]; then
+ echo "[FAIL]"
+else
+ echo "[PASS]"
+fi