ack3 icon indicating copy to clipboard operation
ack3 copied to clipboard

t/ack-man.t, t/ack-x.t, t/invalid-ackrc.t: failures in 3 test files on OpenBSD-6.6

Open jkeenan opened this issue 5 years ago • 7 comments

Today I attempted (for the second time) to install App::Ack on a VM running OpenBSD-6.6 with perl-5.28.2 as the vendor perl and cpan as the installer.

$ uname -mrs
OpenBSD 6.6 amd64

I got failures in 3 test files. Excerpt from cpan output.

$ sudo cpan App::Ack
[snip]
Running install for module 'App::Ack'
Checksum for /root/.cpan/sources/authors/id/P/PE/PETDANCE/ack-v3.3.1.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring P/PE/PETDANCE/ack-v3.3.1.tar.gz with Makefile.PL
Running Perl v5.28.2 at /usr/bin/perl
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for ack
Writing MYMETA.yml and MYMETA.json
  PETDANCE/ack-v3.3.1.tar.gz
  /usr/bin/perl Makefile.PL -- OK
Running make for P/PE/PETDANCE/ack-v3.3.1.tar.gz
[snip]
cp ack blib/script/ack
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ack
Manifying 1 pod document
  PETDANCE/ack-v3.3.1.tar.gz
  /usr/bin/make -- OK
Running make test
Manifying 1 pod document
"/usr/bin/perl" t/runtests.pl 0 0 "blib/lib" "blib/arch" t/*.t
Running tests on blib/script/ack, ACK_TEST_STANDALONE=0
t/00-load.t .................. 1/20 # Testing ack v3.3.1 under Perl v5.28.2, /usr/bin/perl
# Using File::Next 1.18
# Using File::Spec 3.74
# Using Getopt::Long 2.5
# Using Pod::Perldoc 3.2801
# Using Pod::Text 4.10
# Using Pod::Usage 1.69
# Using Term::ANSIColor 4.06
# Using Test::Harness 3.42
# Using Test::More 1.302171
# PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
t/00-load.t .................. ok     
t/ack-1.t .................... ok     
t/ack-c.t .................... ok   
t/ack-color.t ................ ok     
t/ack-column.t ............... ok   
t/ack-f.t .................... ok   
t/ack-files-from.t ........... ok   
t/ack-g.t .................... ok     
t/ack-group.t ................ skipped: You need to install IO::Pty to run this test
t/ack-h.t .................... ok     
t/ack-help-types.t ........... ok     
t/ack-help.t ................. ok     
t/ack-i.t .................... ok   
t/ack-ignore-dir.t ........... ok     
t/ack-ignore-file.t .......... ok   
t/ack-k.t .................... ok   
t/ack-l.t .................... ok     
t/ack-m.t .................... ok   
t/ack-man.t .................. # 0
t/ack-man.t .................. 1/2 
#   Failed test 'Manual should be between 900-2000 lines long but is actually 0 long'
#   at t/ack-man.t line 23.
# --man start=[]
# --man end=[]

#   Failed test 'Nothing in STDERR'
#   at t/ack-man.t line 33.
# [
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value $roffer in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 53.',
#   'Use of uninitialized value in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 281.',
#   'Use of uninitialized value in pattern match (m//) at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 286.',
#   'Error while formatting with Pod::Perldoc::ToMan:',
#   ' no nroffer!?',
#   ' at /usr/libdata/perl5/Pod/Perldoc.pm line 1514.',
#   '',
#   '',
#   ' at /usr/bin/perldoc line 13.',
#   'Got a 0-length file from /root/.cpan/build/ack-v3.3.1-1/blib/script/ack via Pod::Perldoc::ToMan!?',
#   '',
#   ' at /usr/bin/perldoc line 13.'
# ]
# Looks like you failed 2 tests of 2.
t/ack-man.t .................. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests 
t/ack-match.t ................ ok   
t/ack-n.t .................... ok     
t/ack-o.t .................... ok   
t/ack-output.t ............... ok     
t/ack-pager.t ................ skipped: You need to install IO::Pty to run this test
t/ack-passthru.t ............. ok   
t/ack-print0.t ............... ok     
t/ack-proximate.t ............ ok   
t/ack-Q.t .................... ok   
t/ack-s.t .................... ok   
t/ack-show-types.t ........... ok     
t/ack-type-del.t ............. ok     
t/ack-type.t ................. ok     
t/ack-underline.t ............ ok   
t/ack-v.t .................... ok   
t/ack-w.t .................... ok     
t/ack-x.t .................... 1/2     # No tests run!

#   Failed test 'No tests run for subtest "GH #175"'
#   at t/ack-x.t line 100.
File /tmp/jYk2g43NBZ is still readable despite our attempts to changes its permissions at t/ack-x.t line 73.
# Looks like your test exited with 255 just after 2.
t/ack-x.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/2 subtests 
t/anchored.t ................. ok   
t/bad-ackrc-opt.t ............ ok   
t/basic.t .................... ok     
t/command-line-files.t ....... ok   
t/config-backwards-compat.t .. ok   
t/context-with-newlines.t .... ok   
t/context.t .................. ok     
t/double-hyphen.t ............ ok   
t/empty-lines.t .............. ok   
t/exit-code.t ................ ok   
t/file-permission.t .......... skipped: Can't be run as root
t/filetype-detection.t ....... ok   
t/filetypes.t ................ ok     
t/forbidden-options.t ........ ok   
t/from-stdin.t ............... ok   
t/highlighting.t ............. ok   
t/illegal-regex.t ............ ok   
t/incomplete-last-line.t ..... ok   
t/interactive.t .............. skipped: You need to install IO::Pty to run this test
t/invalid-ackrc.t ............ 1/3 
    #   Failed test 'Should have no output to stderr: ack --env --man'
    #   at t/invalid-ackrc.t line 78.
    #          got: '15'
    #     expected: '0'
    # STDERR:
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value $roffer in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 53.
    # Use of uninitialized value in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 281.
    # Use of uninitialized value in pattern match (m//) at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 286.
    # Error while formatting with Pod::Perldoc::ToMan:
    #  no nroffer!?
    #  at /usr/libdata/perl5/Pod/Perldoc.pm line 1514.
    # 
    # 
    #  at /usr/bin/perldoc line 13.
    # Got a 0-length file from /root/.cpan/build/ack-v3.3.1-1/blib/script/ack via Pod::Perldoc::ToMan!?
    # 
    #  at /usr/bin/perldoc line 13.
Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.
Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.

    #   Failed test at t/invalid-ackrc.t line 82.
    #                   '
    # '
    #     doesn't match '(?^ms:NAME.+ack(?:-standalone)?\s)'
    # Looks like you failed 2 tests of 2.
t/invalid-ackrc.t ............ 3/3 
#   Failed test 'Check --env --man'
#   at t/invalid-ackrc.t line 83.
# Looks like you failed 1 test of 3.
t/invalid-ackrc.t ............ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 
t/invalid-options.t .......... ok   
t/inverted-file-filter.t ..... ok   
t/line-endings.t ............. ok   
t/longopts.t ................. ok     
t/multiple-captures.t ........ ok   
t/mutex-options.t ............ ok       
t/named-pipes.t .............. ok   
t/needs-line-scan.t .......... ok   
t/noackrc.t .................. ok   
t/prescan-line-boundaries.t .. ok   
t/process-substitution.t ..... ok   
t/trailing-whitespace.t ...... ok   
t/zero.t ..................... ok   

Test Summary Report
-------------------
t/ack-man.t                (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
t/ack-x.t                  (Wstat: 65280 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 255
t/invalid-ackrc.t          (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=69, Tests=828, 150 wallclock secs ( 0.30 usr  0.81 sys + 81.85 cusr 63.37 csys = 146.33 CPU)
Result: FAIL
Failed 3/69 test programs. 4/828 subtests failed.
*** Error 255 in /root/.cpan/build/ack-v3.3.1-1 (Makefile:1056 'test_classic')
  PETDANCE/ack-v3.3.1.tar.gz
  /usr/bin/make test -- NOT OK
[snip]

I note that the failure in t/ack-x.t is similar to that which I reported on NetBSD in https://github.com/beyondgrep/ack3/issues/230.

Thank you very much. Jim Keenan

jkeenan avatar Feb 16 '20 00:02 jkeenan

I got similar failures (t/ack-man.t and t/invalid-ackrc.t) on Xubunru 20.04. After I installed perl-doc APT package, the test passed.

I think things are different in OpenBSD, though.

debug-ito avatar Sep 22 '20 05:09 debug-ito

Today I attempted to install App::Ack on OpenBSD-6.9. I failed twice, with failures similar to those I reported last year for an attempted installation on OpenBSD-6.4. Excerpts from the .cpanm log today:

cpanm (App::cpanminus) 1.7044 on perl 5.032001 built for amd64-openbsd
Work directory is /home/jkeenan/.cpanm/work/1622641416.39608
You have make /usr/bin/make
You have LWP 6.53
You have /bin/tar: 
!
! Can't write to /usr/local/libdata/perl5/site_perl and /usr/local/bin: Installing modules to /home/jkeenan/perl5
! To turn off this warning, you have to do one of the following:
!   - run me as a root or with --sudo option (to install to /usr/local/libdata/perl5/site_perl and /usr/local/bin)
!   - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
!   - Install local::lib by running the following commands
!
!         cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!

I believe I could work around that problem. I'm more concerned with the test failures below.

Searching App::Ack () on cpanmetadb ...
--> Working on App::Ack
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/ack-v3.5.0.tar.gz
-> OK
Unpacking ack-v3.5.0.tar.gz
Entering ack-v3.5.0
[# snip: all dependencies met]
t/00-load.t .................. ok
t/ack-m.t .................... ok
[# snip]
# 0

#   Failed test 'Manual should be between 900-2000 lines long but is actually 0 long'
#   at t/ack-man.t line 23.
# --man start=[]
# --man end=[]

#   Failed test 'Nothing in STDERR'
#   at t/ack-man.t line 33.
# [
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.',
#   'Use of uninitialized value $roffer in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 53.',
#   'Use of uninitialized value in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 281.',
#   'Use of uninitialized value in pattern match (m//) at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 286.',
#   'Error while formatting with Pod::Perldoc::ToMan:',
#   ' no nroffer!?',
#   ' at /usr/libdata/perl5/Pod/Perldoc.pm line 1514.',
#   '',
#   '',
#   ' at /usr/bin/perldoc line 13.',
#   'Got a 0-length file from /home/jkeenan/.cpanm/work/1622641416.39608/ack-v3.5.0/blib/script/ack via Pod::Perldoc::ToMan!?',
#   '',
#   ' at /usr/bin/perldoc line 13.'
# ]
# Looks like you failed 2 tests of 2.
t/ack-man.t .................. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests 
t/ack-match.t ................ ok
[# snip]
t/ack-Q.t .................... ok
cannot chdir to child for /tmp/zlkZ_GdO8W/foo: Permission denied at /usr/libdata/perl5/File/Temp.pm line 2628.
cannot remove directory for /tmp/zlkZ_GdO8W: Directory not empty at /usr/libdata/perl5/File/Temp.pm line 2628.
t/ack-s.t .................... ok
[# snip]
t/interactive.t .............. skipped: You need to install IO::Pty to run this test

    #   Failed test 'Should have no output to stderr: ack --env --man'
    #   at t/invalid-ackrc.t line 78.
    #          got: '15'
    #     expected: '0'
    # STDERR:
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value in split at /usr/libdata/perl5/Pod/Perldoc/BaseTo.pm line 74.
    # Use of uninitialized value $roffer in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 53.
    # Use of uninitialized value in concatenation (.) or string at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 281.
    # Use of uninitialized value in pattern match (m//) at /usr/libdata/perl5/Pod/Perldoc/ToMan.pm line 286.
    # Error while formatting with Pod::Perldoc::ToMan:
    #  no nroffer!?
    #  at /usr/libdata/perl5/Pod/Perldoc.pm line 1514.
    # 
    # 
    #  at /usr/bin/perldoc line 13.
    # Got a 0-length file from /home/jkeenan/.cpanm/work/1622641416.39608/ack-v3.5.0/blib/script/ack via Pod::Perldoc::ToMan!?
    # 
    #  at /usr/bin/perldoc line 13.
Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.
Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.

    #   Failed test at t/invalid-ackrc.t line 82.
    #                   '
    # '
    #     doesn't match '(?^ms:NAME.+ack(?:-standalone)?\s)'
    # Looks like you failed 2 tests of 2.

#   Failed test 'Check --env --man'
#   at t/invalid-ackrc.t line 83.
# Looks like you failed 1 test of 3.
t/invalid-ackrc.t ............ 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 
t/invalid-options.t .......... ok
[# snip]
Test Summary Report
-------------------
t/ack-man.t                (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
t/invalid-ackrc.t          (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=69, Tests=834, 144 wallclock secs ( 0.23 usr  0.29 sys + 99.84 cusr 41.21 csys = 141.57 CPU)
Result: FAIL
Failed 2/69 test programs. 3/834 subtests failed.

So two of the three tests which were failing last year are still failing.

Suggestions?

Thank you very much. Jim Keenan

jkeenan avatar Jun 02 '21 14:06 jkeenan

@jkeenan Could you give me an account on the box in question and let me see what I can figure out? I don't have any OpenBSD boxes handy.

petdance avatar Jun 02 '21 14:06 petdance

On 6/2/21 10:13 AM, Andy Lester wrote:

@jkeenan https://github.com/jkeenan Could you give me an account on the box in question and let me see what I can figure out?

Unfortunately, I cannot. It's a VM where I am not authorized to create accounts.

I will next try the p5-ack OpenBSD port.

Thank you very much. Jim Keenan

jkeenan avatar Jun 02 '21 14:06 jkeenan

Understood. Maybe I'll get an OpenBSD VM set up somewhere.

petdance avatar Jun 02 '21 14:06 petdance

On 6/2/21 10:17 AM, Andy Lester wrote:

Understood. Maybe I'll get an OpenBSD VM set up somewhere.

The OpenBSD p5-ack package installed and is usable.

Of course, I would have expected it to install, because AFAIK the test suite is not run when I'm simply installing a package (as opposed to installing a port).

I don't know whether I ever tried to install the package on my earlier OpenBSD VMs.

If I get a chance I'll try to run the failing test files through 'prove'.

jkeenan avatar Jun 02 '21 21:06 jkeenan

These errors also appear in CentOS7.

/usr/bin/perl t/runtests.pl 0 0 "blib/lib" "blib/arch" t/*.t
Running tests on blib/script/ack, ACK_TEST_STANDALONE=0
t/00-load.t .................. 1/20 # Testing ack v3.5.0 under Perl v5.16.3, /usr/bin/perl
# Using File::Next 1.18
# Using File::Spec 3.40
# Using Getopt::Long 2.4
# Using Pod::Perldoc 3.20
# Using Pod::Text 3.17
# Using Pod::Usage 1.63
# Using Term::ANSIColor 3.01
# Using Test::Harness 3.28
# Using Test::More 1.302185
# PATH=/sbin:/bin:/usr/sbin:/usr/bin
t/00-load.t .................. ok
t/ack-1.t .................... ok
t/ack-c.t .................... ok
t/ack-color.t ................ ok
t/ack-column.t ............... ok
t/ack-f.t .................... ok
t/ack-files-from.t ........... ok
t/ack-g.t .................... ok
t/ack-group.t ................ ok
t/ack-h.t .................... ok
t/ack-help-types.t ........... ok
t/ack-help.t ................. ok
t/ack-i.t .................... ok
t/ack-ignore-dir.t ........... ok
t/ack-ignore-file.t .......... ok
t/ack-k.t .................... ok
t/ack-l.t .................... ok
t/ack-m.t .................... ok
t/ack-man.t .................. # 0
t/ack-man.t .................. 1/2
#   Failed test 'Manual should be between 900-2000 lines long but is actually 0 long'
#   at t/ack-man.t line 23.
# --man start=[]
# --man end=[]
# Looks like you failed 1 test of 2.
t/ack-man.t .................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
t/ack-match.t ................ ok
t/ack-n.t .................... ok
t/ack-o.t .................... ok
t/ack-output.t ............... ok
t/ack-pager.t ................ ok
t/ack-passthru.t ............. ok
t/ack-print0.t ............... ok
t/ack-proximate.t ............ ok
t/ack-Q.t .................... ok
t/ack-s.t .................... ok
t/ack-show-types.t ........... ok
t/ack-type-del.t ............. ok
t/ack-type.t ................. ok
t/ack-underline.t ............ ok
t/ack-v.t .................... ok
t/ack-w.t .................... ok
t/ack-x.t .................... ok
t/anchored.t ................. ok
t/bad-ackrc-opt.t ............ ok
t/basic.t .................... ok
t/command-line-files.t ....... ok
t/config-backwards-compat.t .. ok
t/context-with-newlines.t .... ok
t/context.t .................. ok
t/double-hyphen.t ............ ok
t/empty-lines.t .............. ok
t/exit-code.t ................ ok
t/file-permission.t .......... skipped: Can't be run as root
t/filetype-detection.t ....... ok
t/filetypes.t ................ ok
t/forbidden-options.t ........ ok
t/from-stdin.t ............... ok
t/highlighting.t ............. ok
t/illegal-regex.t ............ ok
t/incomplete-last-line.t ..... ok
t/interactive.t .............. ok
t/invalid-ackrc.t ............ 1/3 Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.
Use of uninitialized value in join or string at t/invalid-ackrc.t line 80.

    #   Failed test at t/invalid-ackrc.t line 82.
    #                   '
    # '
    #     doesn't match '(?^ms:NAME.+ack(?:-standalone)?\s)'
    # Looks like you failed 1 test of 2.

#   Failed test 'Check --env --man'
#   at t/invalid-ackrc.t line 83.
# Looks like you failed 1 test of 3.
t/invalid-ackrc.t ............ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/invalid-options.t .......... ok
t/inverted-file-filter.t ..... ok
t/line-endings.t ............. ok
t/longopts.t ................. ok
t/multiple-captures.t ........ ok
t/mutex-options.t ............ ok
t/named-pipes.t .............. ok
t/needs-line-scan.t .......... ok
t/noackrc.t .................. ok
t/prescan-line-boundaries.t .. ok
t/process-substitution.t ..... ok
t/range.t .................... ok
t/trailing-whitespace.t ...... ok
t/zero.t ..................... ok

Test Summary Report
-------------------
t/ack-man.t                (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/invalid-ackrc.t          (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=70, Tests=860, 57 wallclock secs ( 0.81 usr  0.11 sys + 50.28 cusr  6.01 csys = 57.21 CPU)
Result: FAIL
Failed 2/70 test programs. 2/860 subtests failed.
make: *** [test_classic] Error 255

Hope to know the solution to this error. And also I wonder what these tests are for. I mean I can still make install successfully though make test failed.

GinXian avatar Jun 15 '21 08:06 GinXian