diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-23 11:30:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-23 11:30:02 +0000 |
commit | b815fb548297e110225480040f84db1b1f258319 (patch) | |
tree | b976832687e8dcddff09112273a3d4b22439c880 /test | |
parent | 413e0a570cff0c91778e85d407a5727a5bba44bf (diff) | |
download | ruby-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.rb | 2 |
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' |