]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Check exit code of recursor
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 8 May 2024 13:33:49 +0000 (15:33 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 13 May 2024 14:23:04 +0000 (16:23 +0200)
regression-tests.recursor-dnssec/recursortests.py

index ad92db1bf1ca74b07859773df8b289e625adeac3..59762839ca025fd2c3257073a3132fb010eca51c 100644 (file)
@@ -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()):