aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-23 11:30:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-23 11:30:02 +0000
commitb815fb548297e110225480040f84db1b1f258319 (patch)
treeb976832687e8dcddff09112273a3d4b22439c880 /test
parent413e0a570cff0c91778e85d407a5727a5bba44bf (diff)
downloadruby-b815fb548297e110225480040f84db1b1f258319.tar.gz
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í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
Diffstat (limited to 'test')
-rw-r--r--test/fileutils/test_fileutils.rb2
1 files changed, 1 insertions, 1 deletions
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'