aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/_test_multiprocessing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index a35e527eea4..f74d8d7fbd7 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -5432,6 +5432,14 @@ class TestResourceTracker(unittest.TestCase):
self.assertTrue(is_resource_tracker_reused)
+ def test_too_long_name_resource(self):
+ # gh-96819: Resource names that will make the length of a write to a pipe
+ # greater than PIPE_BUF are not allowed
+ rtype = "shared_memory"
+ too_long_name_resource = "a" * (512 - len(rtype))
+ with self.assertRaises(ValueError):
+ resource_tracker.register(too_long_name_resource, rtype)
+
class TestSimpleQueue(unittest.TestCase):