From: Tatsuo Ishii Date: Tue, 12 Jun 2018 06:21:52 +0000 (+0900) Subject: Fix 055.backend_all_down test failure. X-Git-Tag: V3_3_22~5 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e0b08239ddb6061b04a86562912fdedfbca9f75d;p=pgpool2.git Fix 055.backend_all_down test failure. The test fails because pgpool zombie child process remains. Actually the failover process is properly performed but when the shutdown script is executed in background, output to stdout/stderr was blocked, and this could cause the zombie process syndrome. Soltution is, redirecting stdout/stderr to /dev/null when sponing the shutdown script in background. --- diff --git a/test/regression/tests/055.backend_all_down/test.sh b/test/regression/tests/055.backend_all_down/test.sh index f9497a886..8e4836b30 100755 --- a/test/regression/tests/055.backend_all_down/test.sh +++ b/test/regression/tests/055.backend_all_down/test.sh @@ -33,15 +33,23 @@ while true do grep "failover done. shutdown host $PGSOCKET_DIR(11001)" log/pgpool.log > /dev/null 2>&1 if [ $? = 0 ];then + echo "shutdown detected" break; fi + + grep "failover: no backends are degenerated" log/pgpool.log > /dev/null 2>&1 + if [ $? = 0 ];then + echo "no backend to degenerate detected" + break; + fi + sleep 1 done # if that's the case, shutdownall will hang. -(./shutdownall)& +(./shutdownall) >/dev/null 2>&1 & sleep 5 -kill $! +kill $pid if [ $? = 0 ];then ./shutdownall