~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to qa/workunits/snaps/snaptest-1.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash -x
 
2
 
 
3
set -e
 
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
 
 
b'\\ No newline at end of file'