1#!/bin/bash 2 3# In case IPv6 is compiled as a module. 4[ -f /proc/net/if_inet6 ] || insmod $DIR/kernel/net-next/net/ipv6/ipv6.ko 5 6# Minimal network setup. 7ip link set lo up 8ip link set lo mtu 16436 9ip link set eth0 up 10 11# Allow people to run ping. 12echo "0 65536" > /proc/sys/net/ipv4/ping_group_range 13 14# Fall out to a shell once the test completes or if there's an error. 15trap "exec /bin/bash" ERR EXIT 16 17# Find and run the test. 18test=$(cat /proc/cmdline | sed -re 's/.*net_test=([^ ]*).*/\1/g') 19echo -e "Running $test\n" 20$test 21