You are here: Foswiki>Tasks Web>Item9133 (27 Aug 2010, SvenDowideit)Edit Attach

Item9133: TimeTests fail on strawberry perl 5.12

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.10, 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: SvenDowideit
strawberry perl 5.12

Running TimeTests
        1257 TimeTests::test_generateIsoOffset
POSIX::tzset not implemented on this architecture at C:/src/svn.foswiki.org/trunk/core/test/unit/TimeTests.pm line 22.
 at C:/src/svn.foswiki.org/trunk/core/test/unit/FoswikiTestCase.pm line 38
        FoswikiTestCase::__ANON__ called at C:/strawberry/perl/lib/diagnostics.pm line 525
        diagnostics::death_trap('POSIX::tzset not implemented on this architecture at C:/src/s...') called at C:/src/svn
.foswiki.org/trunk/core/test/unit/TimeTests.pm line 22
        TimeTests::set_up('TimeTests=HASH(0xb4306bc)') called at C:\src\svn.foswiki.org\trunk\core\lib/Unit/TestRunner.p
m line 316
        Unit::TestRunner::runOne('TimeTests=HASH(0xb4306bc)', 'TimeTests', undef) called at C:\src\svn.foswiki.org\trunk
\core\lib/Unit/TestRunner.pm line 124
        Unit::TestRunner::start('Unit::TestRunner=HASH(0x1001824)', 'FoswikiSuite.pm') called at ..\bin\TestRunner.pl li
ne 120

-- SvenDowideit - 10 Jun 2010

I've essentially removed all TimeTests on windows due to this - we'll need to figure out an alternative later.

-- SvenDowideit - 13 Jun 2010

http://aspn.activestate.com/ASPN/Mail/Message/perl-mod_perl/3594080

I think i'd like to keep this open until we either can't find a way to run these tests and give up, or it can be made useful. one approach might be to implement it upstream in POSIX - no idea how impossible this is (AS Perl has something that apparently works some of the time, but eventually crashes perl nastily)

-- SvenDowideit - 13 Jun 2010

A number of problems in the ActiveState perl 5.10.1
  1. localtime on a negative number returns undef, which banjaxes Time::Local::timelocal. This happens when you specify a timezone. Worked around it in Foswiki::Time.
  2. The $ENV{TZ} spec on windows is quite different to sensible platforms, affecting the unit test.
  3. If you call POSIX::tzset when $ENV{TZ} is undef, it segfaults.

All resolved, but leaving open for Sven's confirmation on 5.12.

-- CrawfordCurrie - 13 Jun 2010

nope. this is not a 5.10 vs 5.12 issue, its that strawberry perl does not implement POSIX::Tzset at all - and in the process of warning the user of this, does a fatal.

-- SvenDowideit - 14 Jun 2010

OK. Well, tzset is never used in the core, only in the unit tests, so we can accept this until a strawberry perl dev has a chance to give it some TLC. headline changed accordingly, from "TimeTests fail on windows"

-- CrawfordCurrie - 14 Jun 2010

too many things to do - I might look into why mingw64's tzset crashes for no good reason, but not today.

-- SvenDowideit - 15 Jun 2010

applied to 1.0.10 too

-- SvenDowideit - 27 Aug 2010

 
Topic revision: r15 - 27 Aug 2010, SvenDowideit
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy