mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Test filenames longer than POSIX maximum (#2277)
This commit is contained in:
parent
280ed5d706
commit
9fb4c32c6a
@ -2533,11 +2533,34 @@ function test_time_mountpoint {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_file_names_longer_than_posix() {
|
||||||
|
local DIR_NAME; DIR_NAME=$(basename "${PWD}")
|
||||||
|
a256="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||||
|
#a256="aaaa"
|
||||||
|
|
||||||
|
if ! touch "${a256}"; then
|
||||||
|
echo "could not create long file name"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -f "${a256}"
|
||||||
|
|
||||||
|
echo data | aws_cli s3 cp - "s3://${TEST_BUCKET_1}/${DIR_NAME}/${a256}"
|
||||||
|
# shellcheck disable=SC2012
|
||||||
|
count=$(ls | wc -l)
|
||||||
|
if [ "${count}" = 0 ]; then
|
||||||
|
echo "failed to list long file name"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -f "${a256}"
|
||||||
|
}
|
||||||
|
|
||||||
function add_all_tests {
|
function add_all_tests {
|
||||||
# shellcheck disable=SC2009
|
# shellcheck disable=SC2009
|
||||||
if ps u -p "${S3FS_PID}" | grep -q use_cache; then
|
if ps u -p "${S3FS_PID}" | grep -q use_cache; then
|
||||||
add_tests test_cache_file_stat
|
add_tests test_cache_file_stat
|
||||||
add_tests test_zero_cache_file_stat
|
add_tests test_zero_cache_file_stat
|
||||||
|
else
|
||||||
|
add_tests test_file_names_longer_than_posix
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2009
|
# shellcheck disable=SC2009
|
||||||
if ! ps u -p "${S3FS_PID}" | grep -q ensure_diskfree && ! uname | grep -q Darwin; then
|
if ! ps u -p "${S3FS_PID}" | grep -q ensure_diskfree && ! uname | grep -q Darwin; then
|
||||||
|
Loading…
Reference in New Issue
Block a user