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
|
|
|
|
|
|
|
# Require root
|
|
|
|
REQUIRE_ROOT=require-root.sh
|
2015-01-12 22:46:24 +00:00
|
|
|
#source $REQUIRE_ROOT
|
2015-03-09 17:33:47 +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
|
|
|
#reserve 200MB for data cache
|
|
|
|
source test-utils.sh
|
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
|
|
|
|
enable_noobj_cache
|
|
|
|
max_stat_cache_size=100
|
|
|
|
nocopyapi
|
|
|
|
nomultipart
|
|
|
|
notsup_compat_dir
|
|
|
|
sigv2
|
|
|
|
sigv4
|
|
|
|
singlepart_copy_limit=10 # limit size to exercise multipart code paths
|
|
|
|
#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
|
|
|
|
2019-09-07 06:23:05 +00:00
|
|
|
for flag in "${FLAGS[@]}"; do
|
2019-06-12 23:35:26 +00:00
|
|
|
echo "testing s3fs flag: $flag"
|
|
|
|
|
|
|
|
start_s3fs -o $flag
|
|
|
|
|
|
|
|
./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
|
|
|
#
|