Blame 0056-TEST-30-ISCSI-convert-to-ext3.patch

Harald Hoyer c671e4
From cbefa470063eedb80da1317566668d8ec03d89c0 Mon Sep 17 00:00:00 2001
Harald Hoyer c671e4
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer c671e4
Date: Mon, 9 Jul 2012 10:16:33 +0200
Harald Hoyer c671e4
Subject: [PATCH] TEST-30-ISCSI: convert to ext3
Harald Hoyer c671e4
Harald Hoyer c671e4
---
Harald Hoyer c671e4
 test/TEST-30-ISCSI/client-init.sh |    2 +-
Harald Hoyer c671e4
 test/TEST-30-ISCSI/create-root.sh |    4 ++--
Harald Hoyer c671e4
 test/TEST-30-ISCSI/test.sh        |   29 +++++++++++++++--------------
Harald Hoyer c671e4
 3 files changed, 18 insertions(+), 17 deletions(-)
Harald Hoyer c671e4
Harald Hoyer c671e4
diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer c671e4
index 1b9d633..e78db27 100755
Harald Hoyer c671e4
--- a/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer c671e4
+++ b/test/TEST-30-ISCSI/client-init.sh
Harald Hoyer c671e4
@@ -6,7 +6,7 @@ export PS1='initramfs-test:\w\$ '
Harald Hoyer c671e4
 stty sane
Harald Hoyer c671e4
 echo "made it to the rootfs! Powering down."
Harald Hoyer c671e4
 while read dev fs fstype opts rest; do
Harald Hoyer c671e4
-    [ "$fstype" != "ext2" ] && continue
Harald Hoyer c671e4
+    [ "$fstype" != "ext3" ] && continue
Harald Hoyer c671e4
     echo "iscsi-OK $dev $fstype $opts" > /dev/sda
Harald Hoyer c671e4
     break
Harald Hoyer c671e4
 done < /proc/mounts
Harald Hoyer c671e4
diff --git a/test/TEST-30-ISCSI/create-root.sh b/test/TEST-30-ISCSI/create-root.sh
Harald Hoyer c671e4
index 2b7cac1..6016320 100755
Harald Hoyer c671e4
--- a/test/TEST-30-ISCSI/create-root.sh
Harald Hoyer c671e4
+++ b/test/TEST-30-ISCSI/create-root.sh
Harald Hoyer c671e4
@@ -5,7 +5,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
Harald Hoyer c671e4
 done
Harald Hoyer c671e4
 rm /etc/lvm/lvm.conf
Harald Hoyer c671e4
 udevadm control --reload-rules
Harald Hoyer c671e4
-mke2fs -F /dev/sda && \
Harald Hoyer c671e4
+mkfs.ext3 -j -F /dev/sda && \
Harald Hoyer c671e4
 mkdir -p /sysroot && \
Harald Hoyer c671e4
 mount /dev/sda /sysroot && \
Harald Hoyer c671e4
 cp -a -t /sysroot /source/* && \
Harald Hoyer c671e4
@@ -16,7 +16,7 @@ lvm pvcreate -ff  -y /dev/md0 && \
Harald Hoyer c671e4
 lvm vgcreate dracut /dev/md0 && \
Harald Hoyer c671e4
 lvm lvcreate -l 100%FREE -n root dracut && \
Harald Hoyer c671e4
 lvm vgchange -ay && \
Harald Hoyer c671e4
-mke2fs -L sysroot /dev/dracut/root && \
Harald Hoyer c671e4
+mkfs.ext3 -j -L sysroot /dev/dracut/root && \
Harald Hoyer c671e4
 mount /dev/dracut/root /sysroot && \
Harald Hoyer c671e4
 cp -a -t /sysroot /source/* && \
Harald Hoyer c671e4
 umount /sysroot && \
Harald Hoyer c671e4
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
Harald Hoyer c671e4
index 5ebd9ac..8c577f0 100755
Harald Hoyer c671e4
--- a/test/TEST-30-ISCSI/test.sh
Harald Hoyer c671e4
+++ b/test/TEST-30-ISCSI/test.sh
Harald Hoyer c671e4
@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem over iSCSI"
Harald Hoyer c671e4
 KVERSION=${KVERSION-$(uname -r)}
Harald Hoyer c671e4
 
Harald Hoyer c671e4
 #DEBUGFAIL="rd.shell"
Harald Hoyer c671e4
-#SERIAL="-serial udp:127.0.0.1:9999"
Harald Hoyer c671e4
+#SERIAL="tcp:127.0.0.1:9999"
Harald Hoyer c671e4
 SERIAL="null"
Harald Hoyer c671e4
 
Harald Hoyer c671e4
 run_server() {
Harald Hoyer c671e4
@@ -12,15 +12,16 @@ run_server() {
Harald Hoyer c671e4
     echo "iSCSI TEST SETUP: Starting DHCP/iSCSI server"
Harald Hoyer c671e4
 
Harald Hoyer c671e4
     $testdir/run-qemu \
Harald Hoyer c671e4
-        -hda $TESTDIR/server.ext2 \
Harald Hoyer c671e4
-        -hdb $TESTDIR/root.ext2 \
Harald Hoyer c671e4
+        -hda $TESTDIR/server.ext3 \
Harald Hoyer c671e4
+        -hdb $TESTDIR/root.ext3 \
Harald Hoyer c671e4
         -hdc $TESTDIR/iscsidisk2.img \
Harald Hoyer c671e4
         -hdd $TESTDIR/iscsidisk3.img \
Harald Hoyer c671e4
         -m 256M -nographic \
Harald Hoyer c671e4
+        -serial $SERIAL \
Harald Hoyer c671e4
         -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
Harald Hoyer c671e4
         -net socket,listen=127.0.0.1:12330 \
Harald Hoyer c671e4
         -kernel /boot/vmlinuz-$KVERSION \
Harald Hoyer c671e4
-        -append "root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
Harald Hoyer c671e4
+        -append "root=/dev/sda rootfstype=ext3 rw rd.debug loglevel=77 console=ttyS0,115200n81 selinux=0" \
Harald Hoyer c671e4
         -initrd $TESTDIR/initramfs.server \
Harald Hoyer c671e4
         -pidfile $TESTDIR/server.pid -daemonize || return 1
Harald Hoyer c671e4
     sudo chmod 644 $TESTDIR/server.pid || return 1
Harald Hoyer c671e4
@@ -94,7 +95,7 @@ test_setup() {
Harald Hoyer c671e4
     fi
Harald Hoyer c671e4
 
Harald Hoyer c671e4
     # Create the blank file to use as a root filesystem
Harald Hoyer c671e4
-    dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=20
Harald Hoyer c671e4
+    dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=20
Harald Hoyer c671e4
     dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=20
Harald Hoyer c671e4
     dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=20
Harald Hoyer c671e4
 
Harald Hoyer c671e4
@@ -119,7 +120,7 @@ test_setup() {
Harald Hoyer c671e4
     (
Harald Hoyer c671e4
         initdir=$TESTDIR/overlay
Harald Hoyer c671e4
         . $basedir/dracut-functions.sh
Harald Hoyer c671e4
-        dracut_install sfdisk mke2fs poweroff cp umount
Harald Hoyer c671e4
+        dracut_install sfdisk mkfs.ext3 poweroff cp umount
Harald Hoyer c671e4
         inst_hook initqueue 01 ./create-root.sh
Harald Hoyer c671e4
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
Harald Hoyer c671e4
     )
Harald Hoyer c671e4
@@ -129,7 +130,7 @@ test_setup() {
Harald Hoyer c671e4
     # devices, volume groups, encrypted partitions, etc.
Harald Hoyer c671e4
     $basedir/dracut.sh -l -i $TESTDIR/overlay / \
Harald Hoyer c671e4
         -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
Harald Hoyer c671e4
-        -d "piix ide-gd_mod ata_piix ext2 sd_mod" \
Harald Hoyer c671e4
+        -d "piix ide-gd_mod ata_piix ext3 sd_mod" \
Harald Hoyer c671e4
         -f $TESTDIR/initramfs.makeroot $KVERSION || return 1
Harald Hoyer c671e4
     rm -rf $TESTDIR/overlay
Harald Hoyer c671e4
 
Harald Hoyer c671e4
@@ -141,13 +142,13 @@ test_setup() {
Harald Hoyer c671e4
     fi
Harald Hoyer c671e4
     # Invoke KVM and/or QEMU to actually create the target filesystem.
Harald Hoyer c671e4
     $testdir/run-qemu \
Harald Hoyer c671e4
-        -hda $TESTDIR/root.ext2 \
Harald Hoyer c671e4
+        -hda $TESTDIR/root.ext3 \
Harald Hoyer c671e4
         -hdb $TESTDIR/client.img \
Harald Hoyer c671e4
         -hdc $TESTDIR/iscsidisk2.img \
Harald Hoyer c671e4
         -hdd $TESTDIR/iscsidisk3.img \
Harald Hoyer c671e4
         -m 256M -nographic -net none \
Harald Hoyer c671e4
         -kernel "/boot/vmlinuz-$kernel" \
Harald Hoyer c671e4
-        -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
Harald Hoyer c671e4
+        -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
Harald Hoyer c671e4
         -initrd $TESTDIR/initramfs.makeroot  || return 1
Harald Hoyer c671e4
     grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1
Harald Hoyer c671e4
     rm $TESTDIR/client.img
Harald Hoyer c671e4
@@ -161,14 +162,14 @@ test_setup() {
Harald Hoyer c671e4
     sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
Harald Hoyer c671e4
         -o "plymouth dmraid" \
Harald Hoyer c671e4
         -a "debug" \
Harald Hoyer c671e4
-        -d "piix ide-gd_mod ata_piix ext2 sd_mod" \
Harald Hoyer c671e4
+        -d "piix ide-gd_mod ata_piix ext3 sd_mod" \
Harald Hoyer c671e4
         -f $TESTDIR/initramfs.testing $KVERSION || return 1
Harald Hoyer c671e4
 
Harald Hoyer c671e4
     # Make server root
Harald Hoyer c671e4
-    dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=60
Harald Hoyer c671e4
-    mke2fs -F $TESTDIR/server.ext2
Harald Hoyer c671e4
+    dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60
Harald Hoyer c671e4
+    mkfs.ext3 -j -F $TESTDIR/server.ext3
Harald Hoyer c671e4
     mkdir $TESTDIR/mnt
Harald Hoyer c671e4
-    sudo mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt
Harald Hoyer c671e4
+    sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
Harald Hoyer c671e4
 
Harald Hoyer c671e4
     kernel=$KVERSION
Harald Hoyer c671e4
     (
Harald Hoyer c671e4
@@ -210,7 +211,7 @@ test_setup() {
Harald Hoyer c671e4
     # Make server's dracut image
Harald Hoyer c671e4
     $basedir/dracut.sh -l -i $TESTDIR/overlay / \
Harald Hoyer c671e4
         -m "dash udev-rules base rootfs-block debug kernel-modules" \
Harald Hoyer c671e4
-        -d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \
Harald Hoyer c671e4
+        -d "piix ide-gd_mod ata_piix ext3 sd_mod e1000" \
Harald Hoyer c671e4
         -f $TESTDIR/initramfs.server $KVERSION || return 1
Harald Hoyer c671e4
 
Harald Hoyer c671e4
 }