Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 
      3 # Ensure that strace -e trace=set works.
      4 
      5 . "${srcdir=.}/init.sh"
      6 
      7 check_prog ls
      8 check_prog grep
      9 
     10 $STRACE -e execve ls > /dev/null 2> $LOG &&
     11 grep '^execve(' $LOG > /dev/null ||
     12 	{ cat $LOG; fail_ 'strace -e execve does not work'; }
     13 
     14 grep -v '^execve(' $LOG |
     15 LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
     16 	{ cat $LOG; fail_ 'strace -e execve does not work properly'; }
     17 
     18 $STRACE -e trace=process ls > /dev/null 2> $LOG &&
     19 grep '^execve(' $LOG > /dev/null ||
     20 	{ cat $LOG; fail_ 'strace -e trace=process does not work'; }
     21 
     22 grep '^open' $LOG > /dev/null &&
     23 	{ cat $LOG; fail_ 'strace -e trace=process does not work properly'; }
     24 
     25 exit 0
     26