]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/fs/snaps/snaptest-name-limits.sh
update ceph source to reef 18.1.2
[ceph.git] / ceph / qa / workunits / fs / snaps / snaptest-name-limits.sh
1 #!/bin/bash
2 #
3 # This tests snapshot names limits: names have to be < 240 chars
4 #
5
6 function cleanup ()
7 {
8 rmdir d1/.snap/*
9 rm -rf d1
10 }
11
12 function fail ()
13 {
14 echo $@
15 cleanup
16 exit 1
17 }
18
19 mkdir d1
20
21 longname=$(printf "%.241d" 2)
22 mkdir d1/.snap/$longname 2> /dev/null
23 [ -d d1/.snap/$longname ] && fail "Invalid snapshot exists: $longname"
24
25 cleanup
26
27 echo OK