syscalls: new test writev07

Verify writev() behaviour with partially valid iovec list.
Kernel <4.8 used to shorten write up to first bad invalid
iovec. Starting with 4.8, a writev with short data (under
page size) is likely to get shorten to 0 bytes and return
EFAULT.

This test doesn't make assumptions how much will write get
shortened. It only tests that file content/offset after
syscall corresponds to return value of writev().

See: [RFC] writev() semantics with invalid iovec in the middle
     https://marc.info/?l=linux-kernel&m=147388891614289&w=2

This test is meant to be replacement for writev03/writev04
and part of writev01, which all deal with partially invalid
iovec lists, and all currently fail with 4.8 kernel.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
5 files changed