Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / qa / workunits / fs / misc / multiple_rsync.sh
1 #!/bin/sh -ex
2
3
4 # Populate with some arbitrary files from the local system.  Take
5 # a copy to protect against false fails from system updates during test.
6 export PAYLOAD=/tmp/multiple_rsync_payload.$$
7 sudo cp -r /usr/lib/ $PAYLOAD
8
9 set -e
10
11 sudo rsync -av $PAYLOAD payload.1
12 sudo rsync -av $PAYLOAD payload.2
13
14 # this shouldn't transfer any additional files
15 echo we should get 4 here if no additional files are transferred
16 sudo rsync -auv $PAYLOAD payload.1 | tee /tmp/$$
17 hexdump -C /tmp/$$
18 wc -l /tmp/$$ | grep 4
19 sudo rsync -auv $PAYLOAD payload.2 | tee /tmp/$$
20 hexdump -C /tmp/$$
21 wc -l /tmp/$$ | grep 4
22 echo OK
23
24 rm /tmp/$$
25 sudo rm -rf $PAYLOAD