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 run_strace -e execve ls
      9 
     10 grep '^execve(' "$LOG" > /dev/null ||
     11 	dump_log_and_fail_with "$STRACE $args output mismatch"
     12 
     13 grep -v '^execve(' "$LOG" |
     14 LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
     15 	dump_log_and_fail_with "$STRACE $args unexpected output"
     16 
     17 run_strace -e trace=process ls
     18 
     19 grep '^execve(' "$LOG" > /dev/null ||
     20 	dump_log_and_fail_with "$STRACE $args output mismatch"
     21 
     22 grep '^open' "$LOG" > /dev/null &&
     23 	dump_log_and_fail_with "$STRACE $args unexpected output"
     24 
     25 exit 0
     26