Fedora Account System
Red Hat Associate
Red Hat Customer
perl-BSON-1.12.2-16.fc43 fails to build in Fedora 43 because tests fail like this: t/mapping/dbref.t ................ ok Possible precedence problem between ! and string eq at /home/test/fedora/perl-BSON/perl-BSON-1.12.2-build/BSON-v1.12.2/blib/lib/BSON.pm line 99. t/mapping/decimal128.t ........... ok Possible precedence problem between ! and string eq at /home/test/fedora/perl-BSON/perl-BSON-1.12.2-build/BSON-v1.12.2/blib/lib/BSON.pm line 99. # Failed test 'Inf as double->double' # at t/mapping/double.t line 55. # got: 'NV' # expected: 'PVNV' # Failed test '-Inf as double->double' # at t/mapping/double.t line 55. # got: 'NV' # expected: 'PVNV' # Failed test 'NaN as double->double' # at t/mapping/double.t line 55. # got: 'NV' # expected: 'PVNV' # Failed test 'Inf as BSON::Double->BSON::Double' # at t/mapping/double.t line 69. # got: 'NV' # expected: 'PVNV' # Failed test '-Inf as BSON::Double->BSON::Double' # at t/mapping/double.t line 69. # got: 'NV' # expected: 'PVNV' # Failed test 'NaN as BSON::Double->BSON::Double' # at t/mapping/double.t line 69. # got: 'NV' # expected: 'PVNV' # Looks like you failed 6 tests of 39. t/mapping/double.t ............... Dubious, test returned 6 (wstat 1536, 0x600) Failed 6/39 subtests This is probably triggered by upgrading perl from 4:5.40.2-517.fc43 to 4:5.42.0-519.fc43.
The warning is unrelated. The failure appeared in 5.41.7 and this perldelta seems related: When assigning from an SVt_IV into a SVt_NV (or vice versa), providing that both are "bodyless" types, Perl_sv_setsv_flags will now just change the destination type to match the source type. Previously, an SVt_IV would have been upgraded to a SVt_PVNV to store an NV, and an SVt_NV would have been upgraded to a SVt_PVIV to store an IV. This change prevents the need to allocate - and later free - the relevant body struct. That probably corresponds to perl commit fbebf96ce083dc15b63c04d5695997d6e2657b03 ("Perl_sv_setsv_flags: handle mixed IV and NV fast case"). When minimizing the failing test too much: my $hash = decode( encode( { A => unpack("d<",pack("H*","000000000000f0ff")) } ) ); is( ref(B::svref_2object( \$hash->{A} )), 'B::PVNV', "double->double" ); the type becomes NV not only on perl 5.42.0 but also on perl 5.40.2. If one calls: my $hash2 = decode( encode( { A => 3.14159 } ), wrap_numbers => 1); before the test, the test returns PVPN on old perl. I conclude the test or the BSON code builds on a side effect of the interpreter implementation which does not hold true anymore. Normally I would adjust the test, but here BSON task is to reproduce Perl data structures and it does not reproduce them anymore. I'm keen to remove perl-BSON and perl-Mongo from Rawhide. It's unmaintained since 2020 by upstream.
Actually BSON::decode(, wrap_numbers => 1) is documented to "ensure fields can round-trip if unmodified". So any decoding without wrap_numbers == 1 does not guarantee preserving the type. Maybe the change in the decoding is acceptable.
Actually new perl behaves better: Input in the test is NV. Output in the new perl is also NV, while in the old perl it was PVNV.