Files
ports/lang/micropython/files/patch-tests_extmod_select__poll__fd.py
T
Xin LI 6c608356b6 lang/micropython: upgrade to 1.28.0
- Add mbedtls and micropython-lib submodules via GH_TUPLE
 - Use POSIX semaphores for mp_thread_mutex_t to fix cross-thread unlock
   on FreeBSD (PTHREAD_MUTEX_ERRORCHECK rejects non-owner unlock with EPERM)
 - Remove -Werror from mpy-cross and unix port Makefiles
 - Fix select_poll_fd test: FreeBSD poll(2) checks kern.maxfilesperproc
   (not RLIMIT_NOFILE), so print SKIP instead of assert False when 6000
   fds do not trigger EINVAL
 - Update ffi test patches for FreeBSD libc.so.7
 - Compile ffi_lib.so in pre-test for ffi_int_* tests
2026-05-18 21:53:57 -07:00

17 lines
685 B
Python

--- tests/extmod/select_poll_fd.py.orig 2026-05-19 02:06:38 UTC
+++ tests/extmod/select_poll_fd.py
@@ -42,7 +42,12 @@ try:
poller.register(fd)
try:
poller.poll()
- assert False
+ # poll() did not raise EINVAL. On FreeBSD, poll(2) checks nfds against
+ # kern.maxfilesperproc (which can be hundreds of thousands) rather than
+ # RLIMIT_NOFILE, so triggering EINVAL with a fixed count of 6000 is not
+ # possible. Registering enough fds to exceed the actual limit would be
+ # impractically slow. Skip this sub-test.
+ print("SKIP: fd limit > 6000, triggering poll() EINVAL not practical")
except OSError as er:
print(er.errno == errno.EINVAL)