strace/tests/strace-ttt.test
Dmitry V. Levin 534a39292a tests: add strace-ttt.test
* tests/strace-ttt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-03-24 01:10:02 +00:00

21 lines
414 B
Bash
Executable File

#!/bin/sh
# Check -ttt option.
. "${srcdir=.}/init.sh"
run_prog_skip_if_failed date +%s > /dev/null
run_prog ./sleep 0
t0="$(date +%s)"
run_strace -ttt -eexecve $args
t1="$(date +%s)"
EXPECTED="$LOG.expected"
cat > "$EXPECTED" << __EOF__
($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
__EOF__
match_grep "$LOG" "$EXPECTED"
rm -f "$EXPECTED"