Skip to content

Commit 29216d7

Browse files
committed
asyncio update; set fd max in test
1 parent 4d72d6a commit 29216d7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/extmod/select_poll_fd.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
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
4046
poller = select.poll()
4147
for fd in range(6000):
4248
poller.register(fd)

0 commit comments

Comments
 (0)