src/seek_sanity_test: ensure file size is big enough
authorLuis Henriques <lhenriques@suse.com>
Mon, 8 May 2017 15:12:27 +0000 (16:12 +0100)
committerEryu Guan <eguan@redhat.com>
Tue, 9 May 2017 02:57:53 +0000 (10:57 +0800)
commit763008fd88006594ce9be81fefccd655046fdc59
treefce837bca363eeb90e1beecec1f7c1a1d5f75db6
parent904a46958ca0352d6370572723f20a13b5ecf6f5
src/seek_sanity_test: ensure file size is big enough

Tests test07, test08, and test09 preallocate a file and assume the
file size used is bigger than 10xbufsz (100xbufsz for test09).  This
patch adjusts the file size so this assumption is always true.

As an example, here's test07 output for cephfs, where the allocation
size is set to 4194304, and the output is (4194304 * 10 + 4194304)

  07. Test file with unwritten extents, only have dirty pages
  07.01 SEEK_HOLE expected 0 or 4194304, got 46137344.              FAIL
  07.02 SEEK_HOLE expected 1 or 4194304, got 46137344.              FAIL

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/seek_sanity_test.c