File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 47
47
- name : Build unix port
48
48
run : make -C ports/unix VARIANT=coverage -j4
49
49
- name : Run tests
50
- run : ./run-tests.py -j4 ${{ env[format('TEST_{0}', matrix.test)] }}
50
+ run : |
51
+ ulimit -n
52
+ ulimit -n 1024 && ./run-tests.py -j4 ${{ env[format('TEST_{0}', matrix.test)] }}
51
53
working-directory : tests
52
54
- name : Print failure info
53
55
run : ./run-tests.py -j4 --print-failures
Original file line number Diff line number Diff line change 1
1
# Test select.poll in combination with file descriptors.
2
-
3
2
try :
4
3
import select , errno
5
4
8
7
print ("SKIP" )
9
8
raise SystemExit
10
9
10
+ # CIRCUITPY-CHANGE: set max number of file descriptors here for CPython comparison test.
11
+ # In MicroPython, this is done in ci.sh with `ulimit -n`.
12
+ try :
13
+ import resource
14
+ resource .setrlimit (resource .RLIMIT_NOFILE , (1024 , 1024 ))
15
+ except ImportError :
16
+ pass
17
+
11
18
# Check that poll supports registering file descriptors (integers).
12
19
try :
13
20
select .poll ().register (0 )
37
44
# Test registering a very large number of file descriptors (will trigger
38
45
# EINVAL due to more than OPEN_MAX fds). Typically it's 1024 (and on GitHub CI
39
46
# 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
47
+ # CIRCUITPY-CHANGE: set max number of fd's above.
46
48
poller = select .poll ()
47
49
for fd in range (6000 ):
48
50
poller .register (fd )
You can’t perform that action at this time.
0 commit comments