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