[DRE-commits] [SCM] ruby-kgio.git branch, master, updated. upstream/2.7.2-12-g53ad36b
Hleb Valoshka
375GNU at Gmail.COM
Tue Mar 6 17:36:05 UTC 2012
The following commit has been merged in the master branch:
commit fab275867c383eaf8c857e5e4435923fcba9afc7
Author: Hleb Valoshka <375GNU at Gmail.COM>
Date: Tue Mar 6 19:58:28 2012 +0300
fix potential race in test_poll.rb
diff --git a/debian/patches/fix-potential-race-in-test-poll b/debian/patches/fix-potential-race-in-test-poll
new file mode 100644
index 0000000..3317d92
--- /dev/null
+++ b/debian/patches/fix-potential-race-in-test-poll
@@ -0,0 +1,17 @@
+Test test_close_signal has potential race condition, this patch will fix it.
+See http://permalink.gmane.org/gmane.comp.lang.ruby.kgio.general/91
+
+--- a/test/test_poll.rb
++++ b/test/test_poll.rb
+@@ -58,7 +58,10 @@
+ res = nil
+ thr = Thread.new { sleep 0.100; Process.kill(:USR1, $$) }
+ t0 = Time.now
+- assert_raises(IOError) { Kgio.poll({@rd => Kgio::POLLIN}) }
++ assert_raises(IOError) do
++ result = Kgio.poll({@rd => Kgio::POLLIN})
++ result.each_key { |io| io.read_nonblock(1) }
++ end
+ diff = Time.now - t0
+ thr.join
+ assert diff >= 0.010, "diff=#{diff}"
diff --git a/debian/patches/series b/debian/patches/series
index 970c2dd..d25d834 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
fix-test-under-fakeroot
fix-buildconfig-for-gnu-not-linux
+fix-potential-race-in-test-poll
--
ruby-kgio.git
More information about the Pkg-ruby-extras-commits
mailing list