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

« back to all changes in this revision

Viewing changes to qa/workunits/snaps/snaptest-snap-rm-cmp.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/sh -x
 
2
 
 
3
set -e
 
4
 
 
5
file=linux-2.6.33.tar.bz2
 
6
wget -q http://ceph.newdream.net/qa/$file
 
7
 
 
8
real=`md5sum $file | awk '{print $1}'`
 
9
 
 
10
for f in `seq 1 20`
 
11
do
 
12
    echo $f
 
13
    cp $file a
 
14
    mkdir .snap/s
 
15
    rm a
 
16
    cp .snap/s/a /tmp/a
 
17
    cur=`md5sum /tmp/a | awk '{print $1}'`
 
18
    if [ "$cur" != "$real" ]; then
 
19
        echo "FAIL: bad match, /tmp/a $cur != real $real"
 
20
        false
 
21
    fi
 
22
    rmdir .snap/s
 
23
done
 
24
rm $file
 
 
b'\\ No newline at end of file'