2016-07-16 14:10:17 +02:00
|
|
|
#!/bin/bash -eu
|
|
|
|
#
|
|
|
|
# Find out the maximum supported filename length and print it.
|
|
|
|
#
|
|
|
|
# Part of the gocryptfs test suite
|
|
|
|
# https://nuetzlich.net/gocryptfs/
|
|
|
|
|
|
|
|
NAME="maxlen."
|
2016-10-04 10:26:22 +02:00
|
|
|
LEN=0
|
2016-07-16 14:10:17 +02:00
|
|
|
|
|
|
|
while [ $LEN -le 10000 ]; do
|
|
|
|
touch $NAME 2> /dev/null || break
|
|
|
|
rm $NAME
|
2016-10-04 10:26:22 +02:00
|
|
|
LEN=${#NAME}
|
2016-07-16 14:10:17 +02:00
|
|
|
NAME="${NAME}x"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo $LEN
|