1 This patch for a Solaris-specific problem but is a good safety precaution,
2 so although it is not suitable for upstream as-is, we might offer it in a
3 slightly tweaked form at some point in the future.
5 Note that this can also have wrong impact on other tests (e.g., imap which
6 tries to allocate huge chunks of virtual memory).
8 --- Python-3.9.0/Lib/test/libregrtest/setup.py
9 +++ Python-3.9.0/Lib/test/libregrtest/setup.py
10 @@ -60,6 +60,19 @@ def setup_tests(ns):
11 if getattr(module, '__file__', None):
12 module.__file__ = os.path.abspath(module.__file__)
14 + # The socket test goes crazy on Solaris, slurping up VM until the system
15 + # dies or the test is killed. So limit it to 8GB. While we could do this
16 + # in the socket test itself, it is more prudent to do it here in case any
17 + # other tests ever go crazy in a similar fashion.
18 + if sys.platform == 'sunos5':
24 + vm_limit = 8589934592
25 + resource.setrlimit(resource.RLIMIT_VMEM, (vm_limit, vm_limit))
28 unittest.BaseTestSuite._cleanup = False