From c8f3a1c057ffd4ea288f9e38d9e396eebdafcd0c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 18 Jun 2012 19:20:16 +0200 Subject: [PATCH] TEST-01-BASIC: add watchdog --- test/TEST-01-BASIC/test-init.sh | 3 ++- test/TEST-01-BASIC/test.sh | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh index f8d6693..5fc02d9 100755 --- a/test/TEST-01-BASIC/test-init.sh +++ b/test/TEST-01-BASIC/test-init.sh @@ -1,10 +1,11 @@ #!/bin/sh +>/dev/watchdog export PATH=/sbin:/bin:/usr/sbin:/usr/bin strstr() { [ "${1#*$2*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 -echo "dracut-root-block-success" >/dev/sda1 +echo "dracut-root-block-success" >/dev/sdb export TERM=linux export PS1='initramfs-test:\w\$ ' [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh index 46e75c7..6c39d7b 100755 --- a/test/TEST-01-BASIC/test.sh +++ b/test/TEST-01-BASIC/test.sh @@ -7,13 +7,16 @@ KVERSION=${KVERSION-$(uname -r)} #DEBUGFAIL="rd.shell rd.break" test_run() { + dd if=/dev/zero of=$TESTDIR/result bs=1M count=1 $testdir/run-qemu \ -hda $TESTDIR/root.ext3 \ + -hdb $TESTDIR/result \ -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ + -watchdog ib700 -watchdog-action poweroff \ -append "root=LABEL=dracut rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 + -initrd $TESTDIR/initramfs.testing || return 1 + grep -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 } test_setup() { @@ -81,8 +84,8 @@ test_setup() { inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -a "debug" \ - -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + -a "debug watchdog" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod ib700wdt" \ -f $TESTDIR/initramfs.testing $KVERSION || return 1 # -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm"