Whamcloud - gitweb
Fix bashisms
authorMatthias Andree <matthias.andree@gmx.de>
Fri, 11 May 2012 23:14:30 +0000 (19:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 May 2012 02:13:21 +0000 (22:13 -0400)
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 <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_mmp/script
tests/f_mmp_garbage/script
tests/m_mmp/script
tests/t_mmp_1on/script
tests/t_mmp_2off/script

index 4aca447..3d4a041 100644 (file)
@@ -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
index 8b5a22a..3b2954b 100644 (file)
@@ -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
index b3e206a..a0c9ded 100644 (file)
@@ -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
index 3b0a376..43afe9d 100644 (file)
@@ -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
index 56c6bed..d9a5b3e 100644 (file)
@@ -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