Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

ext/GDBM_File/t/gdbm.t: Unexpected test failures #19482

Open jkeenan opened 2 years ago

jkeenan commented 2 years ago

I am encountering an unexpected test failure in ext/GDBM_File/t/gdbm.t in three situations: (i) building from the perl-5.34.1-RC1 tarball; (ii) building from the perl-5.34.0 tarball; (ii) smoke-testing in the maint-5.34 branch.

Testing from the 5.34.1-RC1 tarball:

[perlmonger: perl-5.34.1-RC1] $ ./perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing';
[perlmonger: perl-5.34.1-RC1] $ cd t;TEST_JOBS=1 ./perl harness ../ext/GDBM_File/t/*.t; cd -
../ext/GDBM_File/t/count.t .. ok   
../ext/GDBM_File/t/fatal.t .. ok   
../ext/GDBM_File/t/gdbm.t ... 1/? gdbm_firstkey: Item not found at ../../t/lib/dbmt_common.pl line 52.
Compilation failed in require at t/gdbm.t line 6.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 5.
../ext/GDBM_File/t/gdbm.t ... Dubious, test returned 255 (wstat 65280, 0xff00)
All 5 subtests passed 
../ext/GDBM_File/t/opt.t .... ok   

Test Summary Report
-------------------
../ext/GDBM_File/t/gdbm.t (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=4, Tests=24,  1 wallclock secs ( 0.01 usr  0.02 sys +  0.33 cusr  0.09 csys =  0.45 CPU)
Result: FAIL

Testing from last year's 5.34.0 tarball: same as above.

Smoke-testing in the maint-5.34 branch: See https://perl5.test-smoke.org/report/5016351. The failure output in my smoketesting log is consistently:

gdbm_firstkey: Item not found at ../../t/lib/dbmt_common.pl line 52.
Compilation failed in require at t/gdbm.t line 6.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 5.

What makes this failure unexpected are the following:

Suggestions?

jkeenan commented 2 years ago

To add to the weirdness ... when I build from a git checkout of the v5.35.1 tag, the test fails.

[perlmonger: perl2] $ gitcurr
(HEAD detached at v5.35.1)
[perlmonger: perl2] $ cd t; ./perl harness -v ../ext/GDBM_File/t/gdbm.t; cd -

ok 1 - use GDBM_File;
ok 2 - (eval q{(GDBM_WRCREAT, GDBM_WRITER)})[0]
ok 3 - (eval q{(GDBM_WRCREAT, GDBM_WRITER)})[1]
ok 4 - An object of class 'GDBM_File' isa 'GDBM_File'
ok 5
gdbm_firstkey: Item not found at ../../t/lib/dbmt_common.pl line 52.
Compilation failed in require at t/gdbm.t line 6.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 5.
Dubious, test returned 255 (wstat 65280, 0xff00)
All 5 subtests passed 

Test Summary Report
-------------------
../ext/GDBM_File/t/gdbm.t (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=1, Tests=5,  1 wallclock secs ( 0.01 usr  0.01 sys +  0.09 cusr  0.00 csys =  0.11 CPU)
Result: FAIL

When I build from a git checkout of the v5.35.2 tag, the test passes.

[perlmonger: perl2] $ gitcurr
(HEAD detached at v5.35.2)
[perlmonger: perl2] $ cd t; ./perl harness ../ext/GDBM_File/t/gdbm.t; cd -
../ext/GDBM_File/t/gdbm.t .. ok     
All tests successful.
Files=1, Tests=134,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.10 cusr  0.02 csys =  0.16 CPU)
Result: PASS
jkeenan commented 2 years ago

I am encountering an unexpected test failure in ext/GDBM_File/t/gdbm.t in three situations: (i) building from the perl-5.34.1-RC1 tarball; (ii) building from the perl-5.34.0 tarball; (ii) smoke-testing in the maint-5.34 branch.

More data; history of gdbm on this host:

$ bzgrep -i gdbm /var/log/messages*
/var/log/messages.0.bz2:Dec 10 14:34:45 perlmonger pkg[1675]: gdbm upgraded: 1.19 -> 1.21 
/var/log/messages.1.bz2:Jun 13 12:23:05 perlmonger pkg[65990]: gdbm upgraded: 1.18.1_1 -> 1.19 
/var/log/messages.1.bz2:Jun 13 12:23:05 perlmonger pkg[65990]: p5-GDBM-1.14_5 installed
/var/log/messages.2.bz2:Jan 11 13:55:29 perlmonger pkg[90850]: gdbm reinstalled: 1.18.1_1 -> 1.18.1_1 

(hat-tip to nomadlogic on #nycbug)

Leont commented 2 years ago

This sounds like aacd2398e766500cb5d83c4d76b642fcf31d997a and/or 5bc1e5fdd87aa205011512cd1e6cc655bcf677fd would be involved

jkeenan commented 2 years ago

This sounds like 5bc1e5f

Are you suggesting that that commit be backported to 5.34.1?

jkeenan commented 2 years ago

I am encountering an unexpected test failure in ext/GDBM_File/t/gdbm.t in three situations: (i) building from the perl-5.34.1-RC1 tarball; (ii) building from the perl-5.34.0 tarball; (ii) smoke-testing in the maint-5.34 branch.

I'm also getting this failure on FreeBSD-13, where the installed gdbm is version 1.22, when building a threaded perl from the 5.34.1-RC1 tarball.

[freebsd13: perl-5.34.1-RC1] $ uname -mrs
FreeBSD 13.0-RELEASE amd64
[freebsd13: perl-5.34.1-RC1] $ ./perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing';
[freebsd13: perl-5.34.1-RC1] $ cd t;TEST_JOBS=1 ./perl harness -v ../ext/GDBM_File/t/gdbm.t; cd -
../ext/GDBM_File/t/gdbm.t .. 
ok 1 - use GDBM_File;
ok 2 - (eval q{(GDBM_WRCREAT, GDBM_WRITER)})[0]
ok 3 - (eval q{(GDBM_WRCREAT, GDBM_WRITER)})[1]
ok 4 - An object of class 'GDBM_File' isa 'GDBM_File'
ok 5
gdbm_firstkey: Item not found at ../../t/lib/dbmt_common.pl line 52.
Compilation failed in require at t/gdbm.t line 6.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 5.
Dubious, test returned 255 (wstat 65280, 0xff00)
All 5 subtests passed 

Test Summary Report
-------------------
../ext/GDBM_File/t/gdbm.t (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=1, Tests=5,  0 wallclock secs ( 0.00 usr  0.01 sys +  0.07 cusr  0.02 csys =  0.09 CPU)
Result: FAIL
jkeenan commented 2 years ago

This sounds like 5bc1e5f

Are you suggesting that that commit be backported to 5.34.1?

Let's give this a spin In the smoke-me/jkeenan/gh-19482-maint-5.34-gdbm-problem-20220303 branch.

Or in this p.r., created by cherry-picking Sergey's commit and resolving some merge conflicts.

steve-m-hay commented 2 years ago

On Fri, 4 Mar 2022 at 00:54, James E Keenan @.***> wrote:

This sounds like 5bc1e5f https://github.com/Perl/perl5/commit/5bc1e5fdd87aa205011512cd1e6cc655bcf677fd

Are you suggesting that that commit be backported to 5.34.1?

Let's give this a spin In the smoke-me/jkeenan/gh-19482-maint-5.34-gdbm-problem-20220303 branch.

I've added the fix to the voting file so we can get it pulled it (assuming all goes well with the smoking of it).

jkeenan commented 1 year ago

On Fri, 4 Mar 2022 at 00:54, James E Keenan @.***> wrote: This sounds like 5bc1e5f <5bc1e5f> Are you suggesting that that commit be backported to 5.34.1? Let's give this a spin In the smoke-me/jkeenan/gh-19482-maint-5.34-gdbm-problem-20220303 branch. I've added the fix to the voting file so we can get it pulled it (assuming all goes well with the smoking of it).

@steve-m-hay, can you give us an update on the backporting aspect of this issue?