- Fix test to speed up common.sh script kill_pid.

This commit is contained in:
W.C.A. Wijngaards 2025-04-04 11:37:42 +02:00
parent a7e618b9c2
commit 4074a5b2ba
2 changed files with 4 additions and 0 deletions

View file

@ -3,6 +3,7 @@
- Fix comment name in the rpz nsdname test. - Fix comment name in the rpz nsdname test.
- Fix nettle compile for warnings and ticket keys. - Fix nettle compile for warnings and ticket keys.
- Fix redis_replica test for unused option defaults and log printout. - Fix redis_replica test for unused option defaults and log printout.
- Fix test to speed up common.sh script kill_pid.
4 April 2025: Yorgos 4 April 2025: Yorgos
- Merge #1019: Redis read-only replica support. - Merge #1019: Redis read-only replica support.

3
testdata/common.sh vendored
View file

@ -309,6 +309,7 @@ kill_pid () {
local WAIT_THRES=30 local WAIT_THRES=30
local try local try
kill $1 kill $1
sleep .001
for (( try=0 ; try <= $MAX_DOWN_TRY ; try++ )) ; do for (( try=0 ; try <= $MAX_DOWN_TRY ; try++ )) ; do
if kill -0 $1 >/dev/null 2>&1; then if kill -0 $1 >/dev/null 2>&1; then
: :
@ -322,6 +323,8 @@ kill_pid () {
fi fi
if test $try -ge $WAIT_THRES; then if test $try -ge $WAIT_THRES; then
sleep 1 sleep 1
else
sleep .01
fi fi
# re-send the signal # re-send the signal
kill $1 >/dev/null 2>&1 kill $1 >/dev/null 2>&1