mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 13:25:43 +01:00
udp_proxy wasn't actually killed
This commit is contained in:
parent
a0719727da
commit
a6189f0fb0
@ -181,7 +181,7 @@ wait_server_start() {
|
|||||||
if which lsof >/dev/null; then
|
if which lsof >/dev/null; then
|
||||||
# make sure we don't loop forever
|
# make sure we don't loop forever
|
||||||
( sleep "$DOG_DELAY"; echo "SERVERSTART TIMEOUT"; kill $MAIN_PID ) &
|
( sleep "$DOG_DELAY"; echo "SERVERSTART TIMEOUT"; kill $MAIN_PID ) &
|
||||||
WATCHDOG_PID=$!
|
DOG_PID=$!
|
||||||
|
|
||||||
# make a tight loop, server usually takes less than 1 sec to start
|
# make a tight loop, server usually takes less than 1 sec to start
|
||||||
if [ "$DTLS" -eq 1 ]; then
|
if [ "$DTLS" -eq 1 ]; then
|
||||||
@ -190,8 +190,8 @@ wait_server_start() {
|
|||||||
until lsof -nbi TCP:"$SRV_PORT" | grep LISTEN >/dev/null; do :; done
|
until lsof -nbi TCP:"$SRV_PORT" | grep LISTEN >/dev/null; do :; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kill $WATCHDOG_PID
|
kill $DOG_PID >/dev/null 2>&1
|
||||||
wait $WATCHDOG_PID
|
wait $DOG_PID
|
||||||
else
|
else
|
||||||
sleep "$START_DELAY"
|
sleep "$START_DELAY"
|
||||||
fi
|
fi
|
||||||
@ -206,13 +206,13 @@ wait_client_done() {
|
|||||||
CLI_DELAY_FACTOR=1
|
CLI_DELAY_FACTOR=1
|
||||||
|
|
||||||
( sleep $CLI_DELAY; echo "TIMEOUT" >> $CLI_OUT; kill $CLI_PID ) &
|
( sleep $CLI_DELAY; echo "TIMEOUT" >> $CLI_OUT; kill $CLI_PID ) &
|
||||||
WATCHDOG_PID=$!
|
DOG_PID=$!
|
||||||
|
|
||||||
wait $CLI_PID
|
wait $CLI_PID
|
||||||
CLI_EXIT=$?
|
CLI_EXIT=$?
|
||||||
|
|
||||||
kill $WATCHDOG_PID >/dev/null 2>&1
|
kill $DOG_PID >/dev/null 2>&1
|
||||||
wait $WATCHDOG_PID
|
wait $DOG_PID
|
||||||
|
|
||||||
echo "EXIT: $CLI_EXIT" >> $CLI_OUT
|
echo "EXIT: $CLI_EXIT" >> $CLI_OUT
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ run_test() {
|
|||||||
# run the commands
|
# run the commands
|
||||||
if [ -n "$PXY_CMD" ]; then
|
if [ -n "$PXY_CMD" ]; then
|
||||||
echo "$PXY_CMD" > $PXY_OUT
|
echo "$PXY_CMD" > $PXY_OUT
|
||||||
eval "$PXY_CMD" >> $PXY_OUT 2>&1 &
|
$PXY_CMD >> $PXY_OUT 2>&1 &
|
||||||
PXY_PID=$!
|
PXY_PID=$!
|
||||||
# assume proxy starts faster than server
|
# assume proxy starts faster than server
|
||||||
fi
|
fi
|
||||||
@ -402,11 +402,10 @@ run_test() {
|
|||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f $CLI_OUT $SRV_OUT $PXY_OUT $SESSION
|
rm -f $CLI_OUT $SRV_OUT $PXY_OUT $SESSION
|
||||||
kill $SRV_PID >/dev/null 2>&1
|
test -n "${SRV_PID:-}" && kill $SRV_PID >/dev/null 2>&1
|
||||||
kill $WATCHDOG_PID >/dev/null 2>&1
|
test -n "${PXY_PID:-}" && kill $PXY_PID >/dev/null 2>&1
|
||||||
if [ -n "$PXY_CMD" ]; then
|
test -n "${CLI_PID:-}" && kill $CLI_PID >/dev/null 2>&1
|
||||||
kill $PXY_PID >/dev/null 2>&1
|
test -n "${DOG_PID:-}" && kill $DOG_PID >/dev/null 2>&1
|
||||||
fi
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user