ruby-changes:49522
From: nobu <ko1@a...>
Date: Sat, 6 Jan 2018 18:01:06 +0900 (JST)
Subject: [ruby-changes:49522] nobu:r61637 (trunk): test_process.rb: skip not-found groups
nobu 2018-01-06 18:01:02 +0900 (Sat, 06 Jan 2018) New Revision: 61637 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61637 Log: 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. Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 61636) +++ test/ruby/test_process.rb (revision 61637) @@ -1850,7 +1850,12 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1850 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/