Ticket #543 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

t/codingstd/copyright.t failing

Reported by: coke Owned by: cotto
Priority: normal Milestone:
Component: none Version: trunk
Severity: low Keywords:
Cc: Language:
Patch status: Platform:

Description

in r37939, cotto untodo'd a test. if I svn up to that revision and run the test, I see the following output:

$ prove t/codingstd/copyright.t
[08:35:58] t/codingstd/copyright.t .. 1/3
#   Failed test 'Duplicate Copyright statements'
#   at t/codingstd/copyright.t line 112.
# Duplicate copyright statement found in 12 files:
# /Users/coke/research/parrot/compilers/imcc/main.c
# /Users/coke/research/parrot/compilers/imcc/parser_util.c
# /Users/coke/research/parrot/examples/c/test_main.c
# /Users/coke/research/parrot/compilers/imcc/imcc.y
# /Users/coke/research/parrot/compilers/imcc/imcc.l
# /Users/coke/research/parrot/Configure.pl
# /Users/coke/research/parrot/config/gen/opengl.pm
# /Users/coke/research/parrot/lib/Parrot/Configure/Messages.pm
# /Users/coke/research/parrot/lib/Parrot/Op.pm
# /Users/coke/research/parrot/t/tools/dev/searchops/samples.pm
# /Users/coke/research/parrot/tools/build/nativecall.pl
# /Users/coke/research/parrot/tools/build/vtable_extend.pl
# Please get copyright assigned to Parrot Foundation
# and remove alternate notice; Or remove duplicated
# notice for Parrot Foundation.
# Looks like you failed 1 test of 3.
[08:35:58] t/codingstd/copyright.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
[08:35:59]

Test Summary Report
-------------------
t/codingstd/copyright.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=3,  1 wallclock secs ( 0.04 usr  0.01 sys +  0.53 cusr  0.11 csys =  0.69 CPU)
Result: FAIL

Change History

  Changed 5 years ago by cotto

This appears to be a Perl 5.8 vs 5.10 issue. The last test fails with 5.10.0 and (incorrectly) works with 5.8.8. Removing the ending $ from $copyright_parrot makes the test fail with both Perls, but there may be a reason why this isn't desirable.

Perl 5.8.8 is from Ubuntu Hardy and 5.10.0 was build from source.

cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ perl5.10.0 t/codingstd/copyright.t tools/build/vtable_extend.pl
1..3
ok 1 - Copyright statement exists
ok 2 - Copyright statement in the right format # TODO Waiting for full transition to Parrot Foundation
not ok 3 - Duplicate Copyright statements
#   Failed test 'Duplicate Copyright statements'
#   at t/codingstd/copyright.t line 112.
# Duplicate copyright statement found in 1 files:
# tools/build/vtable_extend.pl
# Please get copyright assigned to Parrot Foundation
# and remove alternate notice; Or remove duplicated
# notice for Parrot Foundation.
# Looks like you failed 1 test of 3.
cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ perl5.8.8 t/codingstd/copyright.t tools/build/vtable_extend.pl
1..3
ok 1 - Copyright statement exists
not ok 2 - Copyright statement in the right format # TODO Waiting for full transition to Parrot Foundation
#   Failed (TODO) test 'Copyright statement in the right format'
#   at t/codingstd/copyright.t line 100.
# Bad format in copyright statement found in 1 files:
# tools/build/vtable_extend.pl
# Please update to read something like:
#   Copyright (C) C<start-year>-C<last-year-modified>, Parrot Foundation.
# To find the C<start-year>, use a command such as:
#   svn log C<filename> | grep 'lines' | tail -n 1
# To find the C<last-year-modified>, use a command such as:
#   svn log C<filename> | grep 'lines' | head -n 1
ok 3 - Duplicate Copyright statements

in reply to: ↑ description   Changed 5 years ago by jkeenan

Replying to coke:

in r37939, cotto untodo'd a test. if I svn up to that revision and run the test, I see the following output:

> $ prove t/codingstd/copyright.t
> [08:35:58] t/codingstd/copyright.t .. 1/3
> #   Failed test 'Duplicate Copyright statements'
> #   at t/codingstd/copyright.t line 112.
> # Duplicate copyright statement found in 12 files:
> # /Users/coke/research/parrot/compilers/imcc/main.c
> # /Users/coke/research/parrot/compilers/imcc/parser_util.c
> # /Users/coke/research/parrot/examples/c/test_main.c
> # /Users/coke/research/parrot/compilers/imcc/imcc.y
> # /Users/coke/research/parrot/compilers/imcc/imcc.l
> # /Users/coke/research/parrot/Configure.pl
> # /Users/coke/research/parrot/config/gen/opengl.pm
> # /Users/coke/research/parrot/lib/Parrot/Configure/Messages.pm
> # /Users/coke/research/parrot/lib/Parrot/Op.pm
> # /Users/coke/research/parrot/t/tools/dev/searchops/samples.pm
> # /Users/coke/research/parrot/tools/build/nativecall.pl
> # /Users/coke/research/parrot/tools/build/vtable_extend.pl

In r38144, I revised t/codingstd/copyright.t to account for files where the string Copyright appears as part of, e.g., heredocs, usage statements, etc. This reduces the number of files truly failing this test to four -- the four 'Melvin Smith' files (known issue).

But if I run the test with the prove that comes with Perl 5.8 rather than 5.10, I get the same weird results reported by cotto in the preceding comment.

Thank you very much.
kid51

  Changed 5 years ago by coke

I re-TODO'd the test for the upcoming release, thinking that having it wrong be a passing TODO is better than it failing.

  Changed 5 years ago by coke

I re-TODO'd this in r38712 - the pass on some perls is incorrect; it IS a todo test, and the fact that it's accidentally passing doesn't mean it should be un TODO'd.

Thanks to cxreg++ on #perl, we can show that the behavior of this test doesn't change from 5.8 to 5.10, but from 5.8.8 to 5.8.9.

  Changed 5 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

Fixed in r38714, cxreg++.

Note: See TracTickets for help on using tickets.