tests: add strace-tt.test

* tests/strace-tt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
This commit is contained in:
Дмитрий Левин 2016-03-24 01:03:31 +00:00
parent ac2c43e8e9
commit e4d110df88
2 changed files with 21 additions and 0 deletions

View File

@ -383,6 +383,7 @@ MISC_TESTS = \
strace-T.test \
strace-f.test \
strace-t.test \
strace-tt.test \
vfork-f.test \
# end of MISC_TESTS

20
tests/strace-tt.test Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
# Check -tt option.
. "${srcdir=.}/init.sh"
run_prog_skip_if_failed date +%T > /dev/null
run_prog ./sleep 0
t0="$(date +%T)"
run_strace -tt -eexecve $args
t1="$(date +%T)"
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"