summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-06 09:01:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-06 09:01:02 +0000
commitdbc925f2bf204cd4d46772095d45145d6eb942bd (patch)
tree173221ef6250e3f405383dfc6b2cbd3de90dae58 /test
parente043ae73488e7fa623632ddbbbe51c70f1bae565 (diff)
test_process.rb: skip not-found groups
* test/ruby/test_process.rb (test_execopts_gid): under some network configuration (maybe with Open Directory but disconnected temporarily), some groups may fail to find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 28a2f05a85..5eaf9162c7 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1850,7 +1850,12 @@ class TestProcess < Test::Unit::TestCase
skip "Process.groups not implemented on Windows platform" if windows?
feature6975 = '[ruby-core:47414]'
- [30000, *Process.groups.map {|g| g = Etc.getgrgid(g); [g.name, g.gid]}].each do |group, gid|
+ groups = Process.groups.map do |g|
+ g = Etc.getgrgid(g) rescue next
+ [g.name, g.gid]
+ end
+ groups.compact!
+ [30000, *groups].each do |group, gid|
assert_nothing_raised(feature6975) do
begin
system(*TRUECOMMAND, gid: group)