Merge pull request #1119 from ggtakec/osx_direct_io

Added direct_io option for test on osx
This commit is contained in:
Takeshi Nakatani 2019-08-06 11:14:51 +09:00 committed by GitHub
commit b79b0b1a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View File

@ -44,7 +44,7 @@ matrix:
- os: osx
osx_image: xcode9.2
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew tap caskroom/cask
- brew tap caskroom/cask
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install osxfuse
- HOMEBREW_NO_AUTO_UPDATE=1 brew install awscli cppcheck truncate
- if [ -f /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ]; then sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ; elif [ -f /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ]; then sudo chmod +s /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ; fi

View File

@ -152,6 +152,13 @@ function start_s3fs {
VALGRIND_EXEC="valgrind ${VALGRIND} --log-socket=127.0.1.1"
fi
# On OSX only, we need to specify the direct_io flag.
if [ `uname` = "Darwin" ]; then
DIRECT_IO_OPT="-o direct_io"
else
DIRECT_IO_OPT=""
fi
# Common s3fs options:
#
# TODO: Allow all these options to be overridden with env variables
@ -185,6 +192,7 @@ function start_s3fs {
-o use_xattr=1 \
-o createbucket \
${AUTH_OPT} \
${DIRECT_IO_OPT} \
-o dbglevel=${DBGLEVEL:=info} \
-o retries=3 \
-f \

View File

@ -9,9 +9,6 @@ function test_append_file {
describe "Testing append to file ..."
# Write a small test file
if [ `uname` = "Darwin" ]; then
cat /dev/null > ${TEST_TEXT_FILE}
fi
for x in `seq 1 $TEST_TEXT_FILE_LENGTH`
do
echo "echo ${TEST_TEXT} to ${TEST_TEXT_FILE}"
@ -336,9 +333,6 @@ function test_rename_before_close {
function test_multipart_upload {
describe "Testing multi-part upload ..."
if [ `uname` = "Darwin" ]; then
cat /dev/null > $BIG_FILE
fi
dd if=/dev/urandom of="/tmp/${BIG_FILE}" bs=$BIG_FILE_LENGTH count=1
dd if="/tmp/${BIG_FILE}" of="${BIG_FILE}" bs=$BIG_FILE_LENGTH count=1
@ -356,9 +350,6 @@ function test_multipart_upload {
function test_multipart_copy {
describe "Testing multi-part copy ..."
if [ `uname` = "Darwin" ]; then
cat /dev/null > $BIG_FILE
fi
dd if=/dev/urandom of="/tmp/${BIG_FILE}" bs=$BIG_FILE_LENGTH count=1
dd if="/tmp/${BIG_FILE}" of="${BIG_FILE}" bs=$BIG_FILE_LENGTH count=1
mv "${BIG_FILE}" "${BIG_FILE}-copy"