ruby-changes:44811
From: nobu <ko1@a...>
Date: Wed, 23 Nov 2016 20:30:07 +0900 (JST)
Subject: [ruby-changes:44811] nobu:r56884 (trunk): test_fileutils.rb: Use primary group too
nobu 2016-11-23 20:30:02 +0900 (Wed, 23 Nov 2016) New Revision: 56884 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56884 Log: test_fileutils.rb: Use primary group too * test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary group as well as supplementary groups. based on the patch by V?\195?\173t 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. Modified files: trunk/test/fileutils/test_fileutils.rb Index: test/fileutils/test_fileutils.rb =================================================================== --- test/fileutils/test_fileutils.rb (revision 56883) +++ test/fileutils/test_fileutils.rb (revision 56884) @@ -142,7 +142,7 @@ class TestFileUtils < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L142 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' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/