Skip to content

Commit 1bd904f

Browse files
committed
revert tests
1 parent c7c497c commit 1bd904f

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

Lib/test/libregrtest/tsan.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
'test_code',
99
'test_enum',
1010
'test_functools',
11-
'test_hashlib',
1211
'test_httpservers',
1312
'test_imaplib',
1413
'test_importlib',

Lib/test/test_hashlib.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff 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

12271200
if __name__ == "__main__":
12281201
unittest.main()

0 commit comments

Comments
 (0)