]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add rd_retry kernel command line parameter
authorHarald Hoyer <harald@redhat.com>
Fri, 16 Apr 2010 14:55:14 +0000 (16:55 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 16 Apr 2010 15:59:50 +0000 (17:59 +0200)
rd_retry=<seconds to retry in the main loop>

speeds up internal test suite

modules.d/99base/init
test/TEST-10-RAID/test.sh
test/TEST-11-LVM/test.sh
test/TEST-12-RAID-DEG/test.sh
test/TEST-13-ENC-RAID-LVM/test.sh
test/TEST-14-IMSM/test.sh
test/TEST-20-NFS/test.sh
test/TEST-30-ISCSI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh

index 1262ae1b7c93efadd3aca0c6b89c9688d435ea13..45033af448066718a9ff0258dbc619c0ff163cf6 100755 (executable)
@@ -150,6 +150,10 @@ udevadm trigger --action=add $udevtriggeropts  >/dev/null 2>&1
 
 getarg 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
 
+RDRETRY=$(getarg 'rd_retry=')
+RDRETRY=${RDRETRY:-20}
+RDRETRY=$(($RDRETRY*2))
+
 i=0
 while :; do
 
@@ -198,7 +202,7 @@ while :; do
     done
     
     i=$(($i+1))
-    [ $i -gt 40 ] \
+    [ $i -gt $RDRETRY ] \
         && { flock -s 9 ; emergency_shell "No root device found"; } 9>/.console_lock
 done
 unset job
index 875f4540455fc6d16c14aa1498006809196e7664..83a461aa8bb074a0ba6d7e84aaa5139e4ead8be2 100755 (executable)
@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
 test_run() {
     $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
        -net none -kernel /boot/vmlinuz-$KVERSION \
-       -append "root=/dev/dracut/root rw quiet rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
+       -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
        -initrd initramfs.testing
     grep -m 1 -q dracut-root-block-success root.ext2 || return 1
 }
index 798b24f30beeb54858bab55a2d38ff1b64d92250..849aeb137cb42dd1ab0eb612aca7840f368e7b29 100755 (executable)
@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
 test_run() {
     $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
        -net none -kernel /boot/vmlinuz-$KVERSION \
-       -append "root=/dev/dracut/root rw quiet rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
+       -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
        -initrd initramfs.testing
     grep -m 1 -q dracut-root-block-success root.ext2 || return 1
 }
index 0d78b93039b4769055c5696c02335095990e15c0..4618c0f6dae65c5f25fc45158797ac18cd0dc477 100755 (executable)
@@ -10,7 +10,7 @@ client_run() {
     echo "CLIENT TEST START: $@"
     $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
        -net none -kernel /boot/vmlinuz-$KVERSION \
-       -append "$@ root=LABEL=root rw quiet rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL " \
+       -append "$@ root=LABEL=root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL " \
        -initrd initramfs.testing
     if ! grep -m 1 -q dracut-root-block-success root.ext2; then
        echo "CLIENT TEST END: $@ [FAIL]"
index 436e42947e986b44d8d0ac7909731d92bafadd72..adb94cb7b445ceb01af6f50c2777ce29014f92f5 100755 (executable)
@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
 test_run() {
     $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
        -net none -kernel /boot/vmlinuz-$KVERSION \
-       -append "root=/dev/dracut/root rw quiet rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
+       -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
        -initrd initramfs.testing
     grep -m 1 -q dracut-root-block-success root.ext2 || return 1
 }
index efddb9aa84f9a359c21623b05a0a371019fe0623..80d4b1b6a5f6d0ecc8795578d89ab0bc763a7225 100755 (executable)
@@ -10,7 +10,7 @@ client_run() {
     echo "CLIENT TEST START: $@"
     $testdir/run-qemu -hda root.ext2 -hdb disk1 -hdc disk2 -m 256M -nographic \
        -net none -kernel /boot/vmlinuz-$KVERSION \
-       -append "$@ root=LABEL=root rw quiet rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \
+       -append "$@ root=LABEL=root rw quiet rd_retry=5 rdinitdebug console=ttyS0,115200n81 selinux=0 rdinfo $DEBUGFAIL" \
        -initrd initramfs.testing
     if ! grep -m 1 -q dracut-root-block-success root.ext2; then
        echo "CLIENT TEST END: $@ [FAIL]"
index 01e1d7a52e06bd539ee819ba15748b6fe5734da5..62aa02ce743244dd33758b751616332291f884c0 100755 (executable)
@@ -46,7 +46,7 @@ client_test() {
        -net nic,macaddr=$mac,model=e1000 \
        -net socket,connect=127.0.0.1:12345 \
        -kernel /boot/vmlinuz-$KVERSION \
-       -append "$cmdline $DEBUGFAIL rdinitdebug rdinfo quiet rdnetdebug ro console=ttyS0,115200n81 selinux=0" \
+       -append "$cmdline $DEBUGFAIL rdinitdebug rd_retry=10 rdinfo quiet rdnetdebug ro console=ttyS0,115200n81 selinux=0" \
        -initrd initramfs.testing
 
     if [[ $? -ne 0 ]] || ! grep -m 1 -q nfs-OK client.img; then
index ba7465abbd8760255bbe58a2681b41cfdc2cdbbb..4dbd6d67d997652b068c1a43c4cfcb1ac662c5d4 100755 (executable)
@@ -37,7 +37,7 @@ run_client() {
        -net nic,macaddr=52:54:00:12:34:00,model=e1000 \
        -net socket,connect=127.0.0.1:12345 \
        -kernel /boot/vmlinuz-$KVERSION \
-       -append "root=dhcp rw quiet rdinitdebug rdinfo rdnetdebug console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \
+       -append "root=dhcp rw quiet rd_retry=5 rdinitdebug rdinfo rdnetdebug console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \
        -initrd initramfs.testing
     grep -m 1 -q iscsi-OK client.img || return 1
 }
index 58d93f34ded0dead1db68c9d7a48a2c630ffbfc3..d84d6573877b02f7ee686a06521173720517a139 100755 (executable)
@@ -13,7 +13,7 @@ run_server() {
     $testdir/run-qemu -hda server.ext2 -hdb nbd.ext2 -hdc encrypted.ext2 \
        -m 256M -nographic \
        -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-       -net socket,mcast=230.0.0.1:1236 \
+       -net socket,listen=127.0.0.1:12345 \
        -serial udp:127.0.0.1:9999 \
        -kernel /boot/vmlinuz-$KVERSION \
        -append "root=/dev/sda rw quiet console=ttyS0,115200n81 selinux=0" \
@@ -48,7 +48,7 @@ client_test() {
 
     $testdir/run-qemu -hda flag.img -m 256M -nographic \
        -net nic,macaddr=$mac,model=e1000 \
-       -net socket,mcast=230.0.0.1:1236 \
+       -net socket,connect=127.0.0.1:12345 \
        -kernel /boot/vmlinuz-$KVERSION \
        -append "$cmdline $DEBUGFAIL rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0" \
        -initrd initramfs.testing
index c3e3eb827372cd7eac354e3a8d3f178b4bddb572..98d4504088975339f2afb8433386ea7a76ea769d 100755 (executable)
@@ -48,7 +48,7 @@ client_test() {
        -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
        -net socket,connect=127.0.0.1:12345 \
        -kernel /boot/vmlinuz-$KVERSION \
-       -append "$cmdline $DEBUGFAIL rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0 rdshell rdcopystate" \
+       -append "$cmdline $DEBUGFAIL rd_retry=5 rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0 rdcopystate" \
        -initrd initramfs.testing
 
     if [[ $? -ne 0 ]] || ! grep -m 1 -q OK client.img; then