Test cache eviction

This commit is contained in:
Andrew Gaul 2020-04-11 18:59:24 +09:00
parent 9e01d5b8d1
commit f373df9682
2 changed files with 13 additions and 0 deletions

View File

@ -734,6 +734,17 @@ function test_content_type() {
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 {
if `ps -ef | grep -v grep | grep s3fs | grep -q ensure_diskfree` && ! `uname | grep -q Darwin`; then
add_tests test_clean_up_cache
@ -770,6 +781,7 @@ function add_all_tests {
add_tests test_open_second_fd
add_tests test_write_multiple_offsets
add_tests test_content_type
add_tests test_truncate_cache
}
init_suite

View File

@ -39,6 +39,7 @@ FLAGS=(
"use_cache=${CACHE_DIR} -o ensure_diskfree=${ENSURE_DISKFREE_SIZE}"
enable_content_md5
enable_noobj_cache
max_stat_cache_size=100
nocopyapi
nomultipart
notsup_compat_dir