Skip to content

Commit

Permalink
network: rename runtest files, use 'net.' & 'net_stress.' prefix
Browse files Browse the repository at this point in the history
network.sh: also print usage help.

Signed-off-by: Alexey Kodanev <[email protected]>
  • Loading branch information
akodanev committed May 19, 2016
1 parent fddb4f3 commit a94a669
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 22 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scenario_groups/default
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ fs_ext4
pipes
can
cpuhotplug
ipv6_lib
net.ipv6_lib
input
8 changes: 4 additions & 4 deletions scenario_groups/network
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tcp_cmds
multicast
rpc
nfs
net.tcp_cmds
net.multicast
net.rpc
net.nfs
64 changes: 47 additions & 17 deletions testscripts/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,62 @@ export PATH="${PATH}:${LTPROOT}/testcases/bin"
export TCID=
export TST_LIB_LOADED=

usage()
{
echo "Usage: $0 OPTIONS"
echo " -6 IPv6 tests"
echo " -m multicast tests"
echo " -n NFS tests"
echo " -r RPC tests"
echo " -s SCTP tests"
echo " -t TCP/IP command tests"
echo " -a Application tests (HTTP, SSH, DNS)"
echo " -e Interface stress tests"
echo " -b Stress tests with malformed ICMP packets"
echo " -i IPsec ICMP stress tests"
echo " -T IPsec TCP stress tests"
echo " -U IPsec UDP stress tests"
echo " -R route stress tests"
echo " -M multicast stress tests"
echo " -F network features tests (TFO, vxlan, etc.)"
echo " -f x where x is a runtest file"
echo " -V|v verbose"
echo " -h print this help"
}

TEST_CASES=

while getopts 6mnrstaebiTURMFf:Vv OPTION
while getopts 6mnrstaebiTURMFf:Vvh OPTION
do
case $OPTION in
6) TEST_CASES="$TEST_CASES ipv6 ipv6_lib";;
m) TEST_CASES="$TEST_CASES multicast" ;;
n) TEST_CASES="$TEST_CASES nfs" ;;
r) TEST_CASES="$TEST_CASES rpc" ;;
s) TEST_CASES="$TEST_CASES sctp" ;;
t) TEST_CASES="$TEST_CASES tcp_cmds" ;;
a) TEST_CASES="$TEST_CASES network_stress.appl";;
e) TEST_CASES="$TEST_CASES network_stress.interface";;
b) TEST_CASES="$TEST_CASES network_stress.broken_ip";;
i) TEST_CASES="$TEST_CASES network_stress.icmp";;
T) TEST_CASES="$TEST_CASES network_stress.tcp";;
U) TEST_CASES="$TEST_CASES network_stress.udp";;
R) TEST_CASES="$TEST_CASES network_stress.route";;
M) TEST_CASES="$TEST_CASES network_stress.multicast";;
F) TEST_CASES="$TEST_CASES network_stress.features";;
6) TEST_CASES="$TEST_CASES net.ipv6 net.ipv6_lib";;
m) TEST_CASES="$TEST_CASES net.multicast" ;;
n) TEST_CASES="$TEST_CASES net.nfs" ;;
r) TEST_CASES="$TEST_CASES net.rpc" ;;
s) TEST_CASES="$TEST_CASES net.sctp" ;;
t) TEST_CASES="$TEST_CASES net.tcp_cmds" ;;
a) TEST_CASES="$TEST_CASES net_stress.appl";;
e) TEST_CASES="$TEST_CASES net_stress.interface";;
b) TEST_CASES="$TEST_CASES net_stress.broken_ip";;
i) TEST_CASES="$TEST_CASES net_stress.ipsec_icmp";;
T) TEST_CASES="$TEST_CASES net_stress.ipsec_tcp";;
U) TEST_CASES="$TEST_CASES net_stress.ipsec_udp";;
R) TEST_CASES="$TEST_CASES net_stress.route";;
M) TEST_CASES="$TEST_CASES net_stress.multicast";;
F) TEST_CASES="$TEST_CASES net.features";;
f) TEST_CASES=${OPTARG} ;;
V|v) VERBOSE="yes";;
*) echo "Error: invalid option..."; exit 1 ;;
h) usage; exit 0 ;;
*) echo "Error: invalid option..."; usage; exit 1 ;;
esac
done

if [ "$OPTIND" -eq 1 ]; then
echo "Error: option is required"
usage
exit 1
fi

rm -f $CMDFILE

for t in $TEST_CASES; do
Expand Down

0 comments on commit a94a669

Please sign in to comment.