test_helpers: generate file of correct length
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 26 Nov 2012 10:13:36 +0000 (12:13 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 26 Nov 2012 12:05:45 +0000 (14:05 +0200)
commitab5abd774e67ec838cf5ce566e59fd6d29e43e56
tree81fe336d5ae8ed4808a48eeac02d6c08da1f1a8a
parent3ea0e67cb6a5754ed986d0c949329c22fda8b3ab
test_helpers: generate file of correct length

The 'create_random_sparse_file()' alwasy generates files of the length aligned
to block size, even when the requested size is unaligned. Fix this by adding a
truncation at the end.

Change-Id: Id3b7f8f0e6c1d9f11aa68d06d4883b8227991e50
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
tests/test_helpers.py