diff options
author | Xavier Hernandez <jahernan@redhat.com> | 2018-01-19 12:18:13 +0100 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-05-09 09:24:10 +0000 |
commit | aee9e3d27f56e4c0c2f981f20b15189eb7ffce51 (patch) | |
tree | 7b1281112c04cf30577277ad3ae0485f89f0e331 /tests/bugs/distribute | |
parent | 84b7cc57df065e2d8c0ac88b179aab3614ec814a (diff) |
tests: improve and fix some test scripts
Change-Id: Iceefe22af754096c599dc570d4894d14fce4deae
Updates: bz#1193929
Signed-off-by: Xavier Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'tests/bugs/distribute')
-rwxr-xr-x | tests/bugs/distribute/bug-1161311.t | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/bugs/distribute/bug-1161311.t b/tests/bugs/distribute/bug-1161311.t index 9ae4fac342f..62796068928 100755 --- a/tests/bugs/distribute/bug-1161311.t +++ b/tests/bugs/distribute/bug-1161311.t @@ -76,14 +76,12 @@ TEST glusterfs -s $H0 --volfile-id $V0 $M0; TEST mkdir $M0/dir1 TEST mkdir -p $M0/dir2/dir3 -# Create a large file (6.4 GB), so that rebalance takes time -# Reading from /dev/urandom is slow, so we'll cat it together -dd if=/dev/urandom of=/tmp/FILE2 bs=64k count=10240 -for i in {1..10}; do - cat /tmp/FILE2 >> $M0/dir1/FILE2 -done - -#dd if=/dev/urandom of=$M0/dir1/FILE2 bs=64k count=10240 +# Create a large file (8 GB), so that rebalance takes time +# Since we really don't care about the contents of the file, we use fallocate +# to generate the file much faster. We could also use truncate, which is even +# faster, but rebalance could take advantage of an sparse file and migrate it +# in an optimized way, but we don't want a fast migration. +TEST fallocate -l 8G $M0/dir1/FILE2 # Rename the file to create a linkto, for rebalance to # act on the file |