beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

FYI: ack-2.12 / ack-2.13_02 / WIN32 XP SP3 Test Results #432

Closed parmstro64 closed 10 years ago

parmstro64 commented 10 years ago

ack-2.10 passes all tests while ack-2.12 and ack-2.13_02 have problems that have been reported and presume are being addressed.

Tests are performed in Perl-5.16.3 on Win32 XP-SP3 (A strawberry-like configuration using gcc-4.7.3). The perl configuration detail, test failure summaries, and the verbose test failure outputs for ack-2.12 and ack-2.13_02 are given below.

Regards, Pete Armstrong

Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
----------------
  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.7.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"e:\usr\lib\CORE" -L"e:\usr\mingw\lib" -L"e:\usr\mingw\i686-w
64-mingw32\lib"'
    libpth=e:\usr\mingw\lib e:\usr\mingw\i686-w64-mingw32\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32
 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshe
ll32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbc
cp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl516.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"e:\usr\lib\CORE" -L"e:\usr\mingw\lib" -L"e:\usr
\mingw\i686-w64-mingw32\lib"'

Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
                        USE_ITHREADS USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
                        USE_SITECUSTOMIZE
  Built under MSWin32
  Compiled at Jun 12 2013 19:49:10
  @INC:
    E:/usr/site/lib
    E:/usr/vendor/lib
    E:/usr/lib

ACK-2.12 Test Summary Report
----------------------------
t/ack-g.t                  (Wstat: 256 Tests: 18 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
t/ack-match.t              (Wstat: 1280 Tests: 15 Failed: 5)
  Failed tests:  11-15
  Non-zero exit status: 5
t/ack-o.t                  (Wstat: 1280 Tests: 13 Failed: 5)
  Failed tests:  9-13
  Non-zero exit status: 5
t/config-finder.t          (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 0.
t/highlighting.t           (Wstat: 768 Tests: 6 Failed: 3)
  Failed tests:  2, 4, 6
  Non-zero exit status: 3
t/noenv.t                  (Wstat: 512 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 1.
Files=86, Tests=871, 352 wallclock secs ( 1.38 usr +  0.70 sys =  2.08 CPU)
Result: FAIL

Test Fails Output 2.12:
------------------------
[18:19:21] t/ack-g.t .................... 
ok 16 - test -g on a path
    # Subtest: test -g with --color
    ok 1 - Should have no output to stderr: ack --sort-files -g text --color
    not ok 2 - Colorizing -g output with --color should work
    1..2
not ok 17 - test -g with --color
    # Subtest: test -g without --color; make sure colors don't show
    1..0 # SKIP IO::Pty is required for this test
ok 18 # skip IO::Pty is required for this test
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/18 subtests 
    (less 1 skipped subtest: 16 okay)

[18:19:57] t/ack-match.t ................ 
not ok 11
not ok 12
not ok 13
not ok 14
not ok 15
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/15 subtests 

[18:20:05] t/ack-o.t .................... 
not ok 9
not ok 10
not ok 11
not ok 12
not ok 13
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/13 subtests 

[18:20:30] t/ack-w.t .................... 
not ok 5 - Automatically fail stderr check for TODO tests. # TODO I can't figure why the -w works from the command line, but not inside this test

#   Failed (TODO) test 'Automatically fail stderr check for TODO tests.'
#   at t/ack-w.t line 48.
    # Subtest: ack_lists_match( Looking for mu. )
    1..1
        # Subtest: lists_match( Looking for mu. )
        1..1
        not ok 1 - Looking for mu.

        #   Failed test 'Looking for mu.'
        #   at t/Util.pm line 387.
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # | Elt|Got                                                             | Elt|Expected                                                        |
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # *   0|'And he didn\'t leave very much for my Ma and me'               *    |                                                                |
        # *   1|'Well, he must have thought that it was quite a joke'           *    |                                                                |
        # |   2|'At an old saloon on a street of mud,'                          |   0|'At an old saloon on a street of mud,'                          |
        # |   3|'Kicking and a-gouging in the mud and the blood and the beer.'  |   1|'Kicking and a-gouging in the mud and the blood and the beer.'  |
        # *   4|'He kicked like a mule and he bit like a crocodile.'            *    |                                                                |
        # *   5|'Science and religion are not mutually exclusive'               *    |                                                                |
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # actual[
        #   'And he didn\'t leave very much for my Ma and me',
        #   'Well, he must have thought that it was quite a joke',
        #   'At an old saloon on a street of mud,',
        #   'Kicking and a-gouging in the mud and the blood and the beer.',
        #   'He kicked like a mule and he bit like a crocodile.',
        #   'Science and religion are not mutually exclusive'
        # ]
        # expected[
        #   'At an old saloon on a street of mud,',
        #   'Kicking and a-gouging in the mud and the blood and the beer.'
        # ]
        # Looks like you failed 1 test of 1.
    not ok 1 - lists_match( Looking for mu. )

    #   Failed test 'lists_match( Looking for mu. )'
    #   at t/Util.pm line 415.
    # $ ack mu. -w -h t/text
    # Looks like you failed 1 test of 1.
not ok 6 - ack_lists_match( Looking for mu. ) # TODO I can't figure why the -w works from the command line, but not inside this test

#   Failed (TODO) test 'ack_lists_match( Looking for mu. )'
#   at t/ack-w.t line 48.

[18:20:44] t/config-finder.t ............ 
1..26
Dubious, test returned 2 (wstat 512, 0x200)
Failed 26/26 subtests 

[18:21:38] t/highlighting.t ............. 
1..6
not ok 2 - Basic highlights match
not ok 4 - Metacharacters match
not ok 6 - Context is all good
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/6 subtests 

[18:23:54] t/noenv.t .................... 
1..5
    # Subtest: without --noenv
not ok 1 - without --noenv
Dubious, test returned 2 (wstat 512, 0x200)
Failed 5/5 subtests 

ACK-2.13_02 Test Summary Report
-------------------------------
t/ack-c.t                  (Wstat: 768 Tests: 14 Failed: 4)
  Failed tests:  10-11, 13-14
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 12 tests but ran 14.
t/ack-color.t              (Wstat: 768 Tests: 13 Failed: 3)
  Failed tests:  8-10
  Non-zero exit status: 3
t/ack-match.t              (Wstat: 1280 Tests: 14 Failed: 5)
  Failed tests:  10-14
  Non-zero exit status: 5
t/ack-o.t                  (Wstat: 1280 Tests: 12 Failed: 5)
  Failed tests:  8-12
  Non-zero exit status: 5
t/ack-type.t               (Wstat: 1536 Tests: 16 Failed: 6)
  Failed tests:  9-11, 13-15
  Non-zero exit status: 6
t/ack-x.t                  (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
t/config-finder.t          (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 0.
t/context.t                (Wstat: 3584 Tests: 32 Failed: 14)
  Failed tests:  11-22, 25-26
  Non-zero exit status: 14
t/noenv.t                  (Wstat: 512 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 1.
Files=86, Tests=864, 358 wallclock secs ( 1.70 usr +  1.20 sys =  2.91 CPU)
Result: FAIL

Test Fails Output 2.13_02:
-----------------------------
[18:27:09] t/ack-c.t .................... 
not ok 10 - Piping into ack --count should return one line of results
not ok 11 - Piping into ack --count should return one line of results
not ok 14 - planned to run 12 but done_testing() expects 13 <<
Dubious, test returned 3 (wstat 768, 0x300)
Failed 2/12 subtests 

[18:27:12] t/ack-color.t ................ 
not ok 8 - Should have no output to stderr: ack v.+?m|c.+?n -w --color t/text/freedom-of-choice.txt
not ok 9 - multiple matches on 1 line
not ok 10 - multiple matches highlighted
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/13 subtests

[18:28:48] t/ack-match.t ................ 
not ok 10
not ok 11
not ok 12
not ok 13
not ok 14
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/14 subtests 

[18:28:57] t/ack-o.t .................... 
not ok 8
not ok 9
not ok 10
not ok 11
not ok 12
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/12 subtests 

[18:29:22] t/ack-type.t ................. 
not ok 9 - Should have no output to stderr: ack --nohtml --html --sort-files <title> t/swamp
not ok 10
not ok 11 - Should have no output to stderr: ack --html --nohtml <title> t/swamp
not ok 13 - Should have no output to stderr: ack --html --sort-files <title> t/swamp
not ok 14
not ok 15 - Should have no output to stderr: ack --nohtml <title> t/swamp
Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/16 subtests

[18:29:25] t/ack-v.t .................... 
not ok 5 - Automatically fail stderr check for TODO tests. # TODO I can't figure why the -w works from the command line, but not inside this test

#   Failed (TODO) test 'Automatically fail stderr check for TODO tests.'
#   at t/ack-w.t line 48.
    # Subtest: ack_lists_match( Looking for mu. )
    1..1
        # Subtest: lists_match( Looking for mu. )
        1..1
        not ok 1 - Looking for mu.

        #   Failed test 'Looking for mu.'
        #   at t/Util.pm line 408.
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # | Elt|Got                                                             | Elt|Expected                                                        |
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # *   0|'And he didn\'t leave very much for my Ma and me'               *    |                                                                |
        # *   1|'Well, he must have thought that it was quite a joke'           *    |                                                                |
        # |   2|'At an old saloon on a street of mud,'                          |   0|'At an old saloon on a street of mud,'                          |
        # |   3|'Kicking and a-gouging in the mud and the blood and the beer.'  |   1|'Kicking and a-gouging in the mud and the blood and the beer.'  |
        # *   4|'He kicked like a mule and he bit like a crocodile.'            *    |                                                                |
        # *   5|'Science and religion are not mutually exclusive'               *    |                                                                |
        # +----+----------------------------------------------------------------+----+----------------------------------------------------------------+
        # actual[
        #   'And he didn\'t leave very much for my Ma and me',
        #   'Well, he must have thought that it was quite a joke',
        #   'At an old saloon on a street of mud,',
        #   'Kicking and a-gouging in the mud and the blood and the beer.',
        #   'He kicked like a mule and he bit like a crocodile.',
        #   'Science and religion are not mutually exclusive'
        # ]
        # expected[
        #   'At an old saloon on a street of mud,',
        #   'Kicking and a-gouging in the mud and the blood and the beer.'
        # ]
        # Looks like you failed 1 test of 1.
    not ok 1 - lists_match( Looking for mu. )

    #   Failed test 'lists_match( Looking for mu. )'
    #   at t/Util.pm line 436.
    # $ ack mu. -w -h t/text
    # Looks like you failed 1 test of 1.
not ok 6 - ack_lists_match( Looking for mu. ) # TODO I can't figure why the -w works from the command line, but not inside this test

#   Failed (TODO) test 'ack_lists_match( Looking for mu. )'
#   at t/ack-w.t line 48.
ok     2726 ms

[18:29:29] t/ack-x.t .................... 
1..2
    # Subtest: sets_match( t/ack-x.t )
    1..1
        # Subtest: lists_match( t/ack-x.t )
        1..1
        not ok 1 - t/ack-x.t
    not ok 1 - lists_match( t/ack-x.t )
not ok 1 - sets_match( t/ack-x.t )
not ok 2
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests

[18:29:40] t/config-finder.t ............ 
1..26
Dubious, test returned 2 (wstat 512, 0x200)
Failed 26/26 subtests

[18:29:47] t/context.t .................. 
not ok 11 - Should have no output to stderr: ack -C 05|06 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 05|06 with overlapping contexts )
    1..1
        # Subtest: lists_match( Looking for 05|06 with overlapping contexts )
        1..1
        not ok 1 - Looking for 05|06 with overlapping contexts
    not ok 1 - lists_match( Looking for 05|06 with overlapping contexts )
not ok 12 - ack_lists_match( Looking for 05|06 with overlapping contexts )
not ok 13 - Should have no output to stderr: ack -C 03|08 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 03|08 with contexts that touch )
    1..1
        # Subtest: lists_match( Looking for 03|08 with contexts that touch )
        1..1
        not ok 1 - Looking for 03|08 with contexts that touch
    not ok 1 - lists_match( Looking for 03|08 with contexts that touch )
not ok 14 - ack_lists_match( Looking for 03|08 with contexts that touch )
not ok 15 - Should have no output to stderr: ack -C 03|09 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 03|09 with contexts that just don't touch )
    1..1
        # Subtest: lists_match( Looking for 03|09 with contexts that just don't touch )
        1..1
        not ok 1 - Looking for 03|09 with contexts that just don't touch
    not ok 1 - lists_match( Looking for 03|09 with contexts that just don't touch )
not ok 16 - ack_lists_match( Looking for 03|09 with contexts that just don't touch )
not ok 17 - Should have no output to stderr: ack --color -C 05|06 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 05|06 with overlapping contexts )
    1..1
        # Subtest: lists_match( Looking for 05|06 with overlapping contexts )
        1..1
        not ok 1 - Looking for 05|06 with overlapping contexts
    not ok 1 - lists_match( Looking for 05|06 with overlapping contexts )
not ok 18 - ack_lists_match( Looking for 05|06 with overlapping contexts )
not ok 19 - Should have no output to stderr: ack --color -B2 05|06 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 05|06 with overlapping contexts )
    1..1
        # Subtest: lists_match( Looking for 05|06 with overlapping contexts )
        1..1
        not ok 1 - Looking for 05|06 with overlapping contexts
    not ok 1 - lists_match( Looking for 05|06 with overlapping contexts )
not ok 20 - ack_lists_match( Looking for 05|06 with overlapping contexts )
not ok 21 - Should have no output to stderr: ack --color -A2 05|06 t/text/numbered-text.txt
    # Subtest: ack_lists_match( Looking for 05|06 with overlapping contexts )
    1..1
        # Subtest: lists_match( Looking for 05|06 with overlapping contexts )
        1..1
        not ok 1 - Looking for 05|06 with overlapping contexts
    not ok 1 - lists_match( Looking for 05|06 with overlapping contexts )
not ok 22 - ack_lists_match( Looking for 05|06 with overlapping contexts )
ok 23 - Should have no output to stderr: ack -m3 -C1 ya t/text/boy-named-sue.txt
    # Subtest: ack_lists_match( Looking for ya with -m3 )
    1..1
        # Subtest: lists_match( Looking for ya with -m3 )
        1..1
        ok 1 - Looking for ya with -m3
    ok 1 - lists_match( Looking for ya with -m3 )
ok 24 - ack_lists_match( Looking for ya with -m3 )
not ok 25 - Only two lines are highlighted
not ok 26 - Expecting altogether 18 lines back
Dubious, test returned 14 (wstat 3584, 0xe00)
Failed 14/32 subtests 

[18:32:52] t/noenv.t .................... 
1..5
    # Subtest: without --noenv
not ok 1 - without --noenv
Dubious, test returned 2 (wstat 512, 0x200)
Failed 5/5 subtests

During the test two file are created : HASH(0x3f9bdc) and HASH(0x9bb75c). I do not believe these file are the intended files to be created and most likely tied to one of the failing tests above.

petdance commented 10 years ago

Thanks for the bug report. Can you tell which of the failing .t files is generating the HASHxxxx files?

parmstro64 commented 10 years ago

I will find the test file and test(s) that generates the HASH files and let you know ASAP. P. Armstrong

parmstro64 commented 10 years ago

2 HASH files are created in the config-finder.t. The failure is repeatable and generated 2 hash files per run, Hope that this can assist in finding the bug.

E:\usr\bin\perl.exe t/runtests.pl 0 0 "blib\lib" "blib\arch" t/config-finder.t t/lib/ConfigFinder.t

Running tests on blib/script/ack
t/config-finder.t ..... Can't use string ("C:\Documents and Settings\All Us"...) as a HASH ref while "strict refs" in use at t/config-finder.t line 92.

cannot remove path when cwd is C:/temp/gvYBRDpw_M for C:/temp/gvYBRDpw_M:  at E:/usr/lib/File/Temp.pm line 1616. 

file::temp is using C:\temp (this exists on my machine) yet TMP and TEMP are defined as E:/PerlDev/tmp but is seemingly ignored. This is not the failure cause but a Windows / Perl annoyance.

There are 2 HASH files are created after each run.

Looks like your test exited with 2 before it could output anything.
t/config-finder.t ..... Dubious, test returned 2 (wstat 512, 0x200)
Failed 26/26 subtests
t/lib/ConfigFinder.t .. ok

Test Summary Report
-------------------
t/config-finder.t   (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 0.
Files=2, Tests=1, 16 wallclock secs ( 0.14 usr +  0.09 sys =  0.23 CPU)
Result: FAIL
Failed 1/2 test programs. 0/1 subtests failed.

Regards, P. Armstrong

petdance commented 10 years ago

This should be fixed.