lseek: functional SEEK_HOLE and SEEK_DATA test
This case does functional SEEK_HOLE and SEEK_DATA of lseek(2)
testing.
Since version 3.1, Linux supports the following additional values
for whence:
SEEK_DATA
Adjust the file offset to the next location in the file greater
than or equal to offset containing data. If offset points
to data, then the file offset is set to offset.
SEEK_HOLE
Adjust the file offset to the next hole in the file greater than
or equal to offset. If offset points into the middle of a hole,
then the file offset is set to offset. If there is no hole past
offset, then the file offset is adjusted to the end of the file
(i.e., there is an implicit hole at the end of any file).
This case will cover above description.
Signed-off-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
5 files changed