summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSutou Kouhei <[email protected]>2024-09-28 08:06:23 +0900
committerHiroshi SHIBATA <[email protected]>2024-10-02 14:36:10 +0900
commitc99108517655db33b45edd5d74e488e2f60dfe66 (patch)
treeac5003733734227efade284956b3a41dc6ae7192 /test
parent9d4e7b376aaeeea2676ca2691cdc52996bfb3e43 (diff)
[ruby/fiddle] test: remove fragile memory leak tests
https://github.com/ruby/fiddle/commit/0bfcd02bef
Diffstat (limited to 'test')
-rw-r--r--test/fiddle/test_handle.rb16
-rw-r--r--test/fiddle/test_pointer.rb16
2 files changed, 0 insertions, 32 deletions
diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb
index 412c10e09d..042e517e35 100644
--- a/test/fiddle/test_handle.rb
+++ b/test/fiddle/test_handle.rb
@@ -191,22 +191,6 @@ module Fiddle
$VERBOSE = verbose
end if /freebsd/=~ RUBY_PLATFORM
- def test_no_memory_leak
- # https://github.com/ruby/fiddle/actions/runs/3202406059/jobs/5231356410
- omit if RUBY_VERSION >= '3.2'
-
- if respond_to?(:assert_nothing_leaked_memory)
- n_tries = 100_000
- assert_nothing_leaked_memory(SIZEOF_VOIDP * (n_tries / 100)) do
- n_tries.times do
- Fiddle::Handle.allocate
- end
- end
- else
- assert_no_memory_leak(%w[-W0 -rfiddle.so], '', '100_000.times {Fiddle::Handle.allocate}; GC.start', rss: true)
- end
- end
-
if /cygwin|mingw|mswin/ =~ RUBY_PLATFORM
def test_fallback_to_ansi
k = Fiddle::Handle.new("kernel32.dll")
diff --git a/test/fiddle/test_pointer.rb b/test/fiddle/test_pointer.rb
index f2c1d285ad..30236be7f6 100644
--- a/test/fiddle/test_pointer.rb
+++ b/test/fiddle/test_pointer.rb
@@ -286,21 +286,5 @@ module Fiddle
assert_raise(DLError) {nullpo[0]}
assert_raise(DLError) {nullpo[0] = 1}
end
-
- def test_no_memory_leak
- # https://github.com/ruby/fiddle/actions/runs/3202406059/jobs/5231356410
- omit if RUBY_VERSION >= '3.2'
-
- if respond_to?(:assert_nothing_leaked_memory)
- n_tries = 100_000
- assert_nothing_leaked_memory(SIZEOF_VOIDP * (n_tries / 100)) do
- n_tries.times do
- Fiddle::Pointer.allocate
- end
- end
- else
- assert_no_memory_leak(%w[-W0 -rfiddle.so], '', '100_000.times {Fiddle::Pointer.allocate}', rss: true)
- end
- end
end
end if defined?(Fiddle)