From bb69cc5bb7756f380b695775eb05229bf3609fd3 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Oct 07 2012 17:35:52 +0000 Subject: Merge branch 'master' of gitorious.org:testautomation/t_functional --- diff --git a/runtests.sh b/runtests.sh index 1acf223..cc592b0 100755 --- a/runtests.sh +++ b/runtests.sh @@ -23,8 +23,8 @@ if [ $# -gt 0 ]; then t_Process <(/usr/bin/find ./tests/0_*/ -type f|sort -t'/' ) t_Process <(/usr/bin/find ./tests/$1/ -type f|sort -t'/' ) else - t_Process <(/usr/bin/find ./tests/p_*/ -type f|sort -t'/' ) t_Process <(/usr/bin/find ./tests/0_*/ -type f|sort -t'/' ) + t_Process <(/usr/bin/find ./tests/p_*/ -type f|sort -t'/' ) t_Process <(/usr/bin/find ./tests/r_*/ -type f|sort -t'/' ) t_Process <(/usr/bin/find ./tests/z_*/ -type f|sort -t'/' ) fi diff --git a/tests/p_network/networking_vlan_test.sh b/tests/p_network/networking_vlan_test.sh new file mode 100755 index 0000000..79ab3a9 --- /dev/null +++ b/tests/p_network/networking_vlan_test.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# Author: Christoph Galuschka + +t_Log "Running $0 - create VLAN IF, assign IP on VLAN IF and tear down VLAN IF using IP command test (C6 only)" +ret_val=0 + +if [ $centos_ver == 6 ] + then + t_Log 'This is a C6-system, commencing test' + # create VLAN-IF 10 on eth0 + ip link add dev eth0.10 link eth0 type vlan id 10 + ip addr list | grep -q eth0.10 + if [ $? == 1 ] + then + t_Log "VLAN-IF creation failed" + ret_val=1 + else + t_Log "VLAN-IF successfully created" + fi + + #assign IP address on VLAN-IF + ip address add 172.16.30.1/32 dev eth0.10 + ip addr list | grep -q 172.16.30.1 + if [ $? == 1 ] + then + t_Log "IP address assignment on eth0.10 failed" + ret_val=1 + else + t_Log "IP address successfully assigned on eth1.10" + fi + + #testing address with ping + ping -c 4 -q 172.16.30.1 | grep -q '4 received' + if [ $? == 1 ] + then + t_Log "pinging on eth0.10 failed" + ret_val=1 + else + t_Log "local ping on VLAN IF worked" + fi + + # delete VLAN-IF 10 on eth0 + ip link delete eth0.10 + ip addr list | grep -q eth0.10 + if [ $? == 0 ] + then + t_Log "Removing VLAN IF failed" + ret_val=1 + else + t_Log "Removing of VLAN IF worked" + fi +else + t_Log ' This is a C5 system, skipping test' +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_perl/20-run_perl_script.sh b/tests/p_perl/20-run_perl_script.sh index c1ee3c6..856b6ae 100755 --- a/tests/p_perl/20-run_perl_script.sh +++ b/tests/p_perl/20-run_perl_script.sh @@ -5,6 +5,6 @@ t_Log "Running $0 - Testing perl by running it against a basic file" echo 'print "helloworld perlpackage"' > testfile -perl testfile +perl testfile | grep -q helloworld t_CheckExitStatus $?