New submission from Ned Deily:
======================================================================
ERROR: test_above_fd_setsize (test.test_selectors.PollSelectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/support/__init__.py",
line 485, in wrapper
return func(*args, **kw)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_selectors.py",
line 312, in test_above_fd_setsize
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
ValueError: current limit exceeds maximum limit
======================================================================
ERROR: test_above_fd_setsize (test.test_selectors.KqueueSelectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/support/__init__.py",
line 485, in wrapper
return func(*args, **kw)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_selectors.py",
line 312, in test_above_fd_setsize
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
ValueError: current limit exceeds maximum limit
----------------------------------------------------------------------
Ran 58 tests in 8.080s
FAILED (errors=2, skipped=12)
Looking at the OS X man page for setrlimit(2), it appears the test's strategy
of trying to set the soft RLIMIT_NOFILE to the hard RLIMIT_NOFILE ceiling will
fail on OS X (at least) if the hard limit is infinite:
>>> import resource
>>> resource.getrlimit(resource.RLIMIT_NOFILE)
(2560, 9223372036854775807)
>From the man page:
COMPATIBILITY
setrlimit() now returns with errno set to EINVAL in places that
historically
succeeded. It no longer accepts "rlim_cur = RLIM_INFINITY" for
RLIM_NOFILE.
Use "rlim_cur = min(OPEN_MAX, rlim_max)".
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/setrlimit.2.html
----------
components: Tests
messages: 197189
nosy: ned.deily, neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: test_selectors test_above_fd_setsize cases fail on OS X due to infinite
hard limit
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18963>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com