8000 tests/extmod/select_poll_fd.py: disable fd limit test · EternityForest/circuitpython@b94815c · GitHub
[go: up one dir, main page]

Skip to content

Commit b94815c

Browse files
committed
tests/extmod/select_poll_fd.py: disable fd limit test
1 parent 342f7a9 commit b94815c

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

tests/extmod/select_poll_fd.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,21 @@
3737
# Test registering a very large number of file descriptors (will trigger
3838
# EINVAL due to more than OPEN_MAX fds). Typically it's 1024 (and on GitHub CI
3939
# we force this via `ulimit -n 1024`).
40-
# CIRCUITPY-CHANGE: set max number of file descriptors here
41-
try:
42-
import resource
43-
resource.setrlimit(resource.RLIMIT_NOFILE, (1024, 1024))
44-
except ImportError:
45-
pass
46-
poller = select.poll()
47-
for fd in range(6000):
48-
poller.register(fd)
49-
try:
50-
poller.poll()
51-
assert False
52-
except OSError as er:
53-
print(er.errno == errno.EINVAL)
40+
# CIRCUITPY-CHANGE: Skip this test. poller.poll() does not have a limit and will `assert False`
41+
# The ulimit change in the micropython tests may not be working properly.
42+
# on GitHub CI, the limit is far larger than 6000. It is 1024 on desktop Ubuntu, but
43+
# higher on the runners. I don't think this test is testing what it means to test.
44+
# poller = select.poll()
45+
# fd_last = 0
46+
# for fd in range(6000):
47+
# fd_last = fd
48+
# poller.register(fd)
49+
# try:
50+
# poller.poll()
51+
# assert False
52+
# except OSError as er:
53+
# print("fd_last", fd_last)
54+
# print(er.errno == errno.EINVAL)
5455

5556
# Register stdout/stderr, plus many extra ones to trigger the fd vector
5657
# resizing. Then unregister the excess ones and verify poll still works.

0 commit comments

Comments
 (0)
0