]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/utils/httpserver: Rework to avoid hangs and improve logging
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Nov 2018 09:33:28 +0000 (09:33 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Nov 2018 09:33:31 +0000 (09:33 +0000)
commit0762b6021b87ceb1f37952f3a6d64a36e99ae6a5
treeb98100fc37d5a9168e4c07d727ca78fd59145481
parentacac45a6fd604d28ef7c23d67482af3d7e8bcfe3
oeqa/utils/httpserver: Rework to avoid hangs and improve logging

testimage.bbclass installs a SIGTERM handler which conflicts with the
use of multiprocessing here. This is paritcularly problematic if the http
service is terminated before its started and hence before its had a chance
to reset the default signal handler (as the code was written).

Instead, temporarily remove testimage's handler whilst forking the http process
which means the correct handler is installed and won't deadlock.

Also take the opportunity to add in some log messages about the server start
and shutdown so that future debugging is easier and its clearer what the code
is doing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/apt.py
meta/lib/oeqa/runtime/cases/dnf.py
meta/lib/oeqa/runtime/cases/opkg.py
meta/lib/oeqa/utils/httpserver.py