From: Matthias Andree Date: Fri, 11 May 2012 23:14:30 +0000 (-0400) Subject: Fix bashisms X-Git-Tag: v1.42.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21af16f404cc519525040b1c0286a0fff59be750;p=thirdparty%2Fe2fsprogs.git Fix bashisms These break the self-test suite on *BSD, and on some Linux distros where /bin/sh is not implemented by bash. Signed-off-by: Matthias Andree Signed-off-by: Theodore Ts'o --- diff --git a/tests/f_mmp/script b/tests/f_mmp/script index 4aca44752..3d4a04102 100644 --- a/tests/f_mmp/script +++ b/tests/f_mmp/script @@ -5,7 +5,7 @@ rm -f $test_name.failed $test_name.ok > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" -if [ $? == 0 ]; then +if [ $? = 0 ]; then rm -f $TMPFILE echo "skipped for tmpfs (no O_DIRECT support)" return 0 @@ -39,7 +39,7 @@ killall -9 debugfs >> $test_name.log echo "e2fsck (should fail mmp_seq = EXT2_MMP_SEQ_FSCK) ..." >> $test_name.log $FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1 status=$? -if [ "$status" == 0 ] ; then +if [ "$status" = 0 ] ; then echo "e2fsck with MMP as EXT2_MMP_SEQ_FSCK ran!" > $test_name.failed echo "failed" return 1 diff --git a/tests/f_mmp_garbage/script b/tests/f_mmp_garbage/script index 8b5a22a20..3b2954bfd 100644 --- a/tests/f_mmp_garbage/script +++ b/tests/f_mmp_garbage/script @@ -5,7 +5,7 @@ rm -f $test_name.failed $test_name.ok > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" -if [ $? == 0 ] ; then +if [ $? = 0 ] ; then rm -f $TMPFILE echo "skipped for tmpfs (no O_DIRECT support)" return 0 diff --git a/tests/m_mmp/script b/tests/m_mmp/script index b3e206a34..a0c9deda9 100644 --- a/tests/m_mmp/script +++ b/tests/m_mmp/script @@ -5,7 +5,7 @@ export MKE2FS_DEVICE_SECTSIZE TMPFILE=test.img > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" -if [ $? == 0 ]; then +if [ $? = 0 ]; then rm -f $TMPFILE echo "skipped for tmpfs (no O_DIRECT support)" return 0 diff --git a/tests/t_mmp_1on/script b/tests/t_mmp_1on/script index 3b0a3766e..43afe9da1 100644 --- a/tests/t_mmp_1on/script +++ b/tests/t_mmp_1on/script @@ -5,7 +5,7 @@ rm -f $test_name.failed $test_name.ok > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" -if [ $? == 0 ] ; then +if [ $? = 0 ] ; then rm -f $TMPFILE echo "skipped for tmpfs (no O_DIRECT support)" return 0 diff --git a/tests/t_mmp_2off/script b/tests/t_mmp_2off/script index 56c6bedaf..d9a5b3e37 100644 --- a/tests/t_mmp_2off/script +++ b/tests/t_mmp_2off/script @@ -5,7 +5,7 @@ rm -f $test_name.failed $test_name.ok > $TMPFILE stat -f $TMPFILE | grep -q "Type: tmpfs" -if [ $? == 0 ]; then +if [ $? = 0 ]; then rm -f $TMPFILE echo "skipped for tmpfs (no O_DIRECT support)" return 0