Bug #344

File.grpowned?のテスト

Added by Kazuhiro NISHIYAMA about 7 years ago. Updated over 4 years ago.

[ruby-dev:35633]
Status:Closed
Priority:Normal
Assignee:Kazuhiro NISHIYAMA
ruby -v:? Backport:

Description

=begin
西山和広です。

Mac OS Xでassert(File.grpowned?(@file))がFailureになります。

61) Failure:
test_owned_p(TestFileExhaustive) [/Users/nishiyamakazuhiro/wc/ruby-lang/trunk/test/ruby/test_file_exhaustive.rb:240]:
is not true.

62) Failure:
test_stat_owned_p(TestFileExhaustive) [/Users/nishiyamakazuhiro/wc/ruby-lang/trunk/test/ruby/test_file_exhaustive.rb:698]:
is not true.

テストを実行するユーザがDir.mktmpdirの/tmp/のグループに入っていなくて、
ディレクトリにsetgidされていなくてもディレクトリのグループが、新規作成
される中のファイルに継承される環境(BSD系?)で起きるのではないかと思います。

$ touch ~/foo /tmp/foo
$ ls -ld ~ ~/foo /tmp /tmp/ /tmp/foo
drwxr-xr-x+ 26 nishiyamakazuhiro staff 884 Jul 23 07:46 /Users/nishiyamakazuhiro
-rw-r--r-- 1 nishiyamakazuhiro staff 0 Jul 23 07:47 /Users/nishiyamakazuhiro/foo
lrwxr-xr-x@ 1 root admin 11 Jul 16 16:29 /tmp -> private/tmp
drwxrwxrwt 9 root wheel 306 Jul 23 07:46 /tmp/
-rw-r--r-- 1 nishiyamakazuhiro wheel 0 Jul 23 07:47 /tmp/foo
$ id
uid=501(nishiyamakazuhiro) gid=20(staff) groups=20(staff),98(lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),79(appserverusr),80(admin)
$

--
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)
=end


Related issues

Related to Ruby trunk - Bug #3985: test_pathname fail on OSX via cron Closed 10/26/2010

History

#1 Updated by Koichi Sasada about 7 years ago

  • Assignee set to Kazuhiro NISHIYAMA

=begin

=end

#2 Updated by Kazuhiro NISHIYAMA about 7 years ago

  • Status changed from Open to Closed

=begin

=end

#3 Updated by Kazuhiro NISHIYAMA almost 5 years ago

  • ruby -v set to ?

=begin
r18593
=end

Also available in: Atom PDF