summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-08-15 15:54:18 +0200
committerHarald Hoyer <harald@redhat.com>2013-08-15 16:05:35 +0200
commit0d6d85b4946f0c028fb06860a1a9c1c298bfb2e0 (patch)
tree2b5d54ec03eca61c60d3d93d5eacf62e5ef6567f
parentbbc9bfe16eeec91f127fdb37d642f6f97f5aa39e (diff)
downloaddracut-0d6d85b4946f0c028fb06860a1a9c1c298bfb2e0.tar.gz
dracut-0d6d85b4946f0c028fb06860a1a9c1c298bfb2e0.tar.bz2
dracut-0d6d85b4946f0c028fb06860a1a9c1c298bfb2e0.zip
resurrect TEST-14-IMSM
-rw-r--r--test/TEST-14-IMSM/99-idesymlinks.rules (renamed from test/old.TEST-14-IMSM/99-idesymlinks.rules)0
-rw-r--r--test/TEST-14-IMSM/Makefile (renamed from test/old.TEST-14-IMSM/Makefile)0
-rwxr-xr-xtest/TEST-14-IMSM/create-root.sh (renamed from test/old.TEST-14-IMSM/create-root.sh)6
-rwxr-xr-xtest/TEST-14-IMSM/cryptroot-ask.sh (renamed from test/old.TEST-14-IMSM/cryptroot-ask.sh)0
-rwxr-xr-xtest/TEST-14-IMSM/hard-off.sh3
-rwxr-xr-xtest/TEST-14-IMSM/test-init.sh (renamed from test/old.TEST-14-IMSM/test-init.sh)0
-rwxr-xr-xtest/TEST-14-IMSM/test.sh (renamed from test/old.TEST-14-IMSM/test.sh)25
-rwxr-xr-xtest/old.TEST-14-IMSM/hard-off.sh3
8 files changed, 20 insertions, 17 deletions
diff --git a/test/old.TEST-14-IMSM/99-idesymlinks.rules b/test/TEST-14-IMSM/99-idesymlinks.rules
index d557790a..d557790a 100644
--- a/test/old.TEST-14-IMSM/99-idesymlinks.rules
+++ b/test/TEST-14-IMSM/99-idesymlinks.rules
diff --git a/test/old.TEST-14-IMSM/Makefile b/test/TEST-14-IMSM/Makefile
index bc0ddb61..bc0ddb61 100644
--- a/test/old.TEST-14-IMSM/Makefile
+++ b/test/TEST-14-IMSM/Makefile
diff --git a/test/old.TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh
index 0716a5c7..83a7fba6 100755
--- a/test/old.TEST-14-IMSM/create-root.sh
+++ b/test/TEST-14-IMSM/create-root.sh
@@ -62,6 +62,10 @@ mount /dev/dracut/root /sysroot && \
cp -a -t /sysroot /source/* && \
umount /sysroot && \
lvm lvchange -a n /dev/dracut/root && \
-echo "dracut-root-block-created" >/dev/sda
+udevadm settle
+mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
+. /tmp/mduuid
+echo "MD_UUID=$MD_UUID"
+{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} > /dev/sda
mdadm --wait-clean /dev/md0
poweroff -f
diff --git a/test/old.TEST-14-IMSM/cryptroot-ask.sh b/test/TEST-14-IMSM/cryptroot-ask.sh
index db27c5b8..db27c5b8 100755
--- a/test/old.TEST-14-IMSM/cryptroot-ask.sh
+++ b/test/TEST-14-IMSM/cryptroot-ask.sh
diff --git a/test/TEST-14-IMSM/hard-off.sh b/test/TEST-14-IMSM/hard-off.sh
new file mode 100755
index 00000000..f340d2d4
--- /dev/null
+++ b/test/TEST-14-IMSM/hard-off.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+getarg rd.shell || poweroff -f
+getarg failme && poweroff -f
diff --git a/test/old.TEST-14-IMSM/test-init.sh b/test/TEST-14-IMSM/test-init.sh
index f434f132..f434f132 100755
--- a/test/old.TEST-14-IMSM/test-init.sh
+++ b/test/TEST-14-IMSM/test-init.sh
diff --git a/test/old.TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
index 434283b1..9353a924 100755
--- a/test/old.TEST-14-IMSM/test.sh
+++ b/test/TEST-14-IMSM/test.sh
@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on LVM PV on a isw dmraid"
KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
-#DEBUGFAIL="rd.shell rd.break"
+#DEBUGFAIL="rd.shell"
#DEBUGFAIL="$DEBUGFAIL udev.log-priority=debug"
client_run() {
@@ -15,7 +15,7 @@ client_run() {
-hdc $TESTDIR/disk2 \
-m 256M -nographic \
-net none -kernel /boot/vmlinuz-$KVERSION \
- -append "$@ root=LABEL=root rw quiet rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \
+ -append "$* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
echo "CLIENT TEST END: $@ [FAIL]"
@@ -28,23 +28,19 @@ client_run() {
}
test_run() {
- client_run rd.md.imsm=0 || return 1
- echo "IMSM test does not work anymore"
- return 0
- client_run || return 1
- client_run rd.dm=0 || return 1
+ read MD_UUID < $TESTDIR/mduuid
+ client_run rd.auto rd.md.imsm=0 || return 1
+ client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 || return 1
# This test succeeds, because the mirror parts are found without
# assembling the mirror itsself, which is what we want
- client_run rd.md=0 rd.md.imsm failme && return 1
- client_run rd.md=0 failme && return 1
+ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 rd.md.imsm failme && return 1
+ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 failme && return 1
# the following test hangs on newer md
- #client_run rd.dm=0 rd.md.imsm rd.md.conf=0 || return 1
+ client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 rd.md.imsm rd.md.conf=0 || return 1
return 0
}
test_setup() {
-# echo "IMSM test does not work anymore"
-# return 1
# Create the blank file to use as a root filesystem
rm -f -- $TESTDIR/root.ext2
@@ -65,6 +61,7 @@ test_setup() {
[ -f ${_terminfodir}/l/linux ] && break
done
inst_multiple -o ${_terminfodir}/l/linux
+ inst_simple /etc/os-release
inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script"
inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup"
inst_multiple grep
@@ -80,7 +77,7 @@ test_setup() {
(
export initdir=$TESTDIR/overlay
. $basedir/dracut-functions.sh
- inst_multiple sfdisk mke2fs poweroff cp umount
+ inst_multiple sfdisk mke2fs poweroff cp umount grep
inst_hook initqueue 01 ./create-root.sh
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
)
@@ -103,6 +100,8 @@ test_setup() {
-append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
+ eval $(grep -F --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
+ echo $MD_UUID > $TESTDIR/mduuid
(
export initdir=$TESTDIR/overlay
. $basedir/dracut-functions.sh
diff --git a/test/old.TEST-14-IMSM/hard-off.sh b/test/old.TEST-14-IMSM/hard-off.sh
deleted file mode 100755
index 12c3d5ac..00000000
--- a/test/old.TEST-14-IMSM/hard-off.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-getarg rd.shell || poweroff -f
-getarg failme && poweroff -f