]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test/TEST-11-LVM, test/TEST-14-IMSM: update test cases
authorHarald Hoyer <harald@redhat.com>
Thu, 14 Apr 2011 13:24:50 +0000 (15:24 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 14 Apr 2011 13:24:50 +0000 (15:24 +0200)
- more diskspace
- add /run
- drop to shell in test-init

test/TEST-11-LVM/test-init
test/TEST-11-LVM/test.sh
test/TEST-14-IMSM/create-root.sh
test/TEST-14-IMSM/test-init
test/TEST-14-IMSM/test.sh

index 8f7cdf3a93d266b474b384fbd9be84de06f0b52a..fd03aa5cf1706993bbf17b58927a3448bcf21528 100755 (executable)
@@ -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
index 945ca1a20ca23a3d0c4fa7998ff20eb26272fe96..83053ff96960f06d4131775fbe2d769d9d739fa7 100755 (executable)
@@ -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"
     )
  
index d743e7bf24d8c1086a398197798c4476870a65fc..995825bec70018cd3e88555e7667b48a2e9a1f53 100755 (executable)
@@ -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 <<EOF
+sfdisk -C 2560 -H 2 -S 32 -L /dev/mapper/isw*Test0 <<EOF
 ,1
-,300
-,300
-,300
+,600
+,600
+,600
 EOF
 
 udevadm settle
index ac24398d23f35b3453218fc70c044a3aabf90823..f434f132c4c076b8bf95e39d8edf1e2669fd04ec 100755 (executable)
@@ -1,5 +1,8 @@
 #!/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/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
index 59120b582311cd6f3497b0f271c4a4b33455bde5..2ede87cf41656e0c87856e38db4a0cdb97220a95 100755 (executable)
@@ -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"
     )