strace/tests/statx.sh
Dmitry V. Levin cc2baf339f tests: prepare for detailed testing of stat family syscalls
Parametrize code from fstatat.c to support <asm/stat.h>
as an alternative to <sys/stat.h> and move it to a separate file.

* tests/statx.sh: New file, based on fstatat64.test.
* tests/fstatat64.test: Use it.
* tests/newfstatat.test: Likewise.
* tests/xstatx.c: New file, based on fstatat.c.
* tests/fstatat.c: Use it.
* tests/Makefile.am (EXTRA_DIST): Add statx.sh and xstatx.c.
* tests/fstatat64.c (FSTATAT_NAME): Change to TEST_SYSCALL_NAME.
* tests/newfstatat.c: Likewise.
2015-12-05 00:01:56 +00:00

15 lines
238 B
Bash
Executable File

#!/bin/sh
# Check decoding of stat family syscalls.
. "${srcdir=.}/init.sh"
syscall=${ME_%.test}
run_prog > /dev/null
OUT="$LOG.out"
run_strace -ve$syscall -P$syscall.sample $args > "$OUT"
match_diff "$LOG" "$OUT"
rm -f "$OUT"
exit 0