[New-bugs-announce] [issue43843] libregrtest: mark a test as failed if a thread logs an unexpected exception

STINNER Victor report at bugs.python.org
Wed Apr 14 07:20:23 EDT 2021


New submission from STINNER Victor <vstinner at python.org>:

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/threading.py", line 990, in _bootstrap_inner
    self.run()
  File "/usr/home/vstinner/python/master/Lib/threading.py", line 928, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/home/vstinner/python/master/Lib/test/test_logging.py", line 863, in serve_forever
    asyncore.loop(poll_interval, map=self._map)
  File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 203, in loop
    poll_fun(timeout, map)
  File "/usr/home/vstinner/python/master/Lib/asyncore.py", line 144, in poll
    r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor


Attached PR implements this change.

----------
components: Tests
messages: 391059
nosy: vstinner
priority: normal
severity: normal
status: open
title: libregrtest: mark a test as failed if a thread logs an unexpected exception
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43843>
_______________________________________


More information about the New-bugs-announce mailing list