]> 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 17:01:29 +0000 (17:01 +0000)
commitcc0471439aa0085ca87deccf061c5b676ef12388
tree269a58f4b12201c5b245906dcfd8b2a4719a030d
parent8f5b6a3789a7fcbac0a384b84b4c7ef5994023b6
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