xref: /linux/tools/testing/selftests/net/run_afpackettests (revision 860dbce3d8dd90cb9e909c58fa79808766243651)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4if [ $(id -u) != 0 ]; then
5	echo $msg must be run as root >&2
6	exit 0
7fi
8
9ret=0
10echo "--------------------"
11echo "running psock_fanout test"
12echo "--------------------"
13./in_netns.sh ./psock_fanout
14if [ $? -ne 0 ]; then
15	echo "[FAIL]"
16	ret=1
17else
18	echo "[PASS]"
19fi
20
21echo "--------------------"
22echo "running psock_tpacket test"
23echo "--------------------"
24./in_netns.sh ./psock_tpacket
25if [ $? -ne 0 ]; then
26	echo "[FAIL]"
27	ret=1
28else
29	echo "[PASS]"
30fi
31
32echo "--------------------"
33echo "running txring_overwrite test"
34echo "--------------------"
35./in_netns.sh ./txring_overwrite
36if [ $? -ne 0 ]; then
37	echo "[FAIL]"
38	ret=1
39else
40	echo "[PASS]"
41fi
42exit $ret
43