Blame SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch

18971c
From 0b7c2400c328f9b437061f885853fb83d3f44155 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Wed, 22 Jun 2016 14:03:12 +0200
18971c
Subject: [PATCH] TEST-50-MULTINIC: add multiple bond tests
18971c
18971c
---
18971c
 test/TEST-50-MULTINIC/test.sh | 15 ++++++++++++++-
18971c
 1 file changed, 14 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
18971c
index 1c46d7a8..c0c3615f 100755
18971c
--- a/test/TEST-50-MULTINIC/test.sh
18971c
+++ b/test/TEST-50-MULTINIC/test.sh
18971c
@@ -58,7 +58,7 @@ client_test() {
18971c
         -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
18971c
         -watchdog i6300esb -watchdog-action poweroff \
18971c
         -kernel /boot/vmlinuz-"$KVERSION" \
18971c
-        -append "$cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
18971c
+        -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
18971c
         -initrd "$TESTDIR"/initramfs.testing
18971c
 
18971c
     { read OK; read IFACES; } < "$TESTDIR"/client.img
18971c
@@ -102,6 +102,7 @@ test_client() {
18971c
     # ...:00-02 receive IP adresses all others don't
18971c
     # ...:02 receives a dhcp root-path
18971c
 
18971c
+    # Require three interfaces with dhcp root-path
18971c
     # PXE Style BOOTIF=
18971c
     client_test "MULTINIC root=nfs BOOTIF=" \
18971c
         00 01 02 \
18971c
@@ -137,6 +138,18 @@ test_client() {
18971c
         "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \
18971c
         "ens3 ens4 ens5" || return 1
18971c
 
18971c
+    # bonding test
18971c
+    client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \
18971c
+        00 01 02 \
18971c
+        "root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \
18971c
+        "bond0 ens5" || return 1
18971c
+
18971c
+    # multiple bonding test
18971c
+    client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \
18971c
+        00 01 02 \
18971c
+        "root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=bond1:dhcp ip=ens5:dhcp bootdev=ens5" \
18971c
+        "bond0 bond1 ens5" || return 1
18971c
+
18971c
     kill_server
18971c
     return 0
18971c
 }