From 21af16f404cc519525040b1c0286a0fff59be750 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 11 May 2012 19:14:30 -0400 Subject: [PATCH] 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 --- tests/f_mmp/script | 4 ++-- tests/f_mmp_garbage/script | 2 +- tests/m_mmp/script | 2 +- tests/t_mmp_1on/script | 2 +- tests/t_mmp_2off/script | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/f_mmp/script b/tests/f_mmp/script index 4aca447..3d4a041 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 8b5a22a..3b2954b 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 b3e206a..a0c9ded 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 3b0a376..43afe9d 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 56c6bed..d9a5b3e 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 -- 1.8.3.1