Author vstinner
Recipients vstinner
Date 2021-04-14.11:20:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The Python test runner (libregrtest) should mark a test as failed if a thread logs an unexpected exception, as already done with unraisable exception.

See for example bpo-43842 where test_logging logs the following exception, but the tes is marked as passed:

Exception in thread Thread-25 (serve_forever):
Traceback (most recent call last):
  File "/usr/home/vstinner/python/master/Lib/", line 990, in _bootstrap_inner
  File "/usr/home/vstinner/python/master/Lib/", line 928, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/home/vstinner/python/master/Lib/test/", line 863, in serve_forever
    asyncore.loop(poll_interval, map=self._map)
  File "/usr/home/vstinner/python/master/Lib/", line 203, in loop
    poll_fun(timeout, map)
  File "/usr/home/vstinner/python/master/Lib/", line 144, in poll
    r, w, e =, w, e, timeout)
OSError: [Errno 9] Bad file descriptor

Attached PR implements this change.
Date User Action Args
2021-04-14 11:20:23vstinnersetrecipients: + vstinner
2021-04-14 11:20:23vstinnersetmessageid: <>
2021-04-14 11:20:23vstinnerlinkissue43843 messages
2021-04-14 11:20:23vstinnercreate