]> 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:20:45 +0000 (14:20 +0000)
commit76444d9765829339986ea3c7f5e3860844d7bfb0
tree5529b4fc37b026ae98e1de87a37d776e2554cd19
parent2ad08001ad477d19bbd9690b501982ab1d3a204a
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.

(cherry picked from commit ec4c92d9d59d1ba0ee3242485965afbaeb62c847)
bin/tests/system/isctest/asyncserver.py