From: Otto Moerbeek Date: Wed, 8 May 2024 13:33:49 +0000 (+0200) Subject: Check exit code of recursor X-Git-Tag: rec-5.1.0-beta1~41^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa17a42cd894176c3097929b8cdfa630a0f99efb;p=thirdparty%2Fpdns.git Check exit code of recursor --- diff --git a/regression-tests.recursor-dnssec/recursortests.py b/regression-tests.recursor-dnssec/recursortests.py index ad92db1bf1..59762839ca 100644 --- a/regression-tests.recursor-dnssec/recursortests.py +++ b/regression-tests.recursor-dnssec/recursortests.py @@ -768,6 +768,7 @@ distributor-threads={threads}""".format(confdir=confdir, print("kill...", p, file=sys.stderr) p.kill() p.wait() + return p except OSError as e: # There is a race-condition with the poll() and # kill() statements, when the process is dead on the @@ -782,7 +783,9 @@ distributor-threads={threads}""".format(confdir=confdir, @classmethod def tearDownRecursor(cls): - cls.killProcess(cls._recursor) + p = cls.killProcess(cls._recursor) + if p.returncode != 0: + raise AssertionError('Process exited with return code %d' % (p.returncode)) @classmethod def sendUDPQuery(cls, query, timeout=2.0, decode=True, fwparams=dict()):