2015-03-09 17:33:47 +00:00
|
|
|
#!/bin/bash
|
2020-08-22 12:40:53 +00:00
|
|
|
#
|
|
|
|
# s3fs - FUSE-based file system backed by Amazon S3
|
|
|
|
#
|
|
|
|
# Copyright 2007-2008 Randy Rizun <rrizun@gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
2015-03-09 17:33:47 +00:00
|
|
|
|
2015-09-11 08:25:37 +00:00
|
|
|
#
|
2016-02-05 12:24:13 +00:00
|
|
|
# Test s3fs-fuse file system operations with
|
2015-09-11 08:25:37 +00:00
|
|
|
#
|
|
|
|
|
2015-03-09 17:33:47 +00:00
|
|
|
set -o errexit
|
2019-07-03 05:31:48 +00:00
|
|
|
set -o pipefail
|
2010-11-13 23:59:23 +00:00
|
|
|
|
2016-02-05 12:24:13 +00:00
|
|
|
source integration-test-common.sh
|
2015-03-09 17:33:47 +00:00
|
|
|
|
2019-06-12 23:35:26 +00:00
|
|
|
CACHE_DIR="/tmp/s3fs-cache"
|
|
|
|
rm -rf "${CACHE_DIR}"
|
|
|
|
mkdir "${CACHE_DIR}"
|
|
|
|
|
2019-09-07 06:23:05 +00:00
|
|
|
source test-utils.sh
|
2022-01-15 17:08:46 +00:00
|
|
|
|
|
|
|
#reserve 200MB for data cache
|
2021-07-22 05:35:54 +00:00
|
|
|
FAKE_FREE_DISK_SIZE=200
|
|
|
|
ENSURE_DISKFREE_SIZE=10
|
2019-09-07 06:23:05 +00:00
|
|
|
|
|
|
|
export CACHE_DIR
|
|
|
|
export ENSURE_DISKFREE_SIZE
|
2021-07-01 23:41:47 +00:00
|
|
|
if [ -n "${ALL_TESTS}" ]; then
|
|
|
|
FLAGS=(
|
2021-07-22 05:35:54 +00:00
|
|
|
"use_cache=${CACHE_DIR} -o ensure_diskfree=${ENSURE_DISKFREE_SIZE} -o fake_diskfree=${FAKE_FREE_DISK_SIZE}"
|
2021-07-01 23:41:47 +00:00
|
|
|
enable_content_md5
|
2022-03-12 07:57:31 +00:00
|
|
|
disable_noobj_cache
|
2022-01-15 17:08:46 +00:00
|
|
|
"max_stat_cache_size=100"
|
2021-07-01 23:41:47 +00:00
|
|
|
nocopyapi
|
|
|
|
nomultipart
|
|
|
|
sigv2
|
|
|
|
sigv4
|
2022-01-15 17:08:46 +00:00
|
|
|
"singlepart_copy_limit=10" # limit size to exercise multipart code paths
|
2021-07-01 23:41:47 +00:00
|
|
|
#use_sse # TODO: S3Proxy does not support SSE
|
|
|
|
)
|
|
|
|
else
|
|
|
|
FLAGS=(
|
|
|
|
sigv4
|
|
|
|
)
|
|
|
|
fi
|
2019-06-12 23:35:26 +00:00
|
|
|
|
2016-02-05 12:24:13 +00:00
|
|
|
start_s3proxy
|
2010-11-13 23:59:23 +00:00
|
|
|
|
2022-01-26 14:42:12 +00:00
|
|
|
if ! aws_cli s3api head-bucket --bucket "${TEST_BUCKET_1}" --region "${S3_ENDPOINT}"; then
|
|
|
|
aws_cli s3 mb "s3://${TEST_BUCKET_1}" --region "${S3_ENDPOINT}"
|
|
|
|
fi
|
2022-01-04 16:59:31 +00:00
|
|
|
|
2019-09-07 06:23:05 +00:00
|
|
|
for flag in "${FLAGS[@]}"; do
|
2022-01-15 17:08:46 +00:00
|
|
|
echo "testing s3fs flag: ${flag}"
|
2019-06-12 23:35:26 +00:00
|
|
|
|
2022-01-15 17:08:46 +00:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
start_s3fs -o ${flag}
|
2019-06-12 23:35:26 +00:00
|
|
|
|
|
|
|
./integration-test-main.sh
|
|
|
|
|
|
|
|
stop_s3fs
|
|
|
|
done
|
2010-12-20 05:26:27 +00:00
|
|
|
|
2019-06-12 23:35:26 +00:00
|
|
|
stop_s3proxy
|
2015-02-24 13:17:59 +00:00
|
|
|
|
2016-02-05 12:24:13 +00:00
|
|
|
echo "$0: tests complete."
|
2020-08-22 12:40:53 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Local variables:
|
|
|
|
# tab-width: 4
|
|
|
|
# c-basic-offset: 4
|
|
|
|
# End:
|
2020-09-15 13:11:14 +00:00
|
|
|
# vim600: expandtab sw=4 ts=4 fdm=marker
|
|
|
|
# vim<600: expandtab sw=4 ts=4
|
2020-08-22 12:40:53 +00:00
|
|
|
#
|