rurban / perl-compiler

B::C - Moved over from googlecode
https://code.google.com/p/perl-compiler/
Other
63 stars 23 forks source link

Some test suite failures on Fedora x86_64 with a threaded build of perl 5.24.4 #444

Open agentzh opened 1 year ago

agentzh commented 1 year ago

I'm observing some consistent test failures while running perlcc's test suite (the latest github master, commit 862bdf25e) on Fedora x86_64 using a multi-threaded build of perl 5.24.4:

#   Failed test 'C \#305 compile-time Encode::XS encodings'
#   at t/TestBC.pm line 1314.
t/issue169.t ...... ok

#   Failed test 'C \#365 compile-time Encode subtypes'
#   at t/TestBC.pm line 1314.
# Looks like you failed 2 tests of 3.
t/issue305.t ......
not ok 1 - C \#305 compile-time Encode::XS encodings
not ok 3 - C \#365 compile-time Encode subtypes
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3 subtests
...
#   Failed test 'TODO, blocking as method_name saved'
#   at t/issue95.t line 73.
ccode95i_5c_o3.c: In function ‘main’:
ccode95i_5c_o3.c:197859:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 main(int argc, char **argv, char **env)
 ^~~~
Warning: Write BEGIN-block main::$out to FileHandle > &4
ccode93iw_8c.pl syntax OK
Warning: Write BEGIN-block main::$out to FileHandle > &4
ccode93iw_9cc.pl syntax OK
...
# Looks like you failed 2 tests of 5.
t/issue95.t .......
not ok 2 - TODO, blocking as method_name saved
not ok 4 - TODO, blocking as method_name saved
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests
    (1 TODO test unexpectedly succeeded)
Warning: Label not found at compile time for "last GETFILE"
Warning: Label not found at compile time for "last GETFILE"
...
Test Summary Report
-------------------
t/issue305.t    (Wstat: 512 Tests: 3 Failed: 2)
  Failed tests:  1, 3
  Non-zero exit status: 2
t/issue95.t     (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  2, 4
  TODO passed:   5
  Non-zero exit status: 2
...

Is it something we should concern about? Also, I wonder how you folks would debug such test failures, like locating the C source file and the binary executables for the failed subtests only. I found it pretty hard to dig deeper here.

It's worth mentioning that we don't have any custom patches in B::C or the perl itself.

Thanks for your help!

agentzh commented 1 year ago

The single-threaded build of perl 5.24.4 has some different test failures:

#   Failed test '7: use Pod::Usage -O3 gives expected 'ok' output'
#   at t/modules.t line 253.
#                   ''
#     doesn't match '(?^ms:ok$)'
# Failed: /home/opt/perl524/bin/perl -Iblib/arch -Iblib/lib blib/script/perlcc -O3 -opccPod_Usage -r pccPod_Usage.pl -e 'use Pod::Usage; print "ok"'

#   Failed test '8: use Pod::Simple -O3 gives expected 'ok' output'
#   at t/modules.t line 253.
#                   ''
#     doesn't match '(?^ms:ok$)'
# Failed: /home/opt/perl524/bin/perl -Iblib/arch -Iblib/lib blib/script/perlcc -O3 -opccPod_Simple -r pccPod_Simple.pl -e 'use Pod::Simple; print "ok"'
# c
# pass   8 /  10 (80.0%)
# fail   2 /  10 (20.0%)
# todo   0 /   2 (0.0%)
# skip   0 /  10 (0.0% not installed)
# Looks like you failed 2 tests of 40.
t/modules.t .......
not ok 27 - 7: use Pod::Usage -O3 gives expected 'ok' output
not ok 31 - 8: use Pod::Simple -O3 gives expected 'ok' output
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/40 subtests

Test Summary Report
-------------------
t/modules.t     (Wstat: 512 Tests: 40 Failed: 2)
  Failed tests:  27, 31
  Non-zero exit status: 2

In either case, I didn't mention the t/manifest.t test failures since that's unimportant.

rurban commented 1 year ago

The problem is the threaded perl. There much more known errors with the thread structures, I didn't catch up with.