1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

fix(tests/functional/repl): skip test if stack size limit is insufficient

Nix attempts to set the stack size to 64 MB during initialization, which is
required for the repl tests to run successfully. Skip the tests on systems
where the hard stack limit is less than this value rather than failing.
This commit is contained in:
Bernardo Meurer Costa 2025-10-17 16:42:37 +00:00
parent e78e6ca4f4
commit 20c7c551bf
No known key found for this signature in database

View file

@ -25,6 +25,13 @@ import $testDir/undefined-variable.nix
TODO_NixOS
# FIXME: repl tests fail on systems with stack limits
stack_ulimit="$(ulimit -Hs)"
stack_required="$((64 * 1024 * 1024))"
if [[ "$stack_ulimit" != "unlimited" ]]; then
((stack_ulimit < stack_required)) && skipTest "repl tests cannot run on systems with stack size <$stack_required ($stack_ulimit)"
fi
testRepl () {
local nixArgs
nixArgs=("$@")