From e6efdb7bfd39ce1de06c8a2a3f560ff28f610dfc Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 Nov 2016 11:30:02 +0000 Subject: [PATCH] test_fileutils.rb: Use primary group too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary group as well as supplementary groups. based on the patch by Vít Ondruch at [ruby-core:78053]. [Bug #12910] It might happen in certain environments (systemd-nspawn) that process has no supplementary groups, but primary groups should be enough to pass most of the tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/fileutils/test_fileutils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 0ff0aadca2..fedf5d4780 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -142,7 +142,7 @@ class TestFileUtils < Test::Unit::TestCase def setup @prevdir = Dir.pwd - @groups = Process.groups if have_file_perm? + @groups = [Process.gid] | Process.groups if have_file_perm? tmproot = @tmproot = Dir.mktmpdir "fileutils" Dir.chdir tmproot my_rm_rf 'data'; mymkdir 'data'