run_afpackettests 666 字节
Newer Older
1
#!/bin/sh
2
# SPDX-License-Identifier: GPL-2.0
3 4 5 6 7 8 9 10 11

if [ $(id -u) != 0 ]; then
	echo $msg must be run as root >&2
	exit 0
fi

echo "--------------------"
echo "running psock_fanout test"
echo "--------------------"
12
./in_netns.sh ./psock_fanout
13 14 15 16 17
if [ $? -ne 0 ]; then
	echo "[FAIL]"
else
	echo "[PASS]"
fi
18 19 20 21

echo "--------------------"
echo "running psock_tpacket test"
echo "--------------------"
22
./in_netns.sh ./psock_tpacket
23 24 25 26 27
if [ $? -ne 0 ]; then
	echo "[FAIL]"
else
	echo "[PASS]"
fi
28 29 30 31 32 33 34 35 36 37

echo "--------------------"
echo "running txring_overwrite test"
echo "--------------------"
./in_netns.sh ./txring_overwrite
if [ $? -ne 0 ]; then
	echo "[FAIL]"
else
	echo "[PASS]"
fi