strace/tests/syslog-success.test
Eugene Syromyatnikov cfc3e07033 tests: add syslog-success test
* tests/.gitignore: Add syslog-success
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add syslog-success.test.
* tests/syslog-success.c: New file.
* tests/syslog-success.test: New test.
* tests/syslog.c: Add support for running under syscall retval
injection, add checks.
2018-09-27 07:24:03 +02:00

12 lines
264 B
Bash
Executable File

#!/bin/sh -efu
. "${srcdir=.}/scno_tampering.sh"
run_prog ../syslog-success 0
for i in 0 23 42; do
run_strace -a35 -e trace=syslog -e inject=syslog:retval="${i}" \
../syslog-success "${i}" > "$EXP.$i"
mv "$LOG" "$LOG.$i"
match_diff "$LOG.$i" "$EXP.$i"
done