Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/test/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def expected(cur):
# silently converted the limit value to RLIM_INFINITY.
if sys.maxsize < 2**32 <= cur <= resource.RLIM_INFINITY:
return [(resource.RLIM_INFINITY, max), (cur, max)]
# Solaris silently converts limits that do not fit in a signed
# 64-bit integer to RLIM_INFINITY.
if cur >= 2**63-1:
return [(resource.RLIM_INFINITY, max),
(min(cur, resource.RLIM_INFINITY), max)]
return [(min(cur, resource.RLIM_INFINITY), max)]

resource.setrlimit(resource.RLIMIT_FSIZE, (2**31-5, max))
Expand Down
Loading