Commit Graph

6 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
dc3dfc68b4 Update copyright headers
Headers updated automatically with

    maint/update_copyright_headers.sh -c
2017-09-05 10:09:10 +02:00
38198609df Introduce macros.h
Introduce a separate header file for generic macros shared between
strace and its tests.  Start this unification with ARRAY_SIZE macro.

* defs.h: Include "macros.h".
(ARRAY_SIZE): Move ...
* macros.h: ... to new file.
* Makefile.am (strace_SOURCES): Add it.
* tests/tests.h: Include "macros.h".
(ARRAY_SIZE): Remove.  All callers updated.
2017-07-02 00:11:31 +00:00
Eugene Syromyatnikov
35126cda20 tests: fix "comparison between signed and unsigned" compilation warnings
preadv-pwritev.c: In function 'main':
preadv-pwritev.c:162: warning: comparison between signed and unsigned
readv.c: In function 'main':
readv.c:148: warning: comparison between signed and unsigned
recvmsg.c: In function 'main':
recvmsg.c:148: warning: comparison between signed and unsigned

* tests/preadv-pwritev.c (main): Cast r_len to int.
* tests/readv.c (main): Likewise.
* tests/recvmsg.c (main): Likewise.
2016-11-13 19:30:11 +00:00
4ddbfcfb3c Print struct iovec as a regular structure
* io.c (print_iovec): Print names of iov_base and iov_len fields.
* tests/aio.c (main): Update expected output.
* tests/inet-cmsg.c (main): Likewise.
* tests/mmsg.c (main): Likewise.
* tests/msg_name.c (test_msg_name): Likewise.
* tests/preadv-pwritev.c (main): Likewise.
* tests/preadv2-pwritev2.c (main): Likewise.
* tests/preadv.c (main): Likewise.
* tests/pwritev.c (main): Likewise.
* tests/readv.c (main): Likewise.
* tests/recvmsg.c (main): Likewise.
* tests/vmsplice.c (main): Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/uio.expected: Likewise.
2016-07-13 23:45:20 +00:00
26f90afc68 net.c: print struct msghdr as a regular structure
* net.c (print_msghdr): Print msg_name, msg_namelen, msg_iov,
and msg_iovlen fields like other regular fields.
* tests/inet-cmsg.c (main): Update expected output.
* tests/mmsg.c (main): Likewise.
* tests/recvmsg.c (main): Likewise.
* tests/scm_rights-fd.test: Likewise.
2016-06-26 23:57:39 +00:00
93c9d1cdbd Fix dumping of recvmsg syscall in case of short read
* defs.h (dumpiov_in_msghdr): Add unsigned long argument.
* net.c (dumpiov_in_msghdr): Add data_size argument.  Call dumpiov_upto
instead of dumpiov, pass data_size to dumpiov_upto.
* syscall.c (dumpio): Pass data size limit to dumpiov_in_msghdr.
* NEWS: Mention this fix.
* tests/recvmsg.c: New file.
* tests/recvmsg.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add recvmsg.
(TESTS): Add recvmsg.test.
* tests/.gitignore: Add recvmsg.
2016-01-20 17:35:27 +00:00