diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-07 02:53:39 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-05-07 02:53:39 +0900 |
commit | ce00fda9254887388b15a3a9ff505d3473cecf57 (patch) | |
tree | 0635a9aa79986a78a3f65420a8e41e096ae74810 /test/ruby/test_io.rb | |
parent | 01e0e4c4732b2019166a45b21fbf2b400554e403 (diff) |
Suffixed memory leak tests as "memory_leak"
So that `TEST_EXCLUDES` option in common.mk works.
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 9dc0debe16..8c7fe69128 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3913,21 +3913,22 @@ __END__ end end - def test_select_leak + def test_select_memory_leak # avoid malloc arena explosion from glibc and jemalloc: env = { 'MALLOC_ARENA_MAX' => '1', 'MALLOC_ARENA_TEST' => '1', 'MALLOC_CONF' => 'narenas:1', } - assert_no_memory_leak([env], <<-"end;", <<-"end;", rss: true, timeout: 60) + assert_no_memory_leak([env], "#{<<~"begin;"}\n#{<<~'else;'}", "#{<<~'end;'}", rss: true, timeout: 60) + begin; r, w = IO.pipe rset = [r] wset = [w] exc = StandardError.new(-"select used to leak on exception") exc.set_backtrace([]) Thread.new { IO.select(rset, wset, nil, 0) }.join - end; + else; th = Thread.new do Thread.handle_interrupt(StandardError => :on_blocking) do begin |