sparsify: Relax test constraint (RHBZ#1079210).

As long as over ~300MB is recovered, declare sparsification to be
successful in this test.

It looks as if the journal or other metadata takes up a variable
amount of space after sparsification.
This commit is contained in:
Richard W.M. Jones
2014-04-08 10:05:34 +01:00
parent 466885b226
commit 595bd5022a

View File

@@ -67,7 +67,11 @@ if [ $size_before -lt 310000 ]; then
exit 1
fi
if [ $size_after -gt 15000 ]; then
# The space we're expecting to recover is 300 + 10 MB, so as long as
# size_before - size_after > 300000 it shows we have recovered the
# majority of the file space and sparsification is working. (RHBZ#1079210)
if [ $((size_before-size_after)) -le 300000 ]; then
echo "test virt-sparsify --in-place: size_after ($size_after) too large"
echo "sparsification failed"
exit 1