]> granicus.if.org Git - strace/commit
tests: adjust readv/writev and preadv/pwritev tests to older kernels
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 19 Apr 2016 21:10:44 +0000 (21:10 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 20 Apr 2016 01:08:13 +0000 (01:08 +0000)
commitf73a3a44dd62a331c88a63d4b0756274ea3084aa
tree78241bc803e3df1286c27de5efcef1697cddd391
parent87c0b56a77c35f09e03c7c70980ae84ae2f3aea0
tests: adjust readv/writev and preadv/pwritev tests to older kernels

With linux kernels older than v3.16-rc1, iovec based compat syscalls may
return EINVAL in some cases where on later kernels they return EFAULT.
Adjust tests to handle both cases properly.

* tests/preadv-pwritev.c: Include <errno.h>.
(main): Print either "EINVAL" or "EFAULT" depending on errno.
* tests/pwritev.c: Likewise.
* tests/readv.c: Likewise.
tests/preadv-pwritev.c
tests/pwritev.c
tests/readv.c