tests: fix parallel-tests support in detach-* tests

* tests/detach-sleeping: Use $LOG file for set_ptracer_any output.
* tests/detach-stopped: Likewise.
This commit is contained in:
Дмитрий Левин 2013-06-18 22:31:58 +00:00
parent 1e0a28063f
commit 3cb7a0cd00
2 changed files with 8 additions and 6 deletions

View File

@ -9,14 +9,14 @@ check_prog grep
set -e
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > set_ptracer_any.out &
rm -f $LOG
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
while ! [ -s set_ptracer_any.out ]; do
while ! [ -s $LOG ]; do
kill -0 $! 2> /dev/null ||
fail_ 'set_ptracer_any sleep failed'
$SLEEP_A_BIT
done
rm -f set_ptracer_any.out
tracee_pid=$!
@ -28,6 +28,7 @@ cleanup()
wait $tracee_pid 2> /dev/null
}
rm -f $LOG
$STRACE -p $tracee_pid 2> $LOG &
while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do

View File

@ -9,14 +9,14 @@ check_prog grep
set -e
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > set_ptracer_any.out &
rm -f $LOG
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
while ! [ -s set_ptracer_any.out ]; do
while ! [ -s $LOG ]; do
kill -0 $! 2> /dev/null ||
fail_ 'set_ptracer_any sleep failed'
$SLEEP_A_BIT
done
rm -f set_ptracer_any.out
tracee_pid=$!
kill -STOP $tracee_pid
@ -29,6 +29,7 @@ cleanup()
wait $tracee_pid 2> /dev/null
}
rm -f $LOG
$STRACE -p $tracee_pid 2> $LOG &
while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do