[Win32utils-devel] File.realpath

Heesob Park phasis at gmail.com
Wed Nov 20 01:49:35 UTC 2013


Hi,

2013/11/20 Daniel Berger <djberg96 at gmail.com>:
> I added a custom File.realpath method and added some tests for it. For
> reasons I don't understand, I started seeing intermittent segfaults or
> aborts by rake.
>
> Please check out the latest and run "rake test:link" with elevated
> privileges to see what I'm talking about.
>
> I did realize that File.readlink should raise an EINVAL if the argument
> isn't a symlink, but I want to figure out what's causing this first before I
> change that.
>
I cannot reproduce any segfaults with RubyInstaller 2.0.0-p247 on
Windows 7 64bit.
What is your Ruby platform and OS?

FYI, here is the full log
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\win32-file-0.6.8>rake test:link
C:/Ruby200-x64/bin/ruby.exe -w -I"lib" -I"C:/Ruby200-x64/lib/ruby/gems/2.0.0/gem
s/rake-10.1.0/lib" "C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake
/rake_test_loader.rb" "test/test_win32_file_link.rb"
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.3.6/lib/win32/file/sta
t.rb:60: warning: method redefined; discarding old initialize
Loaded suite C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_t
est_loader
Started
......F
===============================================================================
Failure:
test: realpath returns the expected value for a regular file(TC_Win32_File_Link)

C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/win32-file-0.6.8/test/test_win32_file_li
nk.rb:102:in `block in <class:TC_Win32_File_Link>'
      99:   end
     100:
     101:   test "realpath returns the expected value for a regular file" do
  => 102:     assert_equal(Dir.pwd.tr("/", "\\"), File.realpath(Dir.pwd))
     103:     assert_equal(@@file, File.realpath(@file))
     104:   end
     105:
<"C:\\Ruby200-x64\\lib\\ruby\\gems\\2.0.0\\gems\\win32-file-0.6.8\\test"> expect
ed but was
<"C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/win32-file-0.6.8/test">

diff:
? C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\win32-file-0.6.8\test
?   /           /   /    /    /     /    /                /
===============================================================================
..........

Finished in 0.058003 seconds.

17 tests, 25 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifi
cations
94.1176% passed

293.09 tests/s, 431.01 assertions/s
rake aborted!
Command failed with status (1): [ruby -w -I"lib" -I"C:/Ruby200-x64/lib/ruby/gems
/2.0.0/gems/rake-10.1.0/lib" "C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rake-10.1.
0/lib/rake/rake_test_loader.rb" "test/test_win32_file_link.rb" ]

Tasks: TOP => test:link
(See full trace by running task with --trace)


Regards,
Park Heesob


More information about the win32utils-devel mailing list