strace/tests/net-tpacket_stats-success.test
Zhibin Li 49f45ff291 tests: check decoding of getsockopt(PACKET_STATISTICS)
* tests/net-tpacket_stats.c: New file.
* tests/net-tpacket_stats-success.c: Likewise.
* tests/gen_tests.in (net-tpacket_stats): New test.
* tests/net-tpacket_stats-success.test: Likewise.
* tests/.gitignore: Add net-tpacket_stats and net-tpacket_stats-success.
* tests/Makefile.am (check_PROGRAMS): Add net-tpacket_stats-success.
(DECODER_TESTS): Add net-tpacket_stats-success.test.
* tests/pure_executables.list: Add net-tpacket_stats.
2018-08-01 14:57:16 +00:00

7 lines
177 B
Bash
Executable File

#!/bin/sh -efu
. "${srcdir=.}/scno_tampering.sh"
run_strace -e trace=getsockopt -e inject=getsockopt:retval=42 ../net-tpacket_stats-success > "$EXP"
match_diff "$LOG" "$EXP"