summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2013-01-15 15:51:53 -0500
committerBill Peck <bpeck@redhat.com>2013-01-15 15:51:53 -0500
commit4c781da88494fdb81de48bd215a372f97599beba (patch)
tree75c615189c43157da8b958ffed5020cfef8e3ed7 /kernel
parent2db3f22eada4b7f6e32214dbe749a99a6d50b860 (diff)
downloadtests-4c781da88494fdb81de48bd215a372f97599beba.tar.gz
tests-4c781da88494fdb81de48bd215a372f97599beba.tar.xz
tests-4c781da88494fdb81de48bd215a372f97599beba.zip
More tests to test openvswitch
Diffstat (limited to 'kernel')
-rw-r--r--kernel/networking/netperf/Makefile50
-rw-r--r--kernel/networking/netperf/PURPOSE3
-rwxr-xr-xkernel/networking/netperf/runtest.sh50
-rwxr-xr-xkernel/networking/openvswitch/libvirt/add_interface/runtest.sh4
-rw-r--r--kernel/networking/ping/Makefile51
-rw-r--r--kernel/networking/ping/PURPOSE3
-rwxr-xr-xkernel/networking/ping/runtest.sh44
7 files changed, 203 insertions, 2 deletions
diff --git a/kernel/networking/netperf/Makefile b/kernel/networking/netperf/Makefile
new file mode 100644
index 0000000..5b2daf0
--- /dev/null
+++ b/kernel/networking/netperf/Makefile
@@ -0,0 +1,50 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /kernel/networking/netperf
+# Description: run netperf both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+# Author: Bill Peck <bpeck@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Bill Peck <bpeck@redhat.com>" > $(METADATA)
+ @echo "TestTime: 10m" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
diff --git a/kernel/networking/netperf/PURPOSE b/kernel/networking/netperf/PURPOSE
new file mode 100644
index 0000000..6b42020
--- /dev/null
+++ b/kernel/networking/netperf/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /kernel/networking/ping
+Description: run netperf both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+Author: Bill Peck <bpeck@redhat.com>
diff --git a/kernel/networking/netperf/runtest.sh b/kernel/networking/netperf/runtest.sh
new file mode 100755
index 0000000..10d7dd2
--- /dev/null
+++ b/kernel/networking/netperf/runtest.sh
@@ -0,0 +1,50 @@
+#!/bin/bash -x
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /kernel/networking/ping
+# Description: pings both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+# Author: Bill Peck <bpeck@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/bin/rhts-environment.sh || exit 1
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PERF_TIME=${PERF_TIME:="10"}
+
+start_server()
+{
+ service iptables stop
+ netserver -4 &
+}
+
+start_server
+
+sleep 500
+
+for addr in $INVALID_ADDRS; do
+ netperf -4 -H $addr -l $PERF_TIME && report_result $TEST/$addr FAIL 1 || report_result $TEST/$addr PASS 0
+done
+for addr in $VALID_ADDRS; do
+ netperf -4 -H $addr -l $PERF_TIME && report_result $TEST/$addr PASS 0 || report_result $TEST/$addr FAIL 1
+done
diff --git a/kernel/networking/openvswitch/libvirt/add_interface/runtest.sh b/kernel/networking/openvswitch/libvirt/add_interface/runtest.sh
index 2e88f86..45ea499 100755
--- a/kernel/networking/openvswitch/libvirt/add_interface/runtest.sh
+++ b/kernel/networking/openvswitch/libvirt/add_interface/runtest.sh
@@ -50,7 +50,7 @@ add_interface()
}
for switch in $SWITCHES; do
- for guest in $(ls /etc/libvirt/qemu/*.xml); do
- add_interface $guest $switch && report_result $TEST/$guest/$switch PASS 0
+ for guest in $(eval echo \$$switch); do
+ add_interface /etc/libvirt/qemu/${guest}.xml $switch && report_result $TEST/$guest/$switch PASS 0
done
done
diff --git a/kernel/networking/ping/Makefile b/kernel/networking/ping/Makefile
new file mode 100644
index 0000000..3c90a4d
--- /dev/null
+++ b/kernel/networking/ping/Makefile
@@ -0,0 +1,51 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /kernel/networking/ping
+# Description: pings both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+# Author: Bill Peck <bpeck@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Bill Peck <bpeck@redhat.com>" > $(METADATA)
+ @echo "Description: Verifies openvswitch is working properly" >> $(METADATA)
+ @echo "TestTime: 10m" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
diff --git a/kernel/networking/ping/PURPOSE b/kernel/networking/ping/PURPOSE
new file mode 100644
index 0000000..2dbbd56
--- /dev/null
+++ b/kernel/networking/ping/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /kernel/networking/ping
+Description: pings both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+Author: Bill Peck <bpeck@redhat.com>
diff --git a/kernel/networking/ping/runtest.sh b/kernel/networking/ping/runtest.sh
new file mode 100755
index 0000000..b44a9de
--- /dev/null
+++ b/kernel/networking/ping/runtest.sh
@@ -0,0 +1,44 @@
+#!/bin/bash -x
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /kernel/networking/ping
+# Description: pings both $VALID_ADDRS and $INVALID_ADDRS, verifies connectivity
+# Author: Bill Peck <bpeck@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/bin/rhts-environment.sh || exit 1
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PING_COUNT=${PING_COUNT:="10"}
+PING_SIZE=${PING_SIZE:="64"}
+
+PACKAGE="openvswitch"
+rpm -q $PACKAGE || fail "$PACKAGE not installed"
+
+for addr in $INVALID_ADDRS; do
+ ping -c $PING_COUNT -i 0.2 -s $PING_SIZE $addr && report_result $TEST/$addr FAIL 1 || report_result $TEST/$addr PASS 0
+done
+for addr in $VALID_ADDRS; do
+ ping -c $PING_COUNT -i 0.2 -s $PING_SIZE $addr && report_result $TEST/$addr PASS 0 || report_result $TEST/$addr FAIL 1
+done