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 | e6efdb7bfd39ce1de06c8a2a3f560ff28f610dfc (patch) | |
tree | b976832687e8dcddff09112273a3d4b22439c880 /test/fileutils | |
parent | c0bc825b50bd4fa6c7f7c7f93453a6c2db92ac52 (diff) | |
download | ruby-e6efdb7bfd39ce1de06c8a2a3f560ff28f610dfc.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/fileutils')
-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' |