From: Victor Lowther Date: Fri, 29 May 2009 22:55:31 +0000 (-0500) Subject: Don't create fully generic initramfs'es in the test framework X-Git-Tag: 0.1~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=333103217d39b4106e55b71f7db8cf8fc585cf24;p=thirdparty%2Fdracut.git Don't create fully generic initramfs'es in the test framework There is no point loading every driver available when we are not testing network functionality and qemu does not even support the stuff we were loading. It just wastes time and space. --- diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index f7abe54d8..34507aab2 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -10,12 +10,13 @@ test_run() { } test_setup() { - # This script creates a root filesystem on an encrypted LVM PV + # Create the blank file to use as a root filesystem dd if=/dev/zero of=root.ext2 bs=1M count=20 - initdir=overlay/source kernel=$(uname -r) + # Create what will eventually be our root filesystem onto an overlay ( + initdir=overlay/source . $basedir/dracut-functions dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient @@ -38,11 +39,10 @@ test_setup() { ) # create an initramfs that will create the target root filesystem. - # We do it this way because creating it directly in the host OS - # results in cryptsetup not being able to unlock the LVM PV. - # Probably a bug in cryptsetup, but... + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. $basedir/dracut -l -i overlay / \ - -m "dash kernel-modules test crypt lvm mdraid udev-rules base rootfs-block" \ + -m "dash crypt lvm mdraid udev-rules base rootfs-block" \ -d "ata_piix ext2 sd_mod" \ -f initramfs.makeroot || return 1 @@ -52,7 +52,10 @@ test_setup() { -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81" \ -initrd initramfs.makeroot || return 1 - sudo $basedir/dracut -l -f initramfs.testing || return 1 + sudo $basedir/dracut -l \ + -m "dash crypt lvm mdraid udev-rules base rootfs-block" \ + -d "ata_piix ext2 sd_mod" \ + -f initramfs.testing || return 1 } test_cleanup() {