TEST-01-BASIC: add watchdog

master
Harald Hoyer 2012-06-18 19:20:16 +02:00
parent ef914f7d83
commit c8f3a1c057
2 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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"