Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006718 [Squeak] Kernel minor always 10-10-07 19:03 10-10-07 22:35
Reporter simon View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.10
Summary 0006718: TimeTest>>testGeneralInquiries fails
Description In Squeak3.10beta.7158.image, one of the KernelTests fails: TimeTest>>testGeneralInquiries. This is because on my system Time>>now gives a time approximately 3s into the past, unlike Time dateAndTimeNow last. More details below.
Additional Information simon@dynabook:~$ squeak -version
387 flags are set
3.9-5 #1 Sun Apr 23 13:09:04 PDT 2006 gcc 3.3.5
Squeak3.9alpha of 4 July 2005 [latest update: 0007021]
Linux vps.piumarta.com 2.4.20-021stab028.18.777-enterprise #1 SMP Wed Sep 14 19:34:46 MSD 2005 i686 GNU/Linux
default plugin location: /usr/local/lib/squeak/3.9-5/*.so
simon@dynabook:~$ uname -a
Linux dynabook 2.6.20-16-generic 0000002 SMP Fri Aug 31 00:55:27 UTC 2007 i686 GNU/Linux



TimeTest(TestCase)>>signalFailure:
    Receiver: TimeTest>>#testGeneralInquiries
    Arguments and temporary variables:
        aString: 'Assertion failed'
    Receiver's instance variables:
        testSelector: #testGeneralInquiries
        time: 4:02:47 am
        aTime: 12:34:56 pm
        localTimeZoneToRestore: a TimeZone(GMT)

TimeTest(TestCase)>>assert:
    Receiver: TimeTest>>#testGeneralInquiries
    Arguments and temporary variables:
        aBooleanOrBlock: false
    Receiver's instance variables:
        testSelector: #testGeneralInquiries
        time: 4:02:47 am
        aTime: 12:34:56 pm
        localTimeZoneToRestore: a TimeZone(GMT)

TimeTest>>testGeneralInquiries
    Receiver: TimeTest>>#testGeneralInquiries
    Arguments and temporary variables:
        now: an Array(10 October 2007 11:09:05 am)
        d: nil
        t: nil
        dt: nil
    Receiver's instance variables:
        testSelector: #testGeneralInquiries
        time: 4:02:47 am
        aTime: 12:34:56 pm
        localTimeZoneToRestore: a TimeZone(GMT)

TimeTest(TestCase)>>performTest
    Receiver: TimeTest>>#testGeneralInquiries
    Arguments and temporary variables:

    Receiver's instance variables:
        testSelector: #testGeneralInquiries
        time: 4:02:47 am
        aTime: 12:34:56 pm
        localTimeZoneToRestore: a TimeZone(GMT)


--- The full stack ---
TimeTest(TestCase)>>signalFailure:
TimeTest(TestCase)>>assert:
TimeTest>>testGeneralInquiries
TimeTest(TestCase)>>performTest
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attached Files  DateAndTime class-milliSecondsSinceMidnight-M06718.cs.st [^] (282 bytes) 10-10-07 21:33

- Relationships
related to 0000474closed KenCausey [BUG][FIX] accurateDateAndTimeNow-brp 

- Notes
(0011288 - 286 - 346 - 346 - 346 - 346 - 346)
simon
10-10-07 20:22

To reproduce, do this a few times:

Transcript show: (Time dateAndTimeNow last); show: ' '; show: (Time now); cr

I get:

11:27:22 am 11:27:20 am
11:27:38 am 11:27:35 am
11:27:51 am 11:27:48 am

The first value agrees with my system clock, the second (Time now) is behind.
 
(0011289 - 281 - 329 - 329 - 329 - 329 - 329)
simon
10-10-07 21:36
edited on: 10-10-07 21:40

I have uploaded a possible fix. This new implementation is much simpler and makes the failing test pass for me. I have not tried the full set of image tests as they hang right now.

Transcript now shows:

2:39:37 pm 2:39:37 pm
2:39:41 pm 2:39:41 pm
2:39:45 pm 2:39:45 pm

 
(0011291 - 199 - 199 - 199 - 199 - 199 - 199)
simon
10-10-07 22:23

Update: the new version has a resolution of only a second. So not a real fix yet, even though it makes tests green. Keith Hodges has some tests for this method, but they aren't part of the image yet.
 
(0011292 - 138 - 138 - 138 - 138 - 138 - 138)
simon
10-10-07 22:32

And I can no longer reproduce the problem - as of now the same 3.10 image now passes that test on my system. Have to watch for more clues.
 
(0011293 - 48 - 48 - 174 - 174 - 174 - 174)
simon
10-10-07 22:35

See also: http://bugs.squeak.org/view.php?id=474 [^]
 

- Issue History
Date Modified Username Field Change
10-10-07 19:03 simon New Issue
10-10-07 19:05 simon Issue Monitored: simon
10-10-07 20:22 simon Note Added: 0011288
10-10-07 21:33 simon File Added: DateAndTime class-milliSecondsSinceMidnight-M06718.cs.st
10-10-07 21:36 simon Note Added: 0011289
10-10-07 21:40 simon Note Edited: 0011289
10-10-07 22:23 simon Note Added: 0011291
10-10-07 22:32 simon Note Added: 0011292
10-10-07 22:35 simon Note Added: 0011293
10-11-07 20:34 simon Relationship added related to 0000474


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
63 total queries executed.
40 unique queries executed.
Powered by Mantis Bugtracker