Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605726 - media-sound/twolame-0.3.13-r2 fails tests
Summary: media-sound/twolame-0.3.13-r2 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on: 648076
Blocks:
  Show dependency tree
 
Reported: 2017-01-14 22:57 UTC by Mart Raudsepp
Modified: 2018-02-18 23:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,32.63 KB, text/plain)
2017-01-14 22:57 UTC, Mart Raudsepp
Details
emerge --info twolame (twolame-emerge-info.txt,5.51 KB, text/plain)
2017-01-14 22:59 UTC, Mart Raudsepp
Details
0.3.13-perl-tests.patch (0.3.13-perl-tests.patch,779 bytes, patch)
2017-01-16 23:31 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2017-01-14 22:57:06 UTC
make[2]: Entering directory '/tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13-abi_x86_64.amd64/tests'
Array passed to stat will be coerced to a scalar (did you want stat $_[0]?) at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 188.

#   Failed test '[1] file size of output file'
#   at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 136.
#          got: undef
#     expected: '13772'

#   Failed test '[2] file size of output file'
#   at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 136.
#          got: undef
#     expected: '13792'

#   Failed test '[3] file size of output file'
#   at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 136.
#          got: undef
#     expected: '2298'

#   Failed test '[4] file size of output file'
#   at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 136.
#          got: undef
#     expected: '13772'
# Looks like you failed 4 tests of 77.
/tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl .. 
Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/77 subtests 

Test Summary Report
-------------------
/tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl (Wstat: 1024 Tests: 77 Failed: 4)
  Failed tests:  16, 33, 50, 67
  Non-zero exit status: 4
Files=1, Tests=77,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.11 cusr  0.07 csys =  0.20 CPU)
Result: FAIL
Failed 1/1 test programs. 4/77 subtests failed.
FAIL: test.pl
======================================================
1 of 1 test failed
Please report to twolame-discuss@lists.sourceforge.net
======================================================
Comment 1 Mart Raudsepp gentoo-dev 2017-01-14 22:57:51 UTC
Created attachment 460076 [details]
build.log
Comment 2 Mart Raudsepp gentoo-dev 2017-01-14 22:59:48 UTC
Created attachment 460078 [details]
emerge --info twolame

I suspect the newer perl throwing the warning
Array passed to stat will be coerced to a scalar (did you want stat $_[0]?) at /tmp/portage/media-sound/twolame-0.3.13-r2/work/twolame-0.3.13/tests/test.pl line 188.
during tests might be an issue here?
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-01-16 23:31:57 UTC
Created attachment 460402 [details, diff]
0.3.13-perl-tests.patch

Yeah, perl's warning there is correct.

   stat(@_)

is like writing

    stat(scalar @_)

Which in other peoples languages would be like writing 

    stat(array.length)

When they wanted to instead do:

    stat.call(array)

SO basically, the tests are stating the nonexistent file "1" instead of stating the file in question.

Attached patch tested.
Comment 4 Toralf Förster gentoo-dev 2017-01-18 19:31:57 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #3)
hhm :

$ ls -l ./.bashrc 
-rw-r--r-- 1 tinderbox tinderbox 816 Jan 18 19:57 ./.bashrc

$> perl -we 'sub fu { return (stat(@_))[7] }; print fu ("./.bashrc"), "\n";'
816

perl: 5.22.3_rc
Comment 5 Toralf Förster gentoo-dev 2017-01-18 20:08:01 UTC
(In reply to Toralf Förster from comment #4)
gha - tested the wrong perl version - forget previous comment
Comment 6 Alexis Ballier gentoo-dev 2017-06-19 11:49:56 UTC
commit 8d85ad34bad5eb35697a8d554eb4484fb5f92b62 (HEAD -> master, origin/master, origin/HEAD)
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Jun 19 13:49:28 2017 +0200

    media-sound/twolame: Fix tests with recent perl, bug #605726.
    
    Patch by  Kent Fredric.
 

thx