strace/tests/access.test
Fei Jie f914194fc3 tests: add access.test
* tests/access.c: New file.
* tests/access.test: New test.
* tests/.gitignore: Add access.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add access.test.
2016-04-21 17:37:43 +00:00

16 lines
276 B
Bash
Executable File

#!/bin/sh
# Check access syscall decoding.
. "${srcdir=.}/init.sh"
check_prog grep
run_prog > /dev/null
run_strace -eaccess -a30 $args > "$EXP"
# Filter out access() calls made by libc.
grep -F access_sample < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"
rm -f "$EXP" "$OUT"