strace/tests/strace-t.test
Dmitry V. Levin ac2c43e8e9 tests: add strace-t.test
* tests/strace-t.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-03-24 00:59:32 +00:00

21 lines
393 B
Bash
Executable File

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