From 07434861272a6adb716bd7f9f30ec9105da39d90 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 14 Apr 2011 15:24:50 +0200 Subject: [PATCH] test/TEST-11-LVM, test/TEST-14-IMSM: update test cases - more diskspace - add /run - drop to shell in test-init --- test/TEST-11-LVM/test-init | 10 ++++++++-- test/TEST-11-LVM/test.sh | 3 ++- test/TEST-14-IMSM/create-root.sh | 8 ++++---- test/TEST-14-IMSM/test-init | 7 ++++++- test/TEST-14-IMSM/test.sh | 7 ++++--- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/test/TEST-11-LVM/test-init b/test/TEST-11-LVM/test-init index 8f7cdf3..fd03aa5 100755 --- a/test/TEST-11-LVM/test-init +++ b/test/TEST-11-LVM/test-init @@ -1,11 +1,17 @@ #!/bin/sh 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 export TERM=linux export PS1='initramfs-test:\w\$ ' -[ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab +[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab +[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab stty sane -echo "made it to the rootfs! Powering down." +echo "made it to the rootfs!" +strstr "$CMDLINE" "rd.shell" && sh -i +echo "Powering down." mount -n -o remount,ro / poweroff -f diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh index 945ca1a..83053ff 100755 --- a/test/TEST-11-LVM/test.sh +++ b/test/TEST-11-LVM/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on LVM PV" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rd.shell" +#DEBUGFAIL="rd.break rd.shell" test_run() { $testdir/run-qemu -hda root.ext2 -m 256M -nographic \ @@ -32,6 +32,7 @@ test_setup() { find_binary plymouth >/dev/null && dracut_install plymouth (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) cp -a /etc/ld.so.conf* $initdir/etc + mkdir $initdir/run sudo ldconfig -r "$initdir" ) diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh index d743e7b..995825b 100755 --- a/test/TEST-14-IMSM/create-root.sh +++ b/test/TEST-14-IMSM/create-root.sh @@ -24,11 +24,11 @@ done udevadm settle sfdisk -g /dev/mapper/isw*Test0 # save a partition at the beginning for future flagging purposes -sfdisk -C 1280 -H 2 -S 32 -L /dev/mapper/isw*Test0 </dev/console 2>&1 echo "dracut-root-block-success" >/dev/sda export TERM=linux @@ -7,6 +10,8 @@ export PS1='initramfs-test:\w\$ ' cat /proc/mdstat [ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab stty sane -echo "made it to the rootfs! Powering down." +echo "made it to the rootfs!" +strstr "$CMDLINE" "rd.shell" && sh -i +echo "Powering down." mount -n -o remount,ro / poweroff -f diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh index 59120b5..2ede87c 100755 --- a/test/TEST-14-IMSM/test.sh +++ b/test/TEST-14-IMSM/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on LVM PV on a isw dmraid" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -DEBUGFAIL="rd.shell" +#DEBUGFAIL="rd.shell rd.break" #DEBUGFAIL="$DEBUGFAIL udev.log-priority=debug" client_run() { @@ -39,8 +39,8 @@ test_run() { test_setup() { # Create the blank file to use as a root filesystem dd if=/dev/zero of=root.ext2 bs=1M count=1 - dd if=/dev/zero of=disk1 bs=1M count=40 - dd if=/dev/zero of=disk2 bs=1M count=40 + dd if=/dev/zero of=disk1 bs=1M count=80 + dd if=/dev/zero of=disk2 bs=1M count=80 kernel=$KVERSION # Create what will eventually be our root filesystem onto an overlay @@ -56,6 +56,7 @@ test_setup() { find_binary plymouth >/dev/null && dracut_install plymouth (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) cp -a /etc/ld.so.conf* $initdir/etc + mkdir $initdir/run sudo ldconfig -r "$initdir" ) -- 2.7.4