strace/tests/readv.test
Dmitry V. Levin c422618120 Check dumping of io syscalls when descriptor arguments are sensibly large
* tests/tests.h (pipe_maxfd): New prototype.
* tests/pipe_maxfd.c: New file.
* tests/print_maxfd.c: Likewise.
* tests/.gitignore: Add print_maxfd.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(libtests_a_SOURCES): Add pipe_maxfd.c.
* tests/readv.c (main): Use pipe_maxfd() instead of pipe(),
fds[0] instead of 0, fds[1] instead of 1.
* tests/readv.test: Use print_maxfd to specify dump descriptor numbers.
2016-11-30 00:56:04 +00:00

9 lines
214 B
Bash
Executable File

#!/bin/sh
# Check decoding and dumping of readv and writev syscalls.
. "${srcdir=.}/init.sh"
maxfd="$(./print_maxfd)"
run_strace_match_diff \
-a16 -eread="$(($maxfd - 1))" -ewrite="$maxfd" -e trace=readv,writev