From a886d5cb79e2440eb6cf422723e08447ee4735db Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 10 Oct 2019 23:18:44 +0900 Subject: test/ruby/test_file_exhaustive.rb: check the owner of the root directory The root directory may be owned by the current user, for example, in chroot environment. --- test/ruby/test_file_exhaustive.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_file_exhaustive.rb') diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 2a5a860cf8..6b80b82389 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -70,7 +70,7 @@ class TestFileExhaustive < Test::Unit::TestCase def notownedfile return @notownedfile if defined? @notownedfile - if Process.euid != 0 + if Process.euid != File.stat("/").uid @notownedfile = '/' else @notownedfile = nil -- cgit v1.2.1