ceph/qa/workunits/fs/misc/multiple_rsync.sh

26 lines
644 B
Bash
Raw Normal View History

#!/bin/sh -ex
# 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.$$
sudo 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 transferred
sudo rsync -auv $PAYLOAD payload.1 | tee /tmp/$$
qa/workunits/misc/multiple_rsync: put tee output in /tmp 2013-06-25T10:29:15.811 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.2 2013-06-25T10:29:15.811 INFO:teuthology.task.workunit.client.0.err:+ tee a 2013-06-25T10:29:15.902 INFO:teuthology.task.workunit.client.0.out:sending incremental file list 2013-06-25T10:29:48.738 INFO:teuthology.task.workunit.client.0.out: 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.out:sent 1449972 bytes received 7477 bytes 43505.94 bytes/sec 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.out:total size is 3205268241 speedup is 2199.23 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.err:+ hexdump -C a 2013-06-25T10:29:48.741 INFO:teuthology.task.workunit.client.0.out:00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 2013-06-25T10:29:48.741 INFO:teuthology.task.workunit.client.0.out:00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a 73 |...............s| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000020 65 6e 74 20 31 34 34 39 39 37 32 20 62 79 74 65 |ent 1449972 byte| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000030 73 20 20 72 65 63 65 69 76 65 64 20 37 34 37 37 |s received 7477| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000040 20 62 79 74 65 73 20 20 34 33 35 30 35 2e 39 34 | bytes 43505.94| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000050 20 62 79 74 65 73 2f 73 65 63 0a 74 6f 74 61 6c | bytes/sec.total| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000060 20 73 69 7a 65 20 69 73 20 33 32 30 35 32 36 38 | size is 3205268| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000070 32 34 31 20 20 73 70 65 65 64 75 70 20 69 73 20 |241 speedup is | 2013-06-25T10:29:48.743 INFO:teuthology.task.workunit.client.0.out:00000080 32 31 39 39 2e 32 33 0a |2199.23.| 2013-06-25T10:29:48.743 INFO:teuthology.task.workunit.client.0.out:00000088 This passes consistently when the output is in /tmp, but fails after a few iterations when on cephfs+kclient. Avoid the bug with this test. See: #5453 Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-27 05:11:07 +00:00
hexdump -C /tmp/$$
wc -l /tmp/$$ | grep 4
sudo rsync -auv $PAYLOAD payload.2 | tee /tmp/$$
qa/workunits/misc/multiple_rsync: put tee output in /tmp 2013-06-25T10:29:15.811 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.2 2013-06-25T10:29:15.811 INFO:teuthology.task.workunit.client.0.err:+ tee a 2013-06-25T10:29:15.902 INFO:teuthology.task.workunit.client.0.out:sending incremental file list 2013-06-25T10:29:48.738 INFO:teuthology.task.workunit.client.0.out: 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.out:sent 1449972 bytes received 7477 bytes 43505.94 bytes/sec 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.out:total size is 3205268241 speedup is 2199.23 2013-06-25T10:29:48.740 INFO:teuthology.task.workunit.client.0.err:+ hexdump -C a 2013-06-25T10:29:48.741 INFO:teuthology.task.workunit.client.0.out:00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 2013-06-25T10:29:48.741 INFO:teuthology.task.workunit.client.0.out:00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a 73 |...............s| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000020 65 6e 74 20 31 34 34 39 39 37 32 20 62 79 74 65 |ent 1449972 byte| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000030 73 20 20 72 65 63 65 69 76 65 64 20 37 34 37 37 |s received 7477| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000040 20 62 79 74 65 73 20 20 34 33 35 30 35 2e 39 34 | bytes 43505.94| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000050 20 62 79 74 65 73 2f 73 65 63 0a 74 6f 74 61 6c | bytes/sec.total| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000060 20 73 69 7a 65 20 69 73 20 33 32 30 35 32 36 38 | size is 3205268| 2013-06-25T10:29:48.742 INFO:teuthology.task.workunit.client.0.out:00000070 32 34 31 20 20 73 70 65 65 64 75 70 20 69 73 20 |241 speedup is | 2013-06-25T10:29:48.743 INFO:teuthology.task.workunit.client.0.out:00000080 32 31 39 39 2e 32 33 0a |2199.23.| 2013-06-25T10:29:48.743 INFO:teuthology.task.workunit.client.0.out:00000088 This passes consistently when the output is in /tmp, but fails after a few iterations when on cephfs+kclient. Avoid the bug with this test. See: #5453 Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-27 05:11:07 +00:00
hexdump -C /tmp/$$
wc -l /tmp/$$ | grep 4
echo OK
rm /tmp/$$
sudo rm -rf $PAYLOAD