sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [sleepy.penguin] [ANN] sleepy_penguin 3.3.0 - fixes and compatibility improvements
@ 2013-12-30  1:34  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2013-12-30  1:34 UTC (permalink / raw)
  To: sleepy.penguin

Changes:

Most notably, this fixes memory leaks for any users of inotify
reads, epoll/kevent waiting using short-lived thread.  Users of
long-lived threads for these functions (all Rainbows!, yahns, and
zbatery users) are not affected.  A fair amount of internal cleanup
was necessary for this.

Compatibility with non-Linux systems without clock_gettime is
improved, thanks to Lin Jen-Shin.

Note: the kevent code is not at all optimized and still uses
RARRAY_PTR, so it likely sucks under rbx and MRI 2.1.

Eric Wong (13):
      test_epoll: minor compatibility fix for Ruby 2.1.0
      avoid RARRAY_PTR usage for Linux-only bits
      init: avoid redefinition warning for _GNU_SOURCE
      Rakefile: kill raa_update task
      util: minor cleanup to favor rb_io_get_io
      tests: switch to minitest
      test_epoll: switch test_dup_and_fork to exit!
      remove all signalfd-related files
      tests: remove version-dependent FD_CLOEXEC checks
      work around lack of rb_io_get_io in Rubinius
      value2timespec: use StringValueCStr for correctness
      refactor and fix leak from thread-local storage use
      extconf: avoid unnecessary linkage against libkqueue

Lin Jen-Shin (1):
      Support for broken system without clock_gettime.

* http://bogomips.org/sleepy_penguin/
* sleepy.penguin@librelist.org
* git://bogomips.org/sleepy_penguin.git
* http://bogomips.org/sleepy_penguin/NEWS.atom.xml


^ permalink raw reply	[relevance 7%]

* [sleepy.penguin] [PATCH] tests: switch to minitest
@ 2013-10-19  7:27  6% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2013-10-19  7:27 UTC (permalink / raw)
  To: sleepy.penguin

Add a compatibility shim in test/helper to avoid noisy warnings with
Minitest (out-of-the-box on Ruby 2.0.0) and also Minitest 5.

Automated conversion via:
  perl -i -p -e 's,test/unit,./test/helper,g' test/test_*.rb
  perl -i -p -e 's,Test::Unit::TestCase,Testcase,g' test/test_*.rb

Yes, I prefer Perl for one-liners :P
---
 Oops, I pushed this out w/o reasoning.  Using minitest since
 it's available in Ruby 2.0 and less confusing given the incompatible
 Test::Unit 2.0

 test/helper.rb                   | 8 ++++++++
 test/test_constants.rb           | 4 ++--
 test/test_epoll.rb               | 4 ++--
 test/test_epoll_gc.rb            | 4 ++--
 test/test_epoll_io.rb            | 4 ++--
 test/test_epoll_optimizations.rb | 4 ++--
 test/test_eventfd.rb             | 4 ++--
 test/test_inotify.rb             | 4 ++--
 test/test_kqueue.rb              | 4 ++--
 test/test_kqueue_io.rb           | 4 ++--
 test/test_signalfd.rb            | 4 ++--
 test/test_signalfd_siginfo.rb    | 4 ++--
 test/test_timerfd.rb             | 4 ++--
 13 files changed, 32 insertions(+), 24 deletions(-)
 create mode 100644 test/helper.rb

diff --git a/test/helper.rb b/test/helper.rb
new file mode 100644
index 0000000..13f79b7
--- /dev/null
+++ b/test/helper.rb
@@ -0,0 +1,8 @@
+$-w = $stdout.sync = $stderr.sync = Thread.abort_on_exception = true
+gem 'minitest'
+require 'minitest/autorun'
+Testcase = begin
+  Minitest::Test # minitest 5
+rescue NameError
+  Minitest::Unit::TestCase # minitest 4
+end
diff --git a/test/test_constants.rb b/test/test_constants.rb
index cafba45..4e0c90b 100644
--- a/test/test_constants.rb
+++ b/test/test_constants.rb
@@ -1,9 +1,9 @@
-require 'test/unit'
+require './test/helper'
 $-w = true
 Thread.abort_on_exception = true
 require 'sleepy_penguin/sp'
 
-class TestConstants < Test::Unit::TestCase
+class TestConstants < Testcase
   def test_constants
     assert_equal SleepyPenguin::SLEEPY_PENGUIN_VERSION,
                  SP::SLEEPY_PENGUIN_VERSION
diff --git a/test/test_epoll.rb b/test/test_epoll.rb
index 9f6cf85..ed67988 100644
--- a/test/test_epoll.rb
+++ b/test/test_epoll.rb
@@ -1,4 +1,4 @@
-require 'test/unit'
+require './test/helper'
 require 'fcntl'
 require 'socket'
 require 'thread'
@@ -7,7 +7,7 @@ Thread.abort_on_exception = true
 
 require 'sleepy_penguin'
 
-class TestEpoll < Test::Unit::TestCase
+class TestEpoll < Testcase
   include SleepyPenguin
 
   def setup
diff --git a/test/test_epoll_gc.rb b/test/test_epoll_gc.rb
index ed2df05..e2f0e10 100644
--- a/test/test_epoll_gc.rb
+++ b/test/test_epoll_gc.rb
@@ -1,9 +1,9 @@
-require 'test/unit'
+require './test/helper'
 $-w = true
 
 require 'sleepy_penguin'
 
-class TestEpollGC < Test::Unit::TestCase
+class TestEpollGC < Testcase
   include SleepyPenguin
 
   def setup
diff --git a/test/test_epoll_io.rb b/test/test_epoll_io.rb
index 05a0613..56a3808 100644
--- a/test/test_epoll_io.rb
+++ b/test/test_epoll_io.rb
@@ -1,4 +1,4 @@
-require 'test/unit'
+require './test/helper'
 require 'fcntl'
 require 'socket'
 require 'thread'
@@ -6,7 +6,7 @@ $-w = true
 Thread.abort_on_exception = true
 require 'sleepy_penguin'
 
-class TestEpollIO < Test::Unit::TestCase
+class TestEpollIO < Testcase
   include SleepyPenguin
 
   def setup
diff --git a/test/test_epoll_optimizations.rb b/test/test_epoll_optimizations.rb
index c03b9d6..4a7f787 100644
--- a/test/test_epoll_optimizations.rb
+++ b/test/test_epoll_optimizations.rb
@@ -1,4 +1,4 @@
-require 'test/unit'
+require './test/helper'
 begin
   require 'strace'
 rescue LoadError
@@ -7,7 +7,7 @@ $-w = true
 
 require 'sleepy_penguin'
 
-class TestEpollOptimizations < Test::Unit::TestCase
+class TestEpollOptimizations < Testcase
   include SleepyPenguin
   IO_PURGATORY = []
 
diff --git a/test/test_eventfd.rb b/test/test_eventfd.rb
index f04def3..731a6cb 100644
--- a/test/test_eventfd.rb
+++ b/test/test_eventfd.rb
@@ -1,10 +1,10 @@
-require 'test/unit'
+require './test/helper'
 require 'fcntl'
 $-w = true
 
 require 'sleepy_penguin'
 
-class TestEventFD < Test::Unit::TestCase
+class TestEventFD < Testcase
   include SleepyPenguin
 
   def test_constants
diff --git a/test/test_inotify.rb b/test/test_inotify.rb
index f1b257a..c91d6e4 100644
--- a/test/test_inotify.rb
+++ b/test/test_inotify.rb
@@ -1,11 +1,11 @@
-require 'test/unit'
+require './test/helper'
 require 'fcntl'
 require 'tempfile'
 require 'set'
 $-w = true
 require 'sleepy_penguin'
 
-class TestInotify < Test::Unit::TestCase
+class TestInotify < Testcase
   include SleepyPenguin
   attr_reader :ino
 
diff --git a/test/test_kqueue.rb b/test/test_kqueue.rb
index f6f21e7..5131760 100644
--- a/test/test_kqueue.rb
+++ b/test/test_kqueue.rb
@@ -1,9 +1,9 @@
-require 'test/unit'
+require './test/helper'
 $-w = true
 Thread.abort_on_exception = true
 require 'sleepy_penguin'
 
-class TestKqueue < Test::Unit::TestCase
+class TestKqueue < Testcase
   include SleepyPenguin
 
   def test_kqueue
diff --git a/test/test_kqueue_io.rb b/test/test_kqueue_io.rb
index 04e3103..e2cbe0d 100644
--- a/test/test_kqueue_io.rb
+++ b/test/test_kqueue_io.rb
@@ -1,9 +1,9 @@
-require 'test/unit'
+require './test/helper'
 $-w = true
 Thread.abort_on_exception = true
 require 'sleepy_penguin'
 
-class TestKqueueIO < Test::Unit::TestCase
+class TestKqueueIO < Testcase
   include SleepyPenguin
 
   def setup
diff --git a/test/test_signalfd.rb b/test/test_signalfd.rb
index 0330e70..c80a085 100644
--- a/test/test_signalfd.rb
+++ b/test/test_signalfd.rb
@@ -1,4 +1,4 @@
-require 'test/unit'
+require './test/helper'
 require "dl"
 begin
   require "dl/func"
@@ -7,7 +7,7 @@ end
 $-w = true
 require 'sleepy_penguin'
 
-class TestSignalFD < Test::Unit::TestCase
+class TestSignalFD < Testcase
   include SleepyPenguin
 
   def setup
diff --git a/test/test_signalfd_siginfo.rb b/test/test_signalfd_siginfo.rb
index 6b82d80..0bd55f5 100644
--- a/test/test_signalfd_siginfo.rb
+++ b/test/test_signalfd_siginfo.rb
@@ -1,8 +1,8 @@
-require 'test/unit'
+require './test/helper'
 $-w = true
 require 'sleepy_penguin'
 
-class TestSignalFDSigInfo < Test::Unit::TestCase
+class TestSignalFDSigInfo < Testcase
   include SleepyPenguin
 
   def test_members
diff --git a/test/test_timerfd.rb b/test/test_timerfd.rb
index 81aa6d3..23940a1 100644
--- a/test/test_timerfd.rb
+++ b/test/test_timerfd.rb
@@ -1,10 +1,10 @@
-require 'test/unit'
+require './test/helper'
 require 'fcntl'
 $-w = true
 
 require 'sleepy_penguin'
 
-class TestTimerFD < Test::Unit::TestCase
+class TestTimerFD < Testcase
   include SleepyPenguin
 
   def test_constants
-- 
1.8.4.483.g7fe67e6.dirty



^ permalink raw reply related	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2013-10-19  7:27  6% [sleepy.penguin] [PATCH] tests: switch to minitest Eric Wong
2013-12-30  1:34  7% [sleepy.penguin] [ANN] sleepy_penguin 3.3.0 - fixes and compatibility improvements Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/sleepy_penguin.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).