make check fails on test-stress:
test-stress [ FAIL ] (exit 1)
test-stress: resource limit stress tests
32 concurrent threads OK
mmap/munmap churn (256 cycles) OK
128 concurrent mmap regions OK
FD exhaustion (EMFILE) FAIL: too few FDs opened before exhaustion (errno=24)
mprotect RW->RX->RW cycling (64x) OK
large mmap (16MiB) OK
The subtest at tests/test-stress.c:222 expects to open ≥ 500 pipe FDs before EMFILE. On a default macOS shell session that's not reliable, pipe(2) returns EMFILE earlier. ulimit -n 65536 before make check and the test passes.
It's not an elfuse internal cap: FD_TABLE_SIZE = 1024 (src/syscall/abi.h:628), comfortably above the 500 threshold.
The bottleneck is the host process RLIMIT_NOFILE flowing into pipe(2).
Three places this could be fixed, in order of how localized:
test-stress bumps RLIMIT_NOFILE itself before the FD-exhaustion subtest.
- elfuse bumps
RLIMIT_NOFILE on the host before launching the guest.
docs/testing.md Build Requirements documents the required ulimit -n.
Environment: Apple M3 Max MacBook Pro, macOS 26.5.1. kern.maxfilesperproc = 245760, zsh interactive ulimit -n =
1048576, but the effective limit visible to the guest is clearly lower (make check is invoked from a shell where the parent
limit isn't propagated as expected).
make checkfails ontest-stress:The subtest at
tests/test-stress.c:222expects to open ≥ 500 pipe FDs before EMFILE. On a default macOS shell session that's not reliable,pipe(2)returns EMFILE earlier.ulimit -n 65536beforemake checkand the test passes.It's not an elfuse internal cap:
FD_TABLE_SIZE = 1024(src/syscall/abi.h:628), comfortably above the 500 threshold.The bottleneck is the host process
RLIMIT_NOFILEflowing intopipe(2).Three places this could be fixed, in order of how localized:
test-stressbumpsRLIMIT_NOFILEitself before the FD-exhaustion subtest.RLIMIT_NOFILEon the host before launching the guest.docs/testing.mdBuild Requirements documents the requiredulimit -n.Environment: Apple M3 Max MacBook Pro, macOS 26.5.1.
kern.maxfilesperproc= 245760, zsh interactiveulimit -n=1048576, but the effective limit visible to the guest is clearly lower (
make checkis invoked from a shell where the parentlimit isn't propagated as expected).