File tree Expand file tree Collapse file tree 2 files changed +0
-28
lines changed
Expand file tree Collapse file tree 2 files changed +0
-28
lines changed Original file line number Diff line number Diff line change 88 'test_code' ,
99 'test_enum' ,
1010 'test_functools' ,
11- 'test_hashlib' ,
1211 'test_httpservers' ,
1312 'test_imaplib' ,
1413 'test_importlib' ,
Original file line number Diff line number Diff line change @@ -1196,33 +1196,6 @@ def test_file_digest(self):
11961196 with open (os_helper .TESTFN , "wb" ) as f :
11971197 hashlib .file_digest (f , "sha256" )
11981198
1199- # There was a data race in py_digest_by_name() which caused tsan to
1200- # complain and might sometimes cause an extra refcount in `PY_EVP_MD`
1201- # structure if two threads attempted to create a `sha256()` at the same
1202- # time. See gh-128657.
1203- @unittest .skipUnless (support .Py_GIL_DISABLED ,
1204- "only meaningful on free-threading" )
1205- def test_py_digest_by_name_data_race (self ):
1206- def test_hashlib_sha256 ():
1207- hash_obj = hashlib .sha256 ()
1208-
1209- def closure (barrier ):
1210- barrier .wait ()
1211- test_hashlib_sha256 ()
1212-
1213- num_workers = 40
1214- barrier = threading .Barrier (num_workers )
1215-
1216- with threading_helper .catch_threading_exception () as cm :
1217- threads = [threading .Thread (target = closure , args = (barrier ,))
1218- for _ in range (num_workers )]
1219-
1220- with threading_helper .start_threads (threads ):
1221- pass
1222-
1223- if cm .exc_value :
1224- raise cm .exc_value
1225-
12261199
12271200if __name__ == "__main__" :
12281201 unittest .main ()
You can’t perform that action at this time.
0 commit comments