|
Harald Hoyer |
38a2dd |
From a8986425a4af56a50c8986228e2df04efc5f9edf Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
38a2dd |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
38a2dd |
Date: Fri, 5 Apr 2013 11:05:39 +0200
|
|
Harald Hoyer |
38a2dd |
Subject: [PATCH] TEST-50-MULTINIC: fixup test suite
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
qemu of the day doesn't like multicast anymore
|
|
Harald Hoyer |
38a2dd |
---
|
|
Harald Hoyer |
38a2dd |
test/TEST-50-MULTINIC/server-init.sh | 54 +++++++++++++++++++++++++++++++++---
|
|
Harald Hoyer |
38a2dd |
test/TEST-50-MULTINIC/test.sh | 23 +++++++--------
|
|
Harald Hoyer |
38a2dd |
2 files changed, 60 insertions(+), 17 deletions(-)
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
diff --git a/test/TEST-50-MULTINIC/server-init.sh b/test/TEST-50-MULTINIC/server-init.sh
|
|
Harald Hoyer |
38a2dd |
index 144f83c..5a8359b 100755
|
|
Harald Hoyer |
38a2dd |
--- a/test/TEST-50-MULTINIC/server-init.sh
|
|
Harald Hoyer |
38a2dd |
+++ b/test/TEST-50-MULTINIC/server-init.sh
|
|
Harald Hoyer |
38a2dd |
@@ -7,11 +7,53 @@ export PS1='nfstest-server:\w\$ '
|
|
Harald Hoyer |
38a2dd |
stty sane
|
|
Harald Hoyer |
38a2dd |
echo "made it to the rootfs!"
|
|
Harald Hoyer |
38a2dd |
echo server > /proc/sys/kernel/hostname
|
|
Harald Hoyer |
38a2dd |
+
|
|
Harald Hoyer |
38a2dd |
+wait_for_if_link() {
|
|
Harald Hoyer |
38a2dd |
+ local cnt=0
|
|
Harald Hoyer |
38a2dd |
+ local li
|
|
Harald Hoyer |
38a2dd |
+ while [ $cnt -lt 600 ]; do
|
|
Harald Hoyer |
38a2dd |
+ li=$(ip -o link show dev $1 2>/dev/null)
|
|
Harald Hoyer |
38a2dd |
+ [ -n "$li" ] && return 0
|
|
Harald Hoyer |
38a2dd |
+ sleep 0.1
|
|
Harald Hoyer |
38a2dd |
+ cnt=$(($cnt+1))
|
|
Harald Hoyer |
38a2dd |
+ done
|
|
Harald Hoyer |
38a2dd |
+ return 1
|
|
Harald Hoyer |
38a2dd |
+}
|
|
Harald Hoyer |
38a2dd |
+
|
|
Harald Hoyer |
38a2dd |
+wait_for_if_up() {
|
|
Harald Hoyer |
38a2dd |
+ local cnt=0
|
|
Harald Hoyer |
38a2dd |
+ local li
|
|
Harald Hoyer |
38a2dd |
+ while [ $cnt -lt 200 ]; do
|
|
Harald Hoyer |
38a2dd |
+ li=$(ip -o link show up dev $1)
|
|
Harald Hoyer |
38a2dd |
+ [ -n "$li" ] && return 0
|
|
Harald Hoyer |
38a2dd |
+ sleep 0.1
|
|
Harald Hoyer |
38a2dd |
+ cnt=$(($cnt+1))
|
|
Harald Hoyer |
38a2dd |
+ done
|
|
Harald Hoyer |
38a2dd |
+ return 1
|
|
Harald Hoyer |
38a2dd |
+}
|
|
Harald Hoyer |
38a2dd |
+
|
|
Harald Hoyer |
38a2dd |
+wait_for_route_ok() {
|
|
Harald Hoyer |
38a2dd |
+ local cnt=0
|
|
Harald Hoyer |
38a2dd |
+ while [ $cnt -lt 200 ]; do
|
|
Harald Hoyer |
38a2dd |
+ li=$(ip route show)
|
|
Harald Hoyer |
38a2dd |
+ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
|
Harald Hoyer |
38a2dd |
+ sleep 0.1
|
|
Harald Hoyer |
38a2dd |
+ cnt=$(($cnt+1))
|
|
Harald Hoyer |
38a2dd |
+ done
|
|
Harald Hoyer |
38a2dd |
+ return 1
|
|
Harald Hoyer |
38a2dd |
+}
|
|
Harald Hoyer |
38a2dd |
+
|
|
Harald Hoyer |
38a2dd |
+linkup() {
|
|
Harald Hoyer |
38a2dd |
+ wait_for_if_link $1 2>/dev/null\
|
|
Harald Hoyer |
38a2dd |
+ && ip link set $1 up 2>/dev/null\
|
|
Harald Hoyer |
38a2dd |
+ && wait_for_if_up $1 2>/dev/null
|
|
Harald Hoyer |
38a2dd |
+}
|
|
Harald Hoyer |
38a2dd |
+
|
|
Harald Hoyer |
38a2dd |
>/dev/watchdog
|
|
Harald Hoyer |
38a2dd |
ip addr add 127.0.0.1/8 dev lo
|
|
Harald Hoyer |
38a2dd |
-ip link set lo up
|
|
Harald Hoyer |
38a2dd |
+linkup lo
|
|
Harald Hoyer |
38a2dd |
ip addr add 192.168.50.1/24 dev eth0
|
|
Harald Hoyer |
38a2dd |
-ip link set eth0 up
|
|
Harald Hoyer |
38a2dd |
+linkup eth0
|
|
Harald Hoyer |
38a2dd |
>/dev/watchdog
|
|
Harald Hoyer |
38a2dd |
modprobe af_packet
|
|
Harald Hoyer |
38a2dd |
> /dev/watchdog
|
|
Harald Hoyer |
38a2dd |
@@ -42,10 +84,14 @@ exportfs -r
|
|
Harald Hoyer |
38a2dd |
chmod 777 /var/lib/dhcpd/dhcpd.leases
|
|
Harald Hoyer |
38a2dd |
>/dev/watchdog
|
|
Harald Hoyer |
38a2dd |
dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
|
|
Harald Hoyer |
38a2dd |
-echo -n 'V' > /dev/watchdog
|
|
Harald Hoyer |
38a2dd |
+#echo -n 'V' > /dev/watchdog
|
|
Harald Hoyer |
38a2dd |
#sh -i
|
|
Harald Hoyer |
38a2dd |
+#tcpdump -i eth0
|
|
Harald Hoyer |
38a2dd |
# Wait forever for the VM to die
|
|
Harald Hoyer |
38a2dd |
echo "Serving NFS mounts"
|
|
Harald Hoyer |
38a2dd |
-while :; do sleep 30; done
|
|
Harald Hoyer |
38a2dd |
+while :; do
|
|
Harald Hoyer |
38a2dd |
+ sleep 10
|
|
Harald Hoyer |
38a2dd |
+ >/dev/watchdog
|
|
Harald Hoyer |
38a2dd |
+done
|
|
Harald Hoyer |
38a2dd |
mount -n -o remount,ro /
|
|
Harald Hoyer |
38a2dd |
poweroff -f
|
|
Harald Hoyer |
38a2dd |
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
|
|
Harald Hoyer |
38a2dd |
index a3aa679..5cb0971 100755
|
|
Harald Hoyer |
38a2dd |
--- a/test/TEST-50-MULTINIC/test.sh
|
|
Harald Hoyer |
38a2dd |
+++ b/test/TEST-50-MULTINIC/test.sh
|
|
Harald Hoyer |
38a2dd |
@@ -8,7 +8,6 @@ KVERSION=${KVERSION-$(uname -r)}
|
|
Harald Hoyer |
38a2dd |
# Uncomment this to debug failures
|
|
Harald Hoyer |
38a2dd |
#DEBUGFAIL="rd.shell"
|
|
Harald Hoyer |
38a2dd |
#SERIAL="tcp:127.0.0.1:9999"
|
|
Harald Hoyer |
38a2dd |
-SERIAL="null"
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
run_server() {
|
|
Harald Hoyer |
38a2dd |
# Start server first
|
|
Harald Hoyer |
38a2dd |
@@ -19,9 +18,9 @@ run_server() {
|
|
Harald Hoyer |
38a2dd |
-hda $TESTDIR/server.ext3 \
|
|
Harald Hoyer |
38a2dd |
-m 512M -smp 2 \
|
|
Harald Hoyer |
38a2dd |
-display none \
|
|
Harald Hoyer |
38a2dd |
- -netdev socket,mcast=230.0.0.1:12320,id=net0 \
|
|
Harald Hoyer |
38a2dd |
- -net nic,macaddr=52:54:01:12:34:56,model=e1000,netdev=net0 \
|
|
Harald Hoyer |
38a2dd |
- -serial $SERIAL \
|
|
Harald Hoyer |
38a2dd |
+ -net socket,listen=127.0.0.1:12350 \
|
|
Harald Hoyer |
38a2dd |
+ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
+ ${SERIAL+-serial $SERIAL} \
|
|
Harald Hoyer |
38a2dd |
-watchdog i6300esb -watchdog-action poweroff \
|
|
Harald Hoyer |
38a2dd |
-kernel /boot/vmlinuz-$KVERSION \
|
|
Harald Hoyer |
38a2dd |
-append "loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
|
Harald Hoyer |
38a2dd |
@@ -53,15 +52,13 @@ client_test() {
|
|
Harald Hoyer |
38a2dd |
fi
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
$testdir/run-qemu -hda $TESTDIR/client.img -m 512M -smp 2 -nographic \
|
|
Harald Hoyer |
38a2dd |
- -netdev socket,mcast=230.0.0.1:12320,id=net0 \
|
|
Harald Hoyer |
38a2dd |
- -net nic,netdev=net0,macaddr=52:54:00:12:34:$mac1,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
- -netdev socket,mcast=230.0.0.1:12320,id=net1 \
|
|
Harald Hoyer |
38a2dd |
- -net nic,netdev=net1,macaddr=52:54:00:12:34:$mac2,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
- -netdev socket,mcast=230.0.0.1:12320,id=net2 \
|
|
Harald Hoyer |
38a2dd |
- -net nic,netdev=net2,macaddr=52:54:00:12:34:$mac3,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
+ -net socket,connect=127.0.0.1:12350 \
|
|
Harald Hoyer |
38a2dd |
+ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
+ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
+ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
|
|
Harald Hoyer |
38a2dd |
-watchdog i6300esb -watchdog-action poweroff \
|
|
Harald Hoyer |
38a2dd |
-kernel /boot/vmlinuz-$KVERSION \
|
|
Harald Hoyer |
38a2dd |
- -append "$cmdline $DEBUGFAIL rd.retry=5 rd.info ro rd.systemd.log_level=debug console=ttyS0,115200n81 selinux=0 rd.copystate rd.chroot init=/sbin/init" \
|
|
Harald Hoyer |
38a2dd |
+ -append "$cmdline $DEBUGFAIL rd.retry=5 rd.info ro console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
Harald Hoyer |
38a2dd |
-initrd $TESTDIR/initramfs.testing
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
if [[ $? -ne 0 ]] || ! grep -m 1 -q OK $TESTDIR/client.img; then
|
|
Harald Hoyer |
38a2dd |
@@ -252,14 +249,14 @@ test_setup() {
|
|
Harald Hoyer |
38a2dd |
# Make server's dracut image
|
|
Harald Hoyer |
38a2dd |
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
|
Harald Hoyer |
38a2dd |
-m "dash udev-rules base rootfs-block debug kernel-modules watchdog" \
|
|
Harald Hoyer |
38a2dd |
- -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esbwdt" \
|
|
Harald Hoyer |
38a2dd |
+ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \
|
|
Harald Hoyer |
38a2dd |
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
# Make client's dracut image
|
|
Harald Hoyer |
38a2dd |
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
|
Harald Hoyer |
38a2dd |
-o "plymouth" \
|
|
Harald Hoyer |
38a2dd |
-a "debug" \
|
|
Harald Hoyer |
38a2dd |
- -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esbwdt" \
|
|
Harald Hoyer |
38a2dd |
+ -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \
|
|
Harald Hoyer |
38a2dd |
-f $TESTDIR/initramfs.testing $KVERSION || return 1
|
|
Harald Hoyer |
38a2dd |
}
|
|
Harald Hoyer |
38a2dd |
|