strace/tests/recvmsg.test
Dmitry V. Levin 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

14 lines
232 B
Bash
Executable File

#!/bin/sh
# Check decoding of recvmsg and sendmsg syscalls.
. "${srcdir=.}/init.sh"
run_prog > /dev/null
OUT="$LOG.out"
run_strace -eread=0 -ewrite=1 -erecvmsg,sendmsg $args > "$OUT"
match_diff "$LOG" "$OUT"
rm -f "$OUT"
exit 0