Commit Graph

6 Commits

Author SHA1 Message Date
96a9ff5746 tests: do not include <errno.h> unnecessarily
Automatically change tests/*.c files using the following script:

for f in tests/*.c; do
	grep -Fv errno.h "$f" |
	grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' ||
		sed -i '/# *include *<errno\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
cf1cfe13be tests/preadv-pwritev.c: cleanup 2016-04-21 22:05:56 +00:00
9f6611bb31 tests: use errno2name()
Automatically change tests/*.c files using the following sed regexp:
sed -i 's/errno == E[[:alnum:]]\+ ? "E[[:alnum:]]\+" : "E[[:alnum:]]\+"/errno2name()/g'
2016-04-21 18:16:50 +00:00
f73a3a44dd 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.
2016-04-20 01:08:13 +00:00
fe0d07a1bc tests/preadv-pwritev.c: fix typo in error diagnostics
* tests/preadv-pwritev.c (main): Fix typo in error message.
2016-04-02 01:04:57 +00:00
3f6ebceb50 Implement dumping of preadv and pwritev syscalls
* syscall.c (dumpio): Add SEN_preadv and SEN_pwritev.
* NEWS: Mention this.
* tests/preadv-pwritev.c: New file.
* tests/preadv-pwritev.test: New test.
* tests/.gitignore: Add preadv-pwritev.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(preadv_pwritev_CPPFLAGS): New variable.
(DECODER_TESTS): Add preadv-pwritev.
2016-03-31 00:01:58 +00:00