• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5820: UploadScriptTests unit tests fails in perl 5.10

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine unit tests only Normal Closed   patch 4.2.1

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

The unit tests fails in perl 5.10

The CGI version is the last and greatest 3.38

I have tried to attach files to topics and it all works fine. My got feeling is that it is the unit test case that is not compatible with later revisions of CGI or some of its dependencies

I have tried to hours to fix this but I cannot even figure out what the code is doing.

Here are the 4 tests in UploadScriptTests.pm that fails. It is the same error so we are chasing ONE error.

perl ../bin/TestRunner.pl UploadScriptTests.pm
Options:
exporting TWIKI_ASSERTS=1 for extra checking; disable by exporting TWIKI_ASSERTS=0
Assert checking on 1
Running UploadScriptTests
        UploadScriptTests::test_simple_upload
*** Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 'BLAH', 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 66
        UploadScriptTests::test_simple_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x920995c)', 'HASH(0x9079b6c)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

        UploadScriptTests::test_oversized_upload
*** Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 0000000000000000000000000000000000000000000000000000000000000..., 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 102
        UploadScriptTests::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x8fffc64)', 'HASH(0x90c56c4)') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 113
        UploadScriptTests::test_oversized_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925c66c)', 'HASH(0x9038fec)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

        UploadScriptTests::test_propschanges
*** Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 'BLAH', 'hidefile', 0, 'filecomment', 'Grease the stoat', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 139
        UploadScriptTests::test_propschanges('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925cd0c)', 'HASH(0x90f7bec)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

        UploadScriptTests::test_zerosized_upload
*** Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', '', 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 121
        UploadScriptTests::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x90faacc)', 'HASH(0x924cf64)') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 132
        UploadScriptTests::test_zerosized_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925d38c)', 'HASH(0x910cb34)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

4 failures
UploadScriptTests::test_simple_upload
Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 'BLAH', 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 66
        UploadScriptTests::test_simple_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x920995c)', 'HASH(0x9079b6c)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

---------------------------
UploadScriptTests::test_oversized_upload
Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 0000000000000000000000000000000000000000000000000000000000000..., 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 102
        UploadScriptTests::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x8fffc64)', 'HASH(0x90c56c4)') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 113
        UploadScriptTests::test_oversized_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925c66c)', 'HASH(0x9038fec)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

---------------------------
UploadScriptTests::test_propschanges
Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', 'BLAH', 'hidefile', 0, 'filecomment', 'Grease the stoat', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 139
        UploadScriptTests::test_propschanges('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925cd0c)', 'HASH(0x90f7bec)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

---------------------------
UploadScriptTests::test_zerosized_upload
Can't use an undefined value as a symbol reference at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54.
 at /var/www/twiki42/test/unit/TWikiTestCase.pm line 23
        TWikiTestCase::__ANON__('Can\'t use an undefined value as a symbol reference at /var/w...') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 54
        UploadScriptTests::do_upload('UploadScriptTests=HASH(0x88b6504)', 'Flappadoodle.txt', '', 'hidefile', 0, 'filecomment', 'Elucidate the goose', 'createlink', 0, ...) called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 121
        UploadScriptTests::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x90faacc)', 'HASH(0x924cf64)') called at /var/www/twiki42/test/unit/UploadScriptTests.pm line 132
        UploadScriptTests::test_zerosized_upload('UploadScriptTests=HASH(0x88b6504)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 49
        Unit::TestRunner::__ANON__() called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 379
        eval {...} called at /var/www/twiki42/lib/CPAN/lib/Error.pm line 371
        Error::subs::try('CODE(0x925d38c)', 'HASH(0x910cb34)') called at /var/www/twiki42/lib/Unit/TestRunner.pm line 55
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x889ae44)', 'UploadScriptTests.pm') called

0 of 4 test cases passed
[root@localhost unit]#

-- TWiki:Main/KennethLavrsen - 27 Jul 2008

The failure is at:

53:    my $stream = $query->upload( 'filepath' );
54:    seek($stream,0,0);
since $query->upload is a CGI function, and is returning undef, this strongly suggests a problem in CGI.

-- TWiki:Main.CrawfordCurrie - 30 Jul 2008

Upgraded to 3.39 just released and it still fails.

Downgraded to 2.29 and tests pass. So it is the CGI version that this depends on. Unfortunately here new is bad and old is good which means our users will get into troble sooner or later.

UNLESS - which I hope - the error is only in the unit tests.

-- TWiki:Main.KennethLavrsen - 31 Jul 2008

Fixed - thanks to Crawford.

Same fix was not needed in trunk as the TSA update had caught this when something else was also altered in the test case.

Checked in a cosmetic changing a few tabs to spaces - abusing this bug item for it.

Closing as unittests are not interesting in release note.

-- TWiki:Main.KennethLavrsen - 31 Jul 2008

ItemTemplate
Summary UploadScriptTests unit tests fails in perl 5.10
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.1
SVN Range TWiki-5.0.0, Sun, 27 Jul 2008, build 17148
AppliesTo Engine
Component unit tests only
Priority Normal
CurrentState Closed
Checkins TWikirev:17236 TWikirev:17237
TargetRelease patch
ReleasedIn 4.2.1
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-07-31 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback