Project

General

Profile

Bug #4813

test_minitest.rb failed on win32-x64

Added by arton (Akio Tajima) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.3dev (2011-06-01) [x64-mswin64_100]
[ruby-core:36670]

Description

minitest.rb with external command 'diff' may fail on (at least on my) win32-x64 ruby.
Above patch fixed this.

--- lib/minitest/unit.rb~ 2011-06-01 22:09:05.000000000 +0900
+++ lib/minitest/unit.rb 2011-06-02 00:44:19.000000000 +0900
@@ -121,9 +121,11 @@ module MiniTest

   Tempfile.open("expect") do |a|
     a.puts expect
  • a.flush a.rewind Tempfile.open("butwas") do |b| b.puts butwas
  • b.flush b.rewind

Associated revisions

Revision 31901
Added by usa (Usaku NAKAMURA) over 6 years ago

  • io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal flush. [Bug #4813]

Revision 31901
Added by usa (Usaku NAKAMURA) over 6 years ago

  • io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal flush. [Bug #4813]

Revision 31901
Added by usa (Usaku NAKAMURA) over 6 years ago

  • io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal flush. [Bug #4813]

Revision 31901
Added by usa (Usaku NAKAMURA) over 6 years ago

  • io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal flush. [Bug #4813]

History

#1 [ruby-core:36675] Updated by zenspider (Ryan Davis) over 6 years ago

  • Status changed from Open to Closed
  • Assignee set to zenspider (Ryan Davis)

Thanks! I'll have this merged back into core in a sec. This will break other tests (intentionally) so I need to write up a ticket for sora first.

#2 [ruby-core:36688] Updated by usa (Usaku NAKAMURA) over 6 years ago

wait, wait...
this is ruby's bug not minitest's.

IO#rewind do flush internally.
so, if this patch corrects some bugs, the internal flush process is something wrong.

Also available in: Atom PDF