dracut/0036-TEST-50-MULTINIC-add-watchdog.patch

85 lines
3.7 KiB
Diff
Raw Normal View History

From 2dbd71b77a72a88cd4b8ccd50a40de3b7bfd1dd0 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 18 Jun 2012 19:22:35 +0200
Subject: [PATCH] TEST-50-MULTINIC: add watchdog
---
test/TEST-50-MULTINIC/server-init.sh | 2 +-
test/TEST-50-MULTINIC/test.sh | 34 ++++++++++++++++++----------------
2 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/test/TEST-50-MULTINIC/server-init.sh b/test/TEST-50-MULTINIC/server-init.sh
index 39f6a1d..c02d84c 100755
--- a/test/TEST-50-MULTINIC/server-init.sh
+++ b/test/TEST-50-MULTINIC/server-init.sh
@@ -26,6 +26,6 @@ dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
#sh -i
# Wait forever for the VM to die
echo "Serving NFS mounts"
-while sleep 60; do sleep 60; done
+while sleep 30; do echo >/dev/watchdog; done
mount -n -o remount,ro /
poweroff -f
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
index 6efa8ef..1655608 100755
--- a/test/TEST-50-MULTINIC/test.sh
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -13,12 +13,13 @@ run_server() {
echo "MULTINIC TEST SETUP: Starting DHCP/NFS server"
$testdir/run-qemu -hda $TESTDIR/server.ext3 -m 512M -nographic \
- -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
- -net socket,listen=127.0.0.1:12350 \
- -serial $SERIAL \
- -kernel /boot/vmlinuz-$KVERSION \
- -append "selinux=0 root=/dev/sda rd.debug rd.info rw quiet console=ttyS0,115200n81" \
- -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1
+ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
+ -net socket,listen=127.0.0.1:12350 \
+ -serial $SERIAL \
+ -watchdog ib700 -watchdog-action poweroff \
+ -kernel /boot/vmlinuz-$KVERSION \
+ -append "selinux=0 root=/dev/sda rd.debug rd.info rw quiet console=ttyS0,115200n81" \
+ -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1
sudo chmod 644 $TESTDIR/server.pid || return 1
# Cleanup the terminal if we have one
@@ -50,9 +51,10 @@ client_test() {
-net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
-net socket,connect=127.0.0.1:12350 \
-hdc /dev/null \
- -kernel /boot/vmlinuz-$KVERSION \
- -append "$cmdline $DEBUGFAIL rd.retry=5 rd.debug rd.info ro quiet console=ttyS0,115200n81 selinux=0 rd.copystate" \
- -initrd $TESTDIR/initramfs.testing
+ -watchdog ib700 -watchdog-action poweroff \
+ -kernel /boot/vmlinuz-$KVERSION \
+ -append "$cmdline $DEBUGFAIL rd.retry=5 rd.debug rd.info ro quiet console=ttyS0,115200n81 selinux=0 rd.copystate rd.chroot init=/sbin/init" \
+ -initrd $TESTDIR/initramfs.testing
if [[ $? -ne 0 ]] || ! grep -m 1 -q OK $TESTDIR/client.img; then
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
@@ -261,16 +263,16 @@ test_setup() {
# Make server's dracut image
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
- -m "dash udev-rules base rootfs-block debug kernel-modules" \
- -d "piix ide-gd_mod ata_piix ext3 sd_mod e1000" \
- -f $TESTDIR/initramfs.server $KVERSION || return 1
+ -m "dash udev-rules base rootfs-block debug kernel-modules watchdog" \
+ -d "piix ide-gd_mod ata_piix ext3 sd_mod e1000 ib700wdt" \
+ -f $TESTDIR/initramfs.server $KVERSION || return 1
# Make client's dracut image
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
- -o "plymouth" \
- -a "debug" \
- -d "piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfs sunrpc" \
- -f $TESTDIR/initramfs.testing $KVERSION || return 1
+ -o "plymouth" \
+ -a "debug watchdog" \
+ -d "piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfs sunrpc ib700wdt" \
+ -f $TESTDIR/initramfs.testing $KVERSION || return 1
}
kill_server() {