]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
src/seek_sanity_test: fix test15 SEEK_HOLE expected results
authorLuis Henriques <lhenriques@suse.com>
Tue, 23 May 2017 16:19:55 +0000 (17:19 +0100)
committerEryu Guan <eguan@redhat.com>
Tue, 23 May 2017 16:25:47 +0000 (00:25 +0800)
commit890f2b5ae24f5155f93c541a31cccd22c585b75d
tree7fe2a4eaaee3de25a81b56fa593ccd55031c6b8b
parent2d77f85806367be10885ace29faf75fb02264e16
src/seek_sanity_test: fix test15 SEEK_HOLE expected results

Filesystesm with the "default behavior" will always return the
offset of the end of the file when lseek'ing with SEEK_HOLE.  This
test does the following:

 - fallocate 4 << 20 bytes
 - write PAGE_SIZE bytes at offset 0
 - writes PAGE_SIZE bytes at offset 4 << 20

Thus, using lseek in an FS with the "default behavior" will set the
position at 4 << 20 + PAGE_SIZE.

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