1#!/bin/sh 2 3# Check -t 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 -t -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 22t_reg="($t_reg)" 23 24cat > "$EXP" << __EOF__ 25$t_reg execve\\("\\.\\./sleep", \\["\\.\\./sleep", "0"\\], 0x[[:xdigit:]]* /\\* [[:digit:]]* vars \\*/\\) = 0 26$t_reg \\+\\+\\+ exited with 0 \\+\\+\\+ 27__EOF__ 28 29match_grep "$LOG" "$EXP" 30