strace/tests/utime.test
Dmitry V. Levin d27cccaeff tests: add utime.test
* tests/utime.c: New file.
* tests/utime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add utime.
(TESTS): Add utime.test.
* tests/.gitignore: Add utime.
2015-07-16 01:36:47 +00:00

24 lines
432 B
Bash
Executable File

#!/bin/sh
# Check decoding of utime syscall.
. "${srcdir=.}/init.sh"
$STRACE -e utime -h > /dev/null ||
skip_ 'utime syscall is not supported on this architecture'
OUT="$LOG.out"
run_prog > /dev/null
run_strace -e utime $args > "$OUT"
check_prog grep
LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || {
rm -f "$OUT"
skip_ 'test executable does not use utime syscall'
}
match_grep "$LOG" "$OUT"
rm -f "$OUT"
exit 0