demerphq / Data-Dump-Streamer

Data::Dump::Streamer - DDS - Accurately serialize a data structure as Perl code.
http://search.cpan.org/dist/Data-Dump-Streamer/
3 stars 11 forks source link

2.40: test suite is failing #17

Open kloczek opened 2 years ago

kloczek commented 2 years ago

Build log:

+ /usr/bin/perl Build.PL --installdirs=vendor '--optimize=-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1'
Installing Data::Dump::Streamer

I can install a shortcut so you can use the package 'DDS'
as though it was 'Data::Dump::Streamer'. This is handy for oneliners.
*Note* that if you select 'no' below and you already
have it installed then it will be removed.

Would you like me to install the shortcut? (yes/no) [no ]Checking prerequisites...
  requires:
    !  Hash::Util is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Run 'Build installdeps' to install missing prerequisites.

I will also install DDS as an alias.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Data-Dump-Streamer' version '2.40'
+ ./Build
Building Data-Dump-Streamer
/usr/bin/gcc -I/usr/lib64/perl5/CORE -DVERSION="2.40" -DXS_VERSION="2.40" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -g -o lib/Data/Dump/Streamer.o lib/Data/Dump/Streamer.c
lib/Data/Dump/Streamer.xs: In function 'XS_Data__Dump__Streamer_alias_ref':
lib/Data/Dump/Streamer.xs:542:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  542 |     if (!(dt < SVt_PVAV && st < SVt_PVAV || dt == st && dt <= SVt_PVHV))
      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
lib/Data/Dump/Streamer.xs: At top level:
lib/Data/Dump/Streamer.xs:152:1: warning: 'num_q' defined but not used [-Wunused-function]
  152 | num_q(register char *s, register STRLEN slen)
      | ^~~~~
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Data/Dump/Streamer/Streamer.bs')
/usr/bin/gcc -lpthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -L/usr/local/lib -fstack-protector-strong -lperl -o blib/arch/auto/Data/Dump/Streamer/Streamer.so lib/Data/Dump/Streamer.o

And test suites execution:
```console
+ cd Data-Dump-Streamer-2.40
+ ./Build test
t/as.t .............. ok
t/blessed.t ......... ok
t/dogpound.t ........ ok
t/dump.t ............ ok
t/filter.t .......... ok
t/globtest.t ........ ok
t/hardrefs.t ........ ok
t/impure_madness.t .. ok
t/lexicals.t ........ #
# PadWalker 2.5 is installed
t/lexicals.t ........ ok
t/locked.t .......... 1/11 Unhandled method/subroutine call Data::Dump::Streamer::lock_keys at /home/tkloczko/rpmbuild/BUILD/Data-Dump-Streamer-2.40/blib/lib/Data/Dump/Streamer.pm line 3680.
        Data::Dump::Streamer::AUTOLOAD("a8", "a9", "a4", "a5", "a0", "a1", "a2", "a3", ...) called at t/locked.t line 32
# Looks like your test exited with 255 just after 2.
t/locked.t .......... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 9/11 subtests
t/madness.t ......... ok
t/madness_json.t .... ok
t/madness_w.t ....... ok
t/names.t ........... ok
t/overload.t ........ ok
t/readonly.t ........ ok
t/refaddr.t ......... ok
t/refcount.t ........ ok
t/refelem.t ......... ok
t/reftype.t ......... ok
t/sortkeys.t ........ ok
t/tree.t ............ ok
t/usage.t ........... ok
t/xs_subs.t ......... 1/36 Unhandled method/subroutine call Data::Dump::Streamer::lock_keys at /home/tkloczko/rpmbuild/BUILD/Data-Dump-Streamer-2.40/blib/lib/Data/Dump/Streamer.pm line 3680.
        Data::Dump::Streamer::AUTOLOAD("a", 1, "d", 1, "e", 1, "f", 1, ...) called at t/xs_subs.t line 41
# Looks like your test exited with 255 just after 10.
t/xs_subs.t ......... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 26/36 subtests

Test Summary Report
-------------------
t/locked.t        (Wstat: 65280 Tests: 2 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 11 tests but ran 2.
t/xs_subs.t       (Wstat: 65280 Tests: 10 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 36 tests but ran 10.
Files=24, Tests=334,  4 wallclock secs ( 0.19 usr  0.08 sys +  2.99 cusr  0.43 csys =  3.69 CPU)
Result: FAIL
Failed 2/24 test programs. 0/334 subtests failed.
demerphq commented 2 years ago

Thanks, can you try installing Hash::Util? It is not listed because it should come as part of the Perl distribution. I will fix that.

kloczek commented 2 years ago

Added and it works now.

+ ./Build test
t/as.t .............. ok
t/blessed.t ......... ok
t/dogpound.t ........ ok
t/dump.t ............ ok
t/filter.t .......... ok
t/globtest.t ........ ok
t/hardrefs.t ........ ok
t/impure_madness.t .. ok
t/lexicals.t ........ #
# PadWalker 2.5 is installed
t/lexicals.t ........ ok
t/locked.t .......... ok
t/madness.t ......... ok
t/madness_json.t .... ok
t/madness_w.t ....... ok
t/names.t ........... ok
t/overload.t ........ ok
t/readonly.t ........ ok
t/refaddr.t ......... ok
t/refcount.t ........ ok
t/refelem.t ......... ok
t/reftype.t ......... ok
t/sortkeys.t ........ ok
t/tree.t ............ ok
t/usage.t ........... ok
t/xs_subs.t ......... ok
All tests successful.

It would be good to have kind of clear indication that module is missing ..

Thank you and closing.

demerphq commented 2 years ago

Frankly I dont like Build.PL someone converted the project to that for me and I never had the patience to convert it back.

FWIW, the output you pased did include this:

Checking prerequisites...
  requires:
    !  Hash::Util is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Run 'Build installdeps' to install missing prerequisites.

I have reopened because the test files should not fail if Hash::Util is missing, they should skip all and report there is no Hash::Util to use.