Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 
      3 # Check -ff option.
      4 
      5 . "${srcdir=.}/init.sh"
      6 
      7 run_prog_skip_if_failed \
      8 	kill -0 $$
      9 
     10 ../set_ptracer_any ../sleep 3 > "$OUT" &
     11 tracee_pid=$!
     12 
     13 while ! [ -s "$OUT" ]; do
     14 	kill -0 $tracee_pid 2> /dev/null ||
     15 		fail_ 'set_ptracer_any sleep failed'
     16 done
     17 
     18 run_strace -a14 -eexit_group -ff -p $tracee_pid
     19 
     20 # check that output matches
     21 match_diff "$LOG.$tracee_pid"
     22 
     23 # check that no other output files have been created
     24 set -- "$LOG".*
     25 [ "$LOG.$tracee_pid" = "$*" ] ||
     26 	fail_ "too many output files: $*"
     27