add rd_retry kernel command line parameter

rd_retry=<seconds to retry in the main loop>

speeds up internal test suite
master
Harald Hoyer 2010-04-16 16:55:14 +02:00
parent 0c88742669
commit 85fd75f91f
10 changed files with 15 additions and 11 deletions

View File

@ -150,6 +150,10 @@ udevadm trigger --action=add $udevtriggeropts >/dev/null 2>&1


getarg 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" getarg 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"


RDRETRY=$(getarg 'rd_retry=')
RDRETRY=${RDRETRY:-20}
RDRETRY=$(($RDRETRY*2))

i=0 i=0
while :; do while :; do


@ -198,7 +202,7 @@ while :; do
done done
i=$(($i+1)) i=$(($i+1))
[ $i -gt 40 ] \ [ $i -gt $RDRETRY ] \
&& { flock -s 9 ; emergency_shell "No root device found"; } 9>/.console_lock && { flock -s 9 ; emergency_shell "No root device found"; } 9>/.console_lock
done done
unset job unset job

View File

@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
test_run() { test_run() {
$testdir/run-qemu -hda root.ext2 -m 256M -nographic \ $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
grep -m 1 -q dracut-root-block-success root.ext2 || return 1 grep -m 1 -q dracut-root-block-success root.ext2 || return 1
} }

View File

@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
test_run() { test_run() {
$testdir/run-qemu -hda root.ext2 -m 256M -nographic \ $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
grep -m 1 -q dracut-root-block-success root.ext2 || return 1 grep -m 1 -q dracut-root-block-success root.ext2 || return 1
} }

View File

@ -10,7 +10,7 @@ client_run() {
echo "CLIENT TEST START: $@" echo "CLIENT TEST START: $@"
$testdir/run-qemu -hda root.ext2 -m 256M -nographic \ $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
if ! grep -m 1 -q dracut-root-block-success root.ext2; then if ! grep -m 1 -q dracut-root-block-success root.ext2; then
echo "CLIENT TEST END: $@ [FAIL]" echo "CLIENT TEST END: $@ [FAIL]"

View File

@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)}
test_run() { test_run() {
$testdir/run-qemu -hda root.ext2 -m 256M -nographic \ $testdir/run-qemu -hda root.ext2 -m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
grep -m 1 -q dracut-root-block-success root.ext2 || return 1 grep -m 1 -q dracut-root-block-success root.ext2 || return 1
} }

View File

@ -10,7 +10,7 @@ client_run() {
echo "CLIENT TEST START: $@" echo "CLIENT TEST START: $@"
$testdir/run-qemu -hda root.ext2 -hdb disk1 -hdc disk2 -m 256M -nographic \ $testdir/run-qemu -hda root.ext2 -hdb disk1 -hdc disk2 -m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
if ! grep -m 1 -q dracut-root-block-success root.ext2; then if ! grep -m 1 -q dracut-root-block-success root.ext2; then
echo "CLIENT TEST END: $@ [FAIL]" echo "CLIENT TEST END: $@ [FAIL]"

View File

@ -46,7 +46,7 @@ client_test() {
-net nic,macaddr=$mac,model=e1000 \ -net nic,macaddr=$mac,model=e1000 \
-net socket,connect=127.0.0.1:12345 \ -net socket,connect=127.0.0.1:12345 \
-kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing


if [[ $? -ne 0 ]] || ! grep -m 1 -q nfs-OK client.img; then if [[ $? -ne 0 ]] || ! grep -m 1 -q nfs-OK client.img; then

View File

@ -37,7 +37,7 @@ run_client() {
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \ -net nic,macaddr=52:54:00:12:34:00,model=e1000 \
-net socket,connect=127.0.0.1:12345 \ -net socket,connect=127.0.0.1:12345 \
-kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing
grep -m 1 -q iscsi-OK client.img || return 1 grep -m 1 -q iscsi-OK client.img || return 1
} }

View File

@ -13,7 +13,7 @@ run_server() {
$testdir/run-qemu -hda server.ext2 -hdb nbd.ext2 -hdc encrypted.ext2 \ $testdir/run-qemu -hda server.ext2 -hdb nbd.ext2 -hdc encrypted.ext2 \
-m 256M -nographic \ -m 256M -nographic \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \ -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 \ -serial udp:127.0.0.1:9999 \
-kernel /boot/vmlinuz-$KVERSION \ -kernel /boot/vmlinuz-$KVERSION \
-append "root=/dev/sda rw quiet console=ttyS0,115200n81 selinux=0" \ -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 \ $testdir/run-qemu -hda flag.img -m 256M -nographic \
-net nic,macaddr=$mac,model=e1000 \ -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 \ -kernel /boot/vmlinuz-$KVERSION \
-append "$cmdline $DEBUGFAIL rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0" \ -append "$cmdline $DEBUGFAIL rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0" \
-initrd initramfs.testing -initrd initramfs.testing

View File

@ -48,7 +48,7 @@ client_test() {
-net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
-net socket,connect=127.0.0.1:12345 \ -net socket,connect=127.0.0.1:12345 \
-kernel /boot/vmlinuz-$KVERSION \ -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 -initrd initramfs.testing


if [[ $? -ne 0 ]] || ! grep -m 1 -q OK client.img; then if [[ $? -ne 0 ]] || ! grep -m 1 -q OK client.img; then