1#!/bin/sh
2
3# Check -tt option.
4
5. "${srcdir=.}/init.sh"
6
7run_prog_skip_if_failed date +%s > "$LOG"
8run_prog_skip_if_failed date +%T --date "@$(cat "$LOG")" > /dev/null
9run_prog ../sleep 0
10
11s0="$(date +%s)"
12run_strace -tt -eexecve $args
13s1="$(date +%s)"
14
15s="$s0"
16t_reg=
17while [ "$s" -le "$s1" ]; do
18	t="$(date +%T --date "@$s")"
19	[ -z "$t_reg" ] && t_reg="$t" || t_reg="$t_reg|$t"
20	s=$(($s + 1))
21done
22
23cat > "$EXP" << __EOF__
24($t_reg)\\.[[:digit:]]{6} execve\\("\\.\\./sleep", \\["\\.\\./sleep", "0"\\], 0x[[:xdigit:]]* /\\* [[:digit:]]* vars \\*/\\) = 0
25__EOF__
26
27match_grep "$LOG" "$EXP"
28