strace/tests/utime.test
Dmitry V. Levin f2e6f3d3c4 tests: extend coverage of utime syscall
* tests/utime.c (main): Check decoding of NULL struct utimbuf pointer.
Check decoding of struct utimbuf located at the end of page boundary.
* tests/utime.test: Update.
2016-02-08 18:18:05 +00:00

24 lines
438 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 -a 16 -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_diff "$LOG" "$OUT"
rm -f "$OUT"
exit 0