summaryrefslogtreecommitdiff
path: root/test/TEST-12-RAID-DEG
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-04-30 18:54:33 +0200
committerHarald Hoyer <harald@redhat.com>2013-04-30 18:54:33 +0200
commit021b2fddff2db93c9936b0fd241b806c270b830a (patch)
treea39f39e6d3b39a6fa911f8e2323b3e01f8fe8af5 /test/TEST-12-RAID-DEG
parentb6f2e05819d9867b7ca69365091ff480556fcfe9 (diff)
downloaddracut-021b2fddff2db93c9936b0fd241b806c270b830a.tar.gz
dracut-021b2fddff2db93c9936b0fd241b806c270b830a.tar.bz2
dracut-021b2fddff2db93c9936b0fd241b806c270b830a.zip
test: use grep option "-F" and install /etc/os-release
Diffstat (limited to 'test/TEST-12-RAID-DEG')
-rwxr-xr-xtest/TEST-12-RAID-DEG/create-root.sh2
-rwxr-xr-xtest/TEST-12-RAID-DEG/test.sh11
2 files changed, 7 insertions, 6 deletions
diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh
index 07d0b393..5723b0ba 100755
--- a/test/TEST-12-RAID-DEG/create-root.sh
+++ b/test/TEST-12-RAID-DEG/create-root.sh
@@ -39,7 +39,7 @@ udevadm settle
cryptsetup luksClose /dev/mapper/dracut_crypt_test
udevadm settle
mdadm -W /dev/md0 || :
-mdadm --detail --export /dev/md0 |grep MD_UUID > /tmp/mduuid
+mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
. /tmp/mduuid
eval $(udevadm info --query=env --name=/dev/md0|while read line; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} > /dev/sda1
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
index 1eae41aa..1b5e7562 100755
--- a/test/TEST-12-RAID-DEG/test.sh
+++ b/test/TEST-12-RAID-DEG/test.sh
@@ -21,7 +21,7 @@ client_run() {
-net none -kernel /boot/vmlinuz-$KVERSION \
-append "$* root=LABEL=root rw rd.retry=10 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
+ if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
echo "CLIENT TEST END: $@ [FAIL]"
return 1;
fi
@@ -32,7 +32,7 @@ client_run() {
}
test_run() {
- eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
+ eval $(grep -F --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
echo "MD_UUID=$MD_UUID"
read LUKS_UUID < $TESTDIR/luksuuid
@@ -75,6 +75,7 @@ test_setup() {
inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script"
inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup"
dracut_install grep
+ inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && dracut_install plymouth
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
@@ -111,9 +112,9 @@ test_setup() {
-append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
-initrd $TESTDIR/initramfs.makeroot || return 1
- grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
- eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
- eval $(grep -a -m 1 ID_FS_UUID $TESTDIR/root.ext2)
+ 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)
+ eval $(grep -F -a -m 1 ID_FS_UUID $TESTDIR/root.ext2)
echo $ID_FS_UUID > $TESTDIR/luksuuid
(