strace/tests/mmsg.test
Dmitry V. Levin 19d10f8965 mmsg.test: fix regression introduced by commit v4.11-138-g6e815ce
This fixes the test on platforms where both __NR_sendmmsg and
HAVE_SENDMMSG are defined but the former is not implemented by the
kernel and the second is implemented as an indirect syscall.

* tests/mmsg.c (LENGTH_OF): New macro.
(send_mmsg, recv_mmsg): Print expected output in case of ENOSYS.
(main): Redirect stdout to a new descriptor.  Use LENGTH_OF.
Print expected output.
* tests/mmsg.test: Update.
* tests/mmsg.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove mmsg.expected.
2016-01-14 00:06:20 +00:00

14 lines
243 B
Bash
Executable File

#!/bin/sh
# Check how iovecs in struct mmsghdr are decoded.
. "${srcdir=.}/init.sh"
run_prog > /dev/null
OUT="$LOG.out"
run_strace -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 $args > "$OUT"
match_diff "$LOG" "$OUT"
rm -f "$OUT"
exit 0