Set rlimit_nproc to 64 instead of 128 on OpenBSD for spawn_too_long_path tests

This significantly reduces testing time, and may allow the test to
pass before timeout in CI.
This commit is contained in:
Jeremy Evans 2023-05-20 13:40:46 -07:00
Родитель 8d242a33af
Коммит b3f355cfbe
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1791,7 +1791,9 @@ class TestProcess < Test::Unit::TestCase
exs << Errno::EINVAL if windows?
exs << Errno::E2BIG if defined?(Errno::E2BIG)
opts = {[STDOUT, STDERR]=>File::NULL}
opts[:rlimit_nproc] = 128 if defined?(Process::RLIMIT_NPROC)
if defined?(Process::RLIMIT_NPROC)
opts[:rlimit_nproc] = /openbsd/i =~ RUBY_PLATFORM ? 64 : 128
end
EnvUtil.suppress_warning do
assert_raise(*exs, mesg) do
begin