From 20c7c551bfdd5d99c477c4c04b4f5271bec4e285 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Costa Date: Fri, 17 Oct 2025 16:42:37 +0000 Subject: [PATCH] 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. --- tests/functional/repl.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/repl.sh b/tests/functional/repl.sh index bfe18c9e5..aeff43d30 100755 --- a/tests/functional/repl.sh +++ b/tests/functional/repl.sh @@ -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=("$@")