mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Merge pull request #1266 from gaul/test/cache-eviction
Test cache eviction
This commit is contained in:
commit
538fbed302
@ -734,6 +734,17 @@ function test_content_type() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# create more files than -o max_stat_cache_size
|
||||||
|
function test_truncate_cache() {
|
||||||
|
for dir in $(seq 2); do
|
||||||
|
mkdir $dir
|
||||||
|
for file in $(seq 75); do
|
||||||
|
touch $dir/$file
|
||||||
|
done
|
||||||
|
ls $dir
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function add_all_tests {
|
function add_all_tests {
|
||||||
if `ps -ef | grep -v grep | grep s3fs | grep -q ensure_diskfree` && ! `uname | grep -q Darwin`; then
|
if `ps -ef | grep -v grep | grep s3fs | grep -q ensure_diskfree` && ! `uname | grep -q Darwin`; then
|
||||||
add_tests test_clean_up_cache
|
add_tests test_clean_up_cache
|
||||||
@ -770,6 +781,7 @@ function add_all_tests {
|
|||||||
add_tests test_open_second_fd
|
add_tests test_open_second_fd
|
||||||
add_tests test_write_multiple_offsets
|
add_tests test_write_multiple_offsets
|
||||||
add_tests test_content_type
|
add_tests test_content_type
|
||||||
|
add_tests test_truncate_cache
|
||||||
}
|
}
|
||||||
|
|
||||||
init_suite
|
init_suite
|
||||||
|
@ -39,6 +39,7 @@ FLAGS=(
|
|||||||
"use_cache=${CACHE_DIR} -o ensure_diskfree=${ENSURE_DISKFREE_SIZE}"
|
"use_cache=${CACHE_DIR} -o ensure_diskfree=${ENSURE_DISKFREE_SIZE}"
|
||||||
enable_content_md5
|
enable_content_md5
|
||||||
enable_noobj_cache
|
enable_noobj_cache
|
||||||
|
max_stat_cache_size=100
|
||||||
nocopyapi
|
nocopyapi
|
||||||
nomultipart
|
nomultipart
|
||||||
notsup_compat_dir
|
notsup_compat_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user