[DRE-maint] Bug#1088785: ruby-msgpack: FTBFS on ppc64el: Automatic compaction isn't available on this platform
Paul Gevers
elbrus at debian.org
Sun Dec 22 21:48:09 GMT 2024
Control: retitle -1 ruby-msgpack: not all tests are being run on ppc64el
Control: severity -1 important
Hi all,
On 15-12-2024 09:54, Paul Gevers wrote:
> Weirdly enough, when I started disabling tests in a different order, I
> also got a passing set with only disabling these:
>
> spec/msgpack_spec.rb
> spec/packer_spec.rb
> spec/unpacker_spec.rb
I've just uploaded an NMU that skips these three tests on ppc64el. I
don't consider that a solution, it's a work around until somebody with
enough ruby debugging knowledge can dive into this.
Please find my debdiff attached, I uploaded with dgit, so the history
can also be inspected there.
I got my inspiration from:
https://sources.debian.org/src/ruby-oj/3.16.3-1/debian/ruby-tests.rb/
Paul
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index ec546c0..c776f0d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ruby-msgpack (1.7.2-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload to address bug #1088785
+ * tests: avoid FTBFS on ppc64el by *trying* auto_compact
+ * Replace ruby-test-files.yaml with ruby-tests.rb
+ * Update 0001-Fix-paths-for-spec_helper-random_compat.patch for
+ two missing tests
+
+ -- Paul Gevers <elbrus at debian.org> Sun, 22 Dec 2024 22:32:17 +0100
+
ruby-msgpack (1.7.2-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0001-Fix-paths-for-spec_helper-random_compat.patch b/debian/patches/0001-Fix-paths-for-spec_helper-random_compat.patch
index 60f7fef..bc40cbf 100644
--- a/debian/patches/0001-Fix-paths-for-spec_helper-random_compat.patch
+++ b/debian/patches/0001-Fix-paths-for-spec_helper-random_compat.patch
@@ -190,3 +190,25 @@ index 3b4b2a3..5a63a1a 100644
describe MessagePack::Unpacker do
let :unpacker do
+diff --git a/spec/bigint_spec.rb b/spec/bigint_spec.rb
+index 8e6829a..691b8a3 100644
+--- a/spec/bigint_spec.rb
++++ b/spec/bigint_spec.rb
+@@ -1,4 +1,4 @@
+-require 'spec_helper'
++require 'spec/spec_helper'
+
+ describe MessagePack::Bigint do
+ it 'serialize and deserialize arbitrary sized integer' do
+diff --git a/spec/timestamp_spec.rb b/spec/timestamp_spec.rb
+index f837bd5..8dc028c 100644
+--- a/spec/timestamp_spec.rb
++++ b/spec/timestamp_spec.rb
+@@ -1,6 +1,6 @@
+ # frozen_string_literal: true
+
+-require 'spec_helper'
++require 'spec/spec_helper'
+
+ describe MessagePack::Timestamp do
+ describe 'malformed format' do
diff --git a/debian/patches/series b/debian/patches/series
index f9db7b8..d44a588 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Fix-paths-for-spec_helper-random_compat.patch
+tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
diff --git a/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch b/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
new file mode 100644
index 0000000..d600b64
--- /dev/null
+++ b/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
@@ -0,0 +1,29 @@
+From: Paul Gevers <elbrus at debian.org>
+Date: Sun, 1 Dec 2024 09:21:29 +0100
+X-Dgit-Generated: 1.7.2-1.1 2b812939884458fb0a45ded7c38a1dcb0128d1d2
+Subject: tests: avoid FTBFS on ppc64el by *trying* auto_compact
+
+The current version fails to build on ppc64el with the following error:
+`auto_compact=': Automatic compaction isn't available on this platform (NotImplementedError)
+
+So, to avoid failure, catch the exception.
+
+---
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index c3935ed..c2382ac 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -30,7 +30,11 @@ if GC.respond_to?(:verify_compaction_references)
+ end
+
+ if GC.respond_to?(:auto_compact=)
+- GC.auto_compact = true
++ begin
++ GC.auto_compact = true
++ rescue NotImplementedError
++ # FTBFS on ppc64el otherwise
++ end
+ end
+
+ IS_JRUBY = RUBY_ENGINE == 'jruby'
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
deleted file mode 100644
index 7b4ae3f..0000000
--- a/debian/ruby-test-files.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- spec/cases_spec.rb
-- spec/cruby/buffer_io_spec.rb
-- spec/cruby/buffer_packer.rb
-- spec/cruby/buffer_spec.rb
-- spec/cruby/buffer_unpacker.rb
-- spec/cruby/unpacker_spec.rb
-- spec/ext_value_spec.rb
-- spec/exttypes.rb
-- spec/factory_spec.rb
-- spec/format_spec.rb
-#- spec/jruby/benchmarks/shootout_bm.rb
-#- spec/jruby/benchmarks/symbolize_keys_bm.rb
-#- spec/jruby/unpacker_spec.rb
-- spec/msgpack_spec.rb
-- spec/pack_spec.rb
-- spec/packer_spec.rb
-- spec/random_compat.rb
-- spec/spec_helper.rb
-- spec/unpack_spec.rb
-- spec/unpacker_spec.rb
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
new file mode 100644
index 0000000..ab96aad
--- /dev/null
+++ b/debian/ruby-tests.rb
@@ -0,0 +1,30 @@
+# These tests were already skipped in the original ruby-test-files.yaml
+SKIPPED_TESTS = [
+ './spec/jruby/benchmarks/shootout_bm.rb',
+ './spec/jruby/benchmarks/symbolize_keys_bm.rb',
+ './spec/jruby/unpacker_spec.rb',
+]
+
+# See https://bugs.debian.org/1088785
+SKIPPED_TESTS_PPC64EL = [
+ './spec/./msgpack_spec.rb',
+ './spec/./packer_spec.rb',
+ './spec/./unpacker_spec.rb',
+]
+
+arch=RbConfig::CONFIG["arch"]
+success=true
+Dir.glob("./spec/{*,.}/*.rb").each do |f|
+ next if SKIPPED_TESTS.include?(f)
+ if SKIPPED_TESTS_PPC64EL.include?(f) and arch == "powerpc64le-linux-gnu"
+ puts "I: Skipping #{f} on #{arch}"
+ next
+ end
+ puts "-------- running #{f} test ------- "
+ system("#{ENV['RUBY_TEST_BIN']} -I#{ENV['RUBYLIB']} #{f}") or begin
+ puts "E: Test #{f} has failed."
+ success=false
+ end
+end
+
+exit(1) unless(success)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20241222/7a28ceb8/attachment-0001.sig>
More information about the Pkg-ruby-extras-maintainers
mailing list