-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ceph#4831 from ceph/wip-11807
qa: fix multiple_rsync.sh to avoid using /usr/ directly Reviewed-by: Greg Farnum <[email protected]> Reviewed-by: Sage Weil <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
#!/bin/sh -ex | ||
|
||
sudo rsync -av --exclude local/ /usr/ usr.1 | ||
sudo rsync -av --exclude local/ /usr/ usr.2 | ||
|
||
# Populate with some arbitrary files from the local system. Take | ||
# a copy to protect against false fails from system updates during test. | ||
export PAYLOAD=/tmp/multiple_rsync_payload.$$ | ||
cp -r /usr/lib/ $PAYLOAD | ||
|
||
set -e | ||
|
||
sudo rsync -av $PAYLOAD payload.1 | ||
sudo rsync -av $PAYLOAD payload.2 | ||
|
||
# this shouldn't transfer any additional files | ||
echo we should get 4 here if no additional files are transfered | ||
sudo rsync -auv --exclude local/ /usr/ usr.1 | tee /tmp/$$ | ||
sudo rsync -auv $PAYLOAD payload.1 | tee /tmp/$$ | ||
hexdump -C /tmp/$$ | ||
wc -l /tmp/$$ | grep 4 | ||
sudo rsync -auv --exclude local/ /usr/ usr.2 | tee /tmp/$$ | ||
sudo rsync -auv $PAYLOAD payload.2 | tee /tmp/$$ | ||
hexdump -C /tmp/$$ | ||
wc -l /tmp/$$ | grep 4 | ||
rm /tmp/$$ | ||
|
||
echo OK | ||
|
||
rm -rf $PAYLOAD |