summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2023-05-20 13:40:46 -0700
committerJeremy Evans <code@jeremyevans.net>2023-05-20 13:40:46 -0700
commitb3f355cfbef3bee159bc7d05bd2df1dd63ffddc0 (patch)
treec276f083f3f195191b57e0bcdc83c9ceb1d90d14 /test
parent8d242a33af19672977dcdcb8d32e9ad547bc0141 (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 59e612405c..a30544cefc 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -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