add strace bundled test cases

This commit is contained in:
Tomoki Shirasawa
2017-11-22 10:52:30 +09:00
parent 43230eb623
commit d273a2f58b
8 changed files with 356 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/sh
# Ensure that strace -e trace=set works.
. "${srcdir=.}/init.sh"
check_strace
check_timeout
check_prog ls
check_prog grep
$TIMEOUT $MCEXEC $STRACE -e execve ls > /dev/null 2> check.log &&
grep '^execve(' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -e execve does not work'; }
grep -v '^execve(' check.log |
LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
{ cat check.log; fail_ 'strace -e execve does not work properly'; }
$TIMEOUT $MCEXEC $STRACE -e trace=process ls > /dev/null 2> check.log &&
grep '^execve(' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -e trace=process does not work'; }
grep '^open' check.log > /dev/null &&
{ cat check.log; fail_ 'strace -e trace=process does not work properly'; }
exit 0