mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
GH-112536: Add more TSan tests (#116911)
These may all exercise some non-trivial aspects of thread synchronization.
This commit is contained in:
parent
649857a157
commit
b8d808ddd7
2 changed files with 8 additions and 2 deletions
|
|
@ -2,6 +2,9 @@
|
||||||
# chosen because they use threads and run in a reasonable amount of time.
|
# chosen because they use threads and run in a reasonable amount of time.
|
||||||
|
|
||||||
TSAN_TESTS = [
|
TSAN_TESTS = [
|
||||||
|
# TODO: enable more of test_capi once bugs are fixed (GH-116908, GH-116909).
|
||||||
|
'test_capi.test_mem',
|
||||||
|
'test_capi.test_pyatomic',
|
||||||
'test_code',
|
'test_code',
|
||||||
'test_enum',
|
'test_enum',
|
||||||
'test_functools',
|
'test_functools',
|
||||||
|
|
@ -11,6 +14,9 @@ TSAN_TESTS = [
|
||||||
'test_io',
|
'test_io',
|
||||||
'test_logging',
|
'test_logging',
|
||||||
'test_queue',
|
'test_queue',
|
||||||
|
'test_signal',
|
||||||
|
'test_socket',
|
||||||
|
'test_sqlite3',
|
||||||
'test_ssl',
|
'test_ssl',
|
||||||
'test_syslog',
|
'test_syslog',
|
||||||
'test_thread',
|
'test_thread',
|
||||||
|
|
|
||||||
|
|
@ -1287,8 +1287,8 @@ check_pyobject_forbidden_bytes_is_freed(PyObject *self,
|
||||||
static PyObject *
|
static PyObject *
|
||||||
check_pyobject_freed_is_freed(PyObject *self, PyObject *Py_UNUSED(args))
|
check_pyobject_freed_is_freed(PyObject *self, PyObject *Py_UNUSED(args))
|
||||||
{
|
{
|
||||||
/* This test would fail if run with the address sanitizer */
|
/* ASan or TSan would report an use-after-free error */
|
||||||
#ifdef _Py_ADDRESS_SANITIZER
|
#if defined(_Py_ADDRESS_SANITIZER) || defined(_Py_THREAD_SANITIZER)
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
#else
|
#else
|
||||||
PyObject *op = PyObject_CallNoArgs((PyObject *)&PyBaseObject_Type);
|
PyObject *op = PyObject_CallNoArgs((PyObject *)&PyBaseObject_Type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue