strace/tests/ioctl_sock_gifconf.test
Eugene Syromyatnikov 589e3285d5 tests: check ioctl(SIOCGIFCONF) decoding
* tests/ioctl_sock_gifconf.c: New file.
* tests/ioctl_sock_gifconf.test: New test.
* tests/.gitignore: Add ioctl_sock_gifconf.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_sock_gifconf.test.
2017-01-04 11:48:11 +00:00

13 lines
243 B
Bash
Executable File

#!/bin/sh
# Check decoding of SIOCGIFCONF ioctl.
. "${srcdir=.}/init.sh"
run_prog > /dev/null
run_strace -a28 -s1 -eioctl $args > "$EXP"
check_prog grep
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"
rm -f "$EXP" "$OUT"