strace/tests/fstat.test
Dmitry V. Levin c863827ddb tests: add fstat.test and fstat64.test
* tests/fstat.c: New file.
* tests/fstat64.c: Likewise.
* tests/fstatx.c: Likewise.
* tests/fstat.test: New test.
* tests/fstat64.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add fstat and fstat64.
(fstat64_CFLAGS): Define.
(TESTS): Add fstat.test and fstat64.test.
(EXTRA_DIST): Add fstatx.c.
* tests/.gitignore: Add fstat and fstat64.
2015-12-05 00:02:44 +00:00

21 lines
379 B
Bash
Executable File

#!/bin/sh
# Check fstat syscall decoding.
. "${srcdir=.}/init.sh"
# strace -P is implemented using /proc/self/fd
[ -d /proc/self/fd/ ] ||
framework_skip_ '/proc/self/fd/ is not available'
syscall=${ME_%.test}
run_prog > /dev/null
OUT="$LOG.out"
sample=$syscall.sample
> "$sample"
run_strace -ve$syscall -P$sample $args > "$OUT"
match_diff "$LOG" "$OUT"
rm -f "$OUT"
exit 0