]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/fs/snaps/snaptest-1.sh
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / qa / workunits / fs / snaps / snaptest-1.sh
1 #!/usr/bin/env bash
2
3 set -ex
4
5 echo 1 > file1
6 echo 2 > file2
7 echo 3 > file3
8 [ -e file4 ] && rm file4
9 mkdir .snap/snap1
10 echo 4 > file4
11 now=`ls`
12 then=`ls .snap/snap1`
13 rmdir .snap/snap1
14 if [ "$now" = "$then" ]; then
15 echo live and snap contents are identical?
16 false
17 fi
18
19 # do it again
20 echo 1 > file1
21 echo 2 > file2
22 echo 3 > file3
23 mkdir .snap/snap1
24 echo 4 > file4
25 rmdir .snap/snap1
26
27 rm file?
28
29 echo OK