From 021b2fddff2db93c9936b0fd241b806c270b830a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 30 Apr 2013 18:54:33 +0200 Subject: [PATCH] test: use grep option "-F" and install /etc/os-release --- test/TEST-01-BASIC/test.sh | 5 +++-- test/TEST-02-SYSTEMD/test.sh | 5 +++-- test/TEST-03-USR-MOUNT/test.sh | 5 +++-- test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- test/TEST-10-RAID/test.sh | 7 ++++--- test/TEST-11-LVM/test.sh | 5 +++-- test/TEST-12-RAID-DEG/create-root.sh | 2 +- test/TEST-12-RAID-DEG/test.sh | 11 ++++++----- test/TEST-13-ENC-RAID-LVM/create-root.sh | 2 +- test/TEST-13-ENC-RAID-LVM/test.sh | 11 ++++++----- test/TEST-15-BTRFSRAID/create-root.sh | 10 +++++----- test/TEST-15-BTRFSRAID/test.sh | 6 +++--- test/TEST-16-DMSQUASH/test.sh | 3 ++- test/TEST-20-NFS/test.sh | 4 +++- test/TEST-30-ISCSI/test.sh | 6 ++++-- test/TEST-40-NBD/test.sh | 9 ++++++--- test/TEST-50-MULTINIC/test.sh | 6 ++++-- test/TEST-99-RPM/test.sh | 2 +- test/old.TEST-14-IMSM/test.sh | 4 ++-- 19 files changed, 62 insertions(+), 45 deletions(-) diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh index 84f4b7d..d39556c 100755 --- a/test/TEST-01-BASIC/test.sh +++ b/test/TEST-01-BASIC/test.sh @@ -16,7 +16,7 @@ test_run() { -watchdog i6300esb -watchdog-action poweroff \ -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing || return 1 - grep -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 } test_setup() { @@ -40,6 +40,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 ) @@ -74,7 +75,7 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 ( diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh index 459cf03..c141527 100755 --- a/test/TEST-02-SYSTEMD/test.sh +++ b/test/TEST-02-SYSTEMD/test.sh @@ -12,7 +12,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 } test_setup() { @@ -36,6 +36,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 ) @@ -70,7 +71,7 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 ( diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh index ca7dc12..01a6915 100755 --- a/test/TEST-03-USR-MOUNT/test.sh +++ b/test/TEST-03-USR-MOUNT/test.sh @@ -29,7 +29,7 @@ client_run() { return 1 fi - if ! grep -m 1 -q dracut-root-block-success $TESTDIR/result; then + if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/result; then echo "CLIENT TEST END: $test_name [FAILED]" return 1 fi @@ -68,6 +68,7 @@ test_setup() { inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" dracut_install grep inst_simple ./fstab /etc/fstab + 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 ) @@ -109,7 +110,7 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 ( diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh index d3dc7ef..6c972a3 100755 --- a/test/TEST-04-FULL-SYSTEMD/test.sh +++ b/test/TEST-04-FULL-SYSTEMD/test.sh @@ -30,7 +30,7 @@ client_run() { return 1 fi - if ! grep -m 1 -q dracut-root-block-success $TESTDIR/result; then + if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/result; then echo "CLIENT TEST END: $test_name [FAILED]" return 1 fi @@ -251,7 +251,7 @@ EOF -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 ( diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index e11c518..ffce8fc 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -14,7 +14,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 + grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 } test_setup() { @@ -35,6 +35,7 @@ test_setup() { [ -f ${_terminfodir}/l/linux ] && break done dracut_install -o ${_terminfodir}/l/linux + inst_simple /etc/os-release inst ./test-init.sh /sbin/init inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script" inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" @@ -71,8 +72,8 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 - eval $(grep -a -m 1 ID_FS_UUID $DISKIMAGE) + grep -F -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 + eval $(grep -F -a -m 1 ID_FS_UUID $DISKIMAGE) ( export initdir=$TESTDIR/overlay diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh index d876e55..65cf588 100755 --- a/test/TEST-11-LVM/test.sh +++ b/test/TEST-11-LVM/test.sh @@ -13,7 +13,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 } test_setup() { @@ -34,6 +34,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 ) @@ -65,7 +66,7 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -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 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 ( export initdir=$TESTDIR/overlay . $basedir/dracut-functions.sh diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh index 07d0b39..5723b0b 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 1eae41a..1b5e756 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 ( diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh index c8b6781..c4c7a17 100755 --- a/test/TEST-13-ENC-RAID-LVM/create-root.sh +++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh @@ -48,7 +48,7 @@ cryptsetup luksClose /dev/mapper/dracut_sda4 && \ { echo "dracut-root-block-created" for i in /dev/sda[234]; do - udevadm info --query=env --name=$i|grep 'ID_FS_UUID=' + udevadm info --query=env --name=$i|grep -F 'ID_FS_UUID=' done } >/dev/sda1 poweroff -f diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh index b8fc7ff..93d48a5 100755 --- a/test/TEST-13-ENC-RAID-LVM/test.sh +++ b/test/TEST-13-ENC-RAID-LVM/test.sh @@ -21,7 +21,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 echo "CLIENT TEST END: [OK]" dd if=/dev/zero of=$TESTDIR/check-success.img bs=1M count=1 @@ -34,7 +34,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 echo "CLIENT TEST END: [OK]" dd if=/dev/zero of=$TESTDIR/check-success.img bs=1M count=1 @@ -47,7 +47,7 @@ test_run() { -net none -kernel /boot/vmlinuz-$KVERSION \ -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 echo "CLIENT TEST END: [OK]" return 0 @@ -72,6 +72,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 ) @@ -102,8 +103,8 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -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 - cryptoUUIDS=$(grep --binary-files=text -m 3 ID_FS_UUID $TESTDIR/root.ext2) + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 + cryptoUUIDS=$(grep -F --binary-files=text -m 3 ID_FS_UUID $TESTDIR/root.ext2) for uuid in $cryptoUUIDS; do eval $uuid printf ' rd.luks.uuid=luks-%s ' $ID_FS_UUID diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh index cd51935..69f9280 100755 --- a/test/TEST-15-BTRFSRAID/create-root.sh +++ b/test/TEST-15-BTRFSRAID/create-root.sh @@ -5,15 +5,15 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do done udevadm control --reload # save a partition at the beginning for future flagging purposes -sfdisk -C 655600 -H 2 -S 32 -L /dev/sda </dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd + inst_simple /etc/os-release inst ./server-init.sh /sbin/init inst ./hosts /etc/hosts inst ./dhcpd.conf /etc/dhcpd.conf diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh index 208b784..9ad95b9 100755 --- a/test/TEST-40-NBD/test.sh +++ b/test/TEST-40-NBD/test.sh @@ -64,7 +64,7 @@ client_test() { -append "$cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ -initrd $TESTDIR/initramfs.testing - if [[ $? -ne 0 ]] || ! grep -m 1 -q nbd-OK $TESTDIR/flag.img; then + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" return 1 fi @@ -205,6 +205,7 @@ make_encrypted_root() { done dracut_install -o ${_terminfodir}/l/linux inst ./client-init.sh /sbin/init + inst_simple /etc/os-release find_binary plymouth >/dev/null && dracut_install plymouth cp -a /etc/ld.so.conf* $initdir/etc sudo ldconfig -r "$initdir" @@ -239,8 +240,8 @@ make_encrypted_root() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/flag.img || return 1 - grep -a -m 1 ID_FS_UUID $TESTDIR/flag.img > $TESTDIR/luks.uuid + grep -F -m 1 -q dracut-root-block-created $TESTDIR/flag.img || return 1 + grep -F -a -m 1 ID_FS_UUID $TESTDIR/flag.img > $TESTDIR/luks.uuid } make_client_root() { @@ -262,6 +263,7 @@ make_client_root() { done dracut_install -o ${_terminfodir}/l/linux inst ./client-init.sh /sbin/init + inst_simple /etc/os-release inst /etc/nsswitch.conf /etc/nsswitch.conf inst /etc/passwd /etc/passwd inst /etc/group /etc/group @@ -303,6 +305,7 @@ make_server_root() { type -P dhcpd >/dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd inst ./server-init.sh /sbin/init + inst_simple /etc/os-release inst ./hosts /etc/hosts inst ./dhcpd.conf /etc/dhcpd.conf inst /etc/nsswitch.conf /etc/nsswitch.conf diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh index 5cb0971..e2a8ab9 100755 --- a/test/TEST-50-MULTINIC/test.sh +++ b/test/TEST-50-MULTINIC/test.sh @@ -61,7 +61,7 @@ client_test() { -append "$cmdline $DEBUGFAIL rd.retry=5 rd.info ro console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ -initrd $TESTDIR/initramfs.testing - if [[ $? -ne 0 ]] || ! grep -m 1 -q OK $TESTDIR/client.img; then + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q OK $TESTDIR/client.img; then echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" return 1 fi @@ -69,7 +69,7 @@ client_test() { for i in $check ; do echo $i - if ! grep -m 1 -q $i $TESTDIR/client.img; then + if ! grep -F -m 1 -q $i $TESTDIR/client.img; then echo "CLIENT TEST END: $test_name [FAILED - BAD IF]" return 1 fi @@ -170,6 +170,7 @@ test_setup() { type -P dhcpd >/dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd instmods nfsd sunrpc ipv6 lockd af_packet + inst_simple /etc/os-release inst ./server-init.sh /sbin/init inst ./hosts /etc/hosts inst ./exports /etc/exports @@ -208,6 +209,7 @@ test_setup() { [ -f ${_terminfodir}/l/linux ] && break done dracut_install -o ${_terminfodir}/l/linux + inst_simple /etc/os-release inst ./client-init.sh /sbin/init ( cd "$initdir" diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh index f030cb0..8ae7f8e 100755 --- a/test/TEST-99-RPM/test.sh +++ b/test/TEST-99-RPM/test.sh @@ -53,7 +53,7 @@ find / -xdev -type f -not -path '/var/*' \ -not -path '/boot/*0-rescue*' \ -not -path '/dev/null' \ -exec rpm -qf '{}' ';' | \ - fgrep 'not owned' &> /test.output + grep -F 'not owned' &> /test.output exit EOF diff --git a/test/old.TEST-14-IMSM/test.sh b/test/old.TEST-14-IMSM/test.sh index cd2d715..d69f00d 100755 --- a/test/old.TEST-14-IMSM/test.sh +++ b/test/old.TEST-14-IMSM/test.sh @@ -17,7 +17,7 @@ client_run() { -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" \ -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 @@ -102,7 +102,7 @@ test_setup() { -kernel "/boot/vmlinuz-$kernel" \ -append "root=/dev/dracut/root 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 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 ( export initdir=$TESTDIR/overlay . $basedir/dracut-functions.sh