mirror of
https://github.com/ceph/ceph
synced 2025-02-25 12:03:00 +00:00
Snapshot names have to be keep bellow 240 characters, otherwise the long snapshot names (_<SNAPSHOT-NAME>_<INODE-NUMBER>) will become too big. Add new testcase to check that the MDS limits snapshot names. Signed-off-by: Luís Henriques <lhenriques@suse.de>
28 lines
351 B
Bash
Executable File
28 lines
351 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# This tests snapshot names limits: names have to be < 240 chars
|
|
#
|
|
|
|
function cleanup ()
|
|
{
|
|
rmdir d1/.snap/*
|
|
rm -rf d1
|
|
}
|
|
|
|
function fail ()
|
|
{
|
|
echo $@
|
|
cleanup
|
|
exit 1
|
|
}
|
|
|
|
mkdir d1
|
|
|
|
longname=$(printf "%.241d" 2)
|
|
mkdir d1/.snap/$longname 2> /dev/null
|
|
[ -d d1/.snap/$longname ] && fail "Invalid snapshot exists: $longname"
|
|
|
|
cleanup
|
|
|
|
echo OK
|