tests: parametrize "sleep 1"
* tests/init.sh (SLEEP_A_BIT): New variable. * tests/detach-sleeping: Use it. * tests/detach-stopped: Likewise.
This commit is contained in:
parent
97c85088a2
commit
1e0a28063f
@ -14,7 +14,7 @@ set -e
|
||||
while ! [ -s set_ptracer_any.out ]; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
fail_ 'set_ptracer_any sleep failed'
|
||||
sleep 1
|
||||
$SLEEP_A_BIT
|
||||
done
|
||||
rm -f set_ptracer_any.out
|
||||
|
||||
@ -33,7 +33,7 @@ $STRACE -p $tracee_pid 2> $LOG &
|
||||
while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
{ cat $LOG; cleanup; fail_ 'strace -p does not work'; }
|
||||
sleep 1
|
||||
$SLEEP_A_BIT
|
||||
done
|
||||
|
||||
kill -INT $!
|
||||
|
@ -14,7 +14,7 @@ set -e
|
||||
while ! [ -s set_ptracer_any.out ]; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
fail_ 'set_ptracer_any sleep failed'
|
||||
sleep 1
|
||||
$SLEEP_A_BIT
|
||||
done
|
||||
rm -f set_ptracer_any.out
|
||||
|
||||
@ -34,13 +34,13 @@ $STRACE -p $tracee_pid 2> $LOG &
|
||||
while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
{ cat $LOG; cleanup; fail_ 'strace -p does not work'; }
|
||||
sleep 1
|
||||
$SLEEP_A_BIT
|
||||
done
|
||||
|
||||
while ! grep -F -e '--- stopped by ' $LOG > /dev/null; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
{ cat $LOG; cleanup; fail_ 'strace -p does not work'; }
|
||||
sleep 1
|
||||
$SLEEP_A_BIT
|
||||
done
|
||||
|
||||
kill -INT $!
|
||||
|
@ -19,3 +19,4 @@ check_prog()
|
||||
|
||||
: "${STRACE:=../strace}"
|
||||
: "${TIMEOUT_DURATION:=60}"
|
||||
: "${SLEEP_A_BIT:=sleep 1}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user