summaryrefslogtreecommitdiff
path: root/test/fileutils
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
commite6efdb7bfd39ce1de06c8a2a3f560ff28f610dfc (patch)
treeb976832687e8dcddff09112273a3d4b22439c880 /test/fileutils
parentc0bc825b50bd4fa6c7f7c7f93453a6c2db92ac52 (diff)
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.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'