From 3e4ab73cd44cba7021412bef661d8c3d91cacfb2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 2 Mar 2013 13:24:21 +0100 Subject: [PATCH] test: make testsuite work with systemd --- test/TEST-10-RAID/test.sh | 4 +++- test/TEST-12-RAID-DEG/test.sh | 9 ++++++--- test/TEST-13-ENC-RAID-LVM/test.sh | 10 ++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index f01de93..be28e21 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -5,6 +5,7 @@ KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures #DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" +#DEBUGFAIL="rd.debug rd.break=pre-mount rd.shell" test_run() { DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img $testdir/run-qemu \ @@ -68,7 +69,7 @@ test_setup() { -hda $DISKIMAGE \ -m 256M -nographic -net none \ -kernel "/boot/vmlinuz-$kernel" \ - -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 eval $(grep -a -m 1 ID_FS_UUID $DISKIMAGE) @@ -81,6 +82,7 @@ test_setup() { inst ./cryptroot-ask.sh /sbin/cryptroot-ask mkdir -p $initdir/etc echo "luks-$ID_FS_UUID /dev/md0 /etc/key" > $initdir/etc/crypttab + #echo "luks-$ID_FS_UUID /dev/md0 none" > $initdir/etc/crypttab echo -n "test" > $initdir/etc/key inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh index c2442d3..0354705 100755 --- a/test/TEST-12-RAID-DEG/test.sh +++ b/test/TEST-12-RAID-DEG/test.sh @@ -4,8 +4,10 @@ TEST_DESCRIPTION="root filesystem on an encrypted LVM PV on a degraded RAID-5" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rd.shell" +#DEBUGFAIL="rd.shell rd.break rd.debug" #DEBUGFAIL="rd.shell rd.break=pre-mount udev.log-priority=debug" +#DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" +#DEBUGFAIL="rd.shell loglevel=70 systemd.log_target=kmsg" client_run() { echo "CLIENT TEST START: $@" @@ -17,7 +19,7 @@ client_run() { -hdc $TESTDIR/disk2.img.new \ -hdd $TESTDIR/disk3.img.new \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "$* root=LABEL=root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ + -append "$* root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ -initrd $TESTDIR/initramfs.testing if ! grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then echo "CLIENT TEST END: $@ [FAIL]" @@ -37,6 +39,7 @@ test_run() { client_run failme && return 1 client_run rd.auto || return 1 + client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.md.conf=0 rd.lvm.vg=dracut || return 1 client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=failme rd.md.conf=0 rd.lvm.vg=dracut failme && return 1 @@ -127,7 +130,7 @@ test_setup() { ) sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -o "plymouth network systemd" \ + -o "plymouth network" \ -a "debug" \ -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -f $TESTDIR/initramfs.testing $KVERSION || return 1 diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh index a267975..e5d3939 100755 --- a/test/TEST-13-ENC-RAID-LVM/test.sh +++ b/test/TEST-13-ENC-RAID-LVM/test.sh @@ -4,7 +4,9 @@ TEST_DESCRIPTION="root filesystem on LVM on encrypted partitions of a RAID-5" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rd.shell" # udev.log-priority=debug +#DEBUGFAIL="rd.shell rd.break" # udev.log-priority=debug +#DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg systemd.log_target=debug" +#DEBUGFAIL="rd.shell loglevel=70 systemd.log_target=kmsg systemd.log_target=debug" test_run() { LUKSARGS=$(cat $TESTDIR/luks.txt) @@ -17,7 +19,7 @@ test_run() { -hdb $TESTDIR/check-success.img \ -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $LUKSARGS $DEBUGFAIL" \ + -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 echo "CLIENT TEST END: [OK]" @@ -119,13 +121,13 @@ test_setup() { i=2 for uuid in $cryptoUUIDS; do eval $uuid - printf 'luks-%s /dev/sda%s /etc/key\n' $ID_FS_UUID $i + printf 'luks-%s /dev/sda%s /etc/key timeout=0\n' $ID_FS_UUID $i ((i+=1)) done > $initdir/etc/crypttab echo -n test > $initdir/etc/key ) sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -o "plymouth network systemd" \ + -o "plymouth network" \ -a "debug" \ -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -f $TESTDIR/initramfs.testing $KVERSION || return 1 -- 2.7.4