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 "--------------------" 24if [ -f /proc/kallsyms ]; then 25 ./in_netns.sh ./psock_tpacket 26 if [ $? -ne 0 ]; then 27 echo "[FAIL]" 28 ret=1 29 else 30 echo "[PASS]" 31 fi 32else 33 echo "[SKIP] CONFIG_KALLSYMS not enabled" 34fi 35 36echo "--------------------" 37echo "running txring_overwrite test" 38echo "--------------------" 39./in_netns.sh ./txring_overwrite 40if [ $? -ne 0 ]; then 41 echo "[FAIL]" 42 ret=1 43else 44 echo "[PASS]" 45fi 46exit $ret 47