]> git.ipfire.org Git - thirdparty/bind9.git/commit
Ensure uncaught exceptions kill custom servers
authorMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:14:57 +0000 (09:14 -0500)
committerMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:14:57 +0000 (09:14 -0500)
commitec4c92d9d59d1ba0ee3242485965afbaeb62c847
tree2a9b770041978f3c84b6b944c5d4a56e800b4905
parentb571c084db16c882f9536d150aa3e0f7c3f4be06
Ensure uncaught exceptions kill custom servers

Uncaught exceptions raised by tasks running on event loops are not
handled by Python's default exception handler, so they do not cause
scripts to die immediately with a non-zero exit code.  Set up an
exception handler for AsyncServer code that makes any uncaught exception
the result of the Future that the top-level coroutine awaits.  This
ensures that any uncaught exceptions cause scripts based on AsyncServer
to immediately exit with an error, enabling the system test framework to
fail tests in which custom servers encounter unforeseen problems.
bin/tests/system/isctest/asyncserver.py