mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-09-27 16:59:01 +00:00
Prefer = over == for older shell compatibility (#1857)
This commit is contained in:
parent
2892d3b755
commit
6300859c80
@ -108,7 +108,7 @@ function retry {
|
|||||||
for i in $(seq $N); do
|
for i in $(seq $N); do
|
||||||
echo "Trying: $*"
|
echo "Trying: $*"
|
||||||
eval $@; rc=$?
|
eval $@; rc=$?
|
||||||
if [ $rc == 0 ]; then
|
if [ $rc = 0 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -262,7 +262,7 @@ function test_chmod {
|
|||||||
|
|
||||||
# if they're the same, we have a problem.
|
# if they're the same, we have a problem.
|
||||||
local CHANGED_PERMISSIONS=$(get_permissions $TEST_TEXT_FILE)
|
local CHANGED_PERMISSIONS=$(get_permissions $TEST_TEXT_FILE)
|
||||||
if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ]
|
if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ]
|
||||||
then
|
then
|
||||||
echo "Could not modify $TEST_TEXT_FILE permissions"
|
echo "Could not modify $TEST_TEXT_FILE permissions"
|
||||||
return 1
|
return 1
|
||||||
@ -299,9 +299,9 @@ function test_chown {
|
|||||||
else
|
else
|
||||||
local CHANGED_PERMISSIONS=$(stat --format=%u:%g $TEST_TEXT_FILE)
|
local CHANGED_PERMISSIONS=$(stat --format=%u:%g $TEST_TEXT_FILE)
|
||||||
fi
|
fi
|
||||||
if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ]
|
if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ]
|
||||||
then
|
then
|
||||||
if [ $ORIGINAL_PERMISSIONS == "1000:1000" ]
|
if [ $ORIGINAL_PERMISSIONS = "1000:1000" ]
|
||||||
then
|
then
|
||||||
echo "Could not be strict check because original file permission 1000:1000"
|
echo "Could not be strict check because original file permission 1000:1000"
|
||||||
else
|
else
|
||||||
|
@ -115,7 +115,7 @@ function check_file_size() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mk_test_file {
|
function mk_test_file {
|
||||||
if [ $# == 0 ]; then
|
if [ $# = 0 ]; then
|
||||||
local TEXT=$TEST_TEXT
|
local TEXT=$TEST_TEXT
|
||||||
else
|
else
|
||||||
local TEXT=$1
|
local TEXT=$1
|
||||||
@ -144,7 +144,7 @@ function mk_test_file {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rm_test_file {
|
function rm_test_file {
|
||||||
if [ $# == 0 ]; then
|
if [ $# = 0 ]; then
|
||||||
local FILE=$TEST_TEXT_FILE
|
local FILE=$TEST_TEXT_FILE
|
||||||
else
|
else
|
||||||
local FILE=$1
|
local FILE=$1
|
||||||
@ -178,7 +178,7 @@ function rm_test_dir {
|
|||||||
# Create and cd to a unique directory for this test run
|
# Create and cd to a unique directory for this test run
|
||||||
# Sets RUN_DIR to the name of the created directory
|
# Sets RUN_DIR to the name of the created directory
|
||||||
function cd_run_dir {
|
function cd_run_dir {
|
||||||
if [ "$TEST_BUCKET_MOUNT_POINT_1" == "" ]; then
|
if [ "$TEST_BUCKET_MOUNT_POINT_1" = "" ]; then
|
||||||
echo "TEST_BUCKET_MOUNT_POINT_1 variable not set"
|
echo "TEST_BUCKET_MOUNT_POINT_1 variable not set"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -240,7 +240,7 @@ function run_suite {
|
|||||||
TEST_DIR=testdir-$RANDOM
|
TEST_DIR=testdir-$RANDOM
|
||||||
$t $key_prefix && rc=$? || rc=$?
|
$t $key_prefix && rc=$? || rc=$?
|
||||||
|
|
||||||
if [[ $rc == 0 ]] ; then
|
if [[ $rc = 0 ]] ; then
|
||||||
report_pass $t
|
report_pass $t
|
||||||
else
|
else
|
||||||
report_fail $t
|
report_fail $t
|
||||||
|
Loading…
Reference in New Issue
Block a user