ceph/qa/workunits/snaps/snaptest-1.sh

29 lines
395 B
Bash
Raw Normal View History

2010-08-06 18:27:15 +00:00
#!/bin/bash -x
2010-04-14 17:08:42 +00:00
set -e
echo 1 > file1
echo 2 > file2
echo 3 > file3
[ -e file4 ] && rm file4
mkdir .snap/snap1
echo 4 > file4
2010-03-16 05:00:58 +00:00
now=`ls`
then=`ls .snap/snap1`
rmdir .snap/snap1
if [ "$now" = "$then" ]; then
2010-02-15 23:28:02 +00:00
echo live and snap contents are identical?
false
2010-03-16 05:00:58 +00:00
fi
# do it again
echo 1 > file1
echo 2 > file2
echo 3 > file3
mkdir .snap/snap1
echo 4 > file4
rmdir .snap/snap1
2010-08-24 23:01:47 +00:00
rm file?
echo OK