From 778d2ba28bd2a577860d9f451147a2e4f2c178da Mon Sep 17 00:00:00 2001 From: Philippe Seewer Date: Fri, 16 Oct 2009 11:00:03 +0200 Subject: test: Add compatibility for different kernel configs Some distros, including debian unstable with 2.6.30, still shop style ide drivers and/or have important filesystems like ext3 as modules. This patch ensures that all test cases work on these configurations by including the necessary modules and adding a simple udev rule file that provides /dev/sd* symlinks for the case where old style ide drivers are still in use. --- test/TEST-30-ISCSI/99-idesymlinks.rules | 8 ++++++++ test/TEST-30-ISCSI/test.sh | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 test/TEST-30-ISCSI/99-idesymlinks.rules (limited to 'test/TEST-30-ISCSI') diff --git a/test/TEST-30-ISCSI/99-idesymlinks.rules b/test/TEST-30-ISCSI/99-idesymlinks.rules new file mode 100644 index 00000000..d557790a --- /dev/null +++ b/test/TEST-30-ISCSI/99-idesymlinks.rules @@ -0,0 +1,8 @@ +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index b8ffc808..9f28942a 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -82,6 +82,7 @@ test_setup() { . $basedir/dracut-functions dracut_install sfdisk mke2fs poweroff cp umount inst_simple ./create-root.sh /initqueue/01create-root.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) # create an initramfs that will create the target root filesystem. @@ -89,7 +90,7 @@ test_setup() { # devices, volume groups, encrypted partitions, etc. $basedir/dracut -l -i overlay / \ -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ - -d "ata_piix ext2 sd_mod" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -f initramfs.makeroot $KVERSION || return 1 rm -rf overlay @@ -111,11 +112,12 @@ test_setup() { . $basedir/dracut-functions dracut_install poweroff shutdown inst_simple ./hard-off.sh /emergency/01hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) sudo $basedir/dracut -l -i overlay / \ -o "plymouth dmraid" \ -a "debug" \ - -d "ata_piix ext2 sd_mod" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -f initramfs.testing $KVERSION || return 1 # Make server root @@ -159,7 +161,7 @@ test_setup() { # Make server's dracut image $basedir/dracut -l -i overlay / \ -m "dash udev-rules base rootfs-block debug kernel-modules" \ - -d "ata_piix ext2 sd_mod e1000" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \ -f initramfs.server $KVERSION || return 1 } -- cgit v1.2.3