diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb index c105122..98871a6 100644 --- a/test/etc/test_etc.rb +++ b/test/etc/test_etc.rb @@ -66,6 +66,7 @@ class TestEtc < Test::Unit::TestCase end def test_group + skip "Broken Etc.group on this machine" if ENV['RUBY_TEST_OPTIONS_BROKEN_GROUP']=='1' Etc.group do |s| assert_instance_of(String, s.name) assert_instance_of(String, s.passwd) if s.respond_to?(:passwd) @@ -76,6 +77,7 @@ class TestEtc < Test::Unit::TestCase end def test_getgrgid + skip "Broken Etc.getgrgid on this machine" if ENV['RUBY_TEST_OPTIONS_BROKEN_GETGRGID']=='1' # group database is not unique on GID, and which entry will be # returned by getgrgid() is not specified. groups = Hash.new {[]} @@ -92,6 +94,7 @@ class TestEtc < Test::Unit::TestCase end def test_getgrnam + skip "Broken Etc.getgrnam on this machine" if ENV['RUBY_TEST_OPTIONS_BROKEN_GETGRNAM']=='1' groups = {} Etc.group do |s| groups[s.name] ||= s unless /\A\+/ =~ s.name @@ -102,6 +105,7 @@ class TestEtc < Test::Unit::TestCase end def test_group_with_low_level_api + skip "Broken Etc.group on this machine" if ENV['RUBY_TEST_OPTIONS_BROKEN_GROUP']=='1' a = [] Etc.group {|s| a << s } b = [] diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index a71a2d6..a06ba22 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1595,6 +1595,7 @@ class TestProcess < Test::Unit::TestCase def test_execopts_gid skip "Process.groups not implemented on Windows platform" if windows? + skip "Broken Etc.getgrgid on this machine" if ENV['RUBY_TEST_OPTIONS_BROKEN_GETGRGID']=='1' feature6975 = '[ruby-core:47414]' [30000, *Process.groups.map {|g| g = Etc.getgrgid(g); [g.name, g.gid]}].each do |group, gid|