Issue #11840 has been updated by Martin Drst.


Nobuyoshi Nakada wrote:
> Possibly, `sleep 0.2` is too short?

I tried with 'sleep 1' first, and then with 'sleep 100', but no change.


----------------------------------------
Bug #11840: Error with "make check" on Cygwin
https://bugs.ruby-lang.org/issues/11840#change-55658

* Author: Martin Drst
* Status: Open
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: ruby 2.3.0dev (2015-12-17 trunk 53170) [x86_64-cygwin]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Encouraged by Hiroshi Shibata's talk at Ruby Kaigi 2015, I tried "make check" on my usual cygwin compilation. If I understand the output below correctly, there was only one error in 1010 tests. If we can fix that error (or exclude the test if it doesn't make sense on cygwin or on Windows in general), then cygwin would pass the tests.

~~~
generating prelude.c
prelude.c unchanged
make[2]: 'rubyw.exe' is up to date.
make[2]: Leaving directory '/cygdrive/c/Data/ruby-public'
make[1]: Leaving directory '/cygdrive/c/Data/ruby-public'

test succeeded
#254 test_fork.rb:       F
     begin
       r, w = IO.pipe
       if pid1 = fork
         w.close
         r.read(1)
         Process.kill("USR1", pid1)
         _, s = Process.wait2(pid1)
         s.success? ? :ok : :ng
       else
         r.close
         if pid2 = fork
           trap("USR1") { Time.now.to_s; Process.kill("USR2", pid2) }
           w.close
           Process.wait2(pid2)
         else
           w.close
           sleep 0.2
         end
         exit true
       end
     rescue NotImplementedError
       :ok
     end
  #=> "ng" (expected "ok")  [ruby-core:28924]
stderr output is not empty
   bootstraptest.tmp.rb:13:in `kill': No such process (Errno::ESRCH)
           from bootstraptest.tmp.rb:13:in `block in <main>'
           from bootstraptest.tmp.rb:15:in `wait2'
           from bootstraptest.tmp.rb:15:in `<main>'
test_fork.rb            FAIL 1/5
FAIL 1/1010 tests failed
uncommon.mk:581: recipe for target 'yes-btest-ruby' failed
make: *** [yes-btest-ruby] Error 1





-- 
https://bugs.ruby-lang.org/