ruby / zlib

Ruby interface for the zlib compression/decompression library
Other
49 stars 35 forks source link

Tests failing against ruby 3.2.2 #71

Closed Segaja closed 8 months ago

Segaja commented 9 months ago

When running the tests for this gem against ruby 3.2.2 I get the following error:

Loaded suite /usr/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
........E
===============================================================================
Error: test_gunzip_encoding(TestZlib): Zlib::DataError: invalid stored block lengths
/build/ruby-zlib/src/zlib-3.1.0/test/zlib/test_zlib.rb:1466:in `gunzip'
/build/ruby-zlib/src/zlib-3.1.0/test/zlib/test_zlib.rb:1466:in `test_gunzip_encoding'
     1463:     def test_gunzip_encoding
     1464:       #                vvvvvvvv = mtime, but valid UTF-8 string of U+0080
     1465:       src = %w[1f8b0800c28000000003cb48cdc9c9070086a6103605000000].pack("H*").force_encoding('UTF-8')
  => 1466:       assert_equal 'hello', Zlib.gunzip(src.freeze)
     1467:     end
     1468:
     1469:     def test_gunzip_no_memory_leak
===============================================================================
P
===============================================================================
Pending: test_gunzip_no_memory_leak(TestZlib): pended.
/usr/lib/ruby/gems/3.2.0/gems/test-unit-ruby-core-1.0.5/lib/core_assertions.rb:192:in `rescue in assert_no_memory_leak'
/usr/lib/ruby/gems/3.2.0/gems/test-unit-ruby-core-1.0.5/lib/core_assertions.rb:150:in `assert_no_memory_leak'
/build/ruby-zlib/src/zlib-3.1.0/test/zlib/test_zlib.rb:1470:in `test_gunzip_no_memory_leak'
     1467:     end
     1468:
     1469:     def test_gunzip_no_memory_leak
  => 1470:       assert_no_memory_leak(%[-rzlib], "#{<<~"{#"}", "#{<<~'};'}")
     1471:       d = Zlib.gzip("data")
     1472:       {#
     1473:         10_000.times {Zlib.gunzip(d)}
===============================================================================
...............................................................................
......
Finished in 0.815445996 seconds.
-------------------------------------------------------------------------------
95 tests, 517 assertions, 0 failures, 1 errors, 1 pendings, 0 omissions, 0 notifications
97.8947% passed
-------------------------------------------------------------------------------
116.50 tests/s, 634.01 assertions/s
rake aborted!
Command failed with status (1)
/build/ruby-zlib/src/zlib-3.1.0/Rakefile:10:in `block in <top (required)>'
Tasks: TOP => test_internal
(See full trace by running task with --trace)

Am I missing some dependency?

Best regards

eregon commented 8 months ago

It works in CI so it seems an issue in your environment, maybe an unsual version of zlib or so. In any case, I don't think we can help here.