1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/apps/public/strace-4.16/tests-mx32/strace-ttt.test
2024-07-22 01:58:46 -03:00

27 lines
490 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
s0="$(date +%s)"
run_strace -ttt -eexecve $args
s1="$(date +%s)"
s="$s0"
t_reg=
while [ "$s" -le "$s1" ]; do
[ -z "$t_reg" ] && t_reg="$s" || t_reg="$t_reg|$s"
s=$(($s + 1))
done
cat > "$EXP" << __EOF__
($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
__EOF__
match_grep "$LOG" "$EXP"
rm -f "$EXP"