The Trunk: KernelTests-dtl.147.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-dtl.147.mcz

commits-2
David T. Lewis uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-dtl.147.mcz

==================== Summary ====================

Name: KernelTests-dtl.147
Author: dtl
Time: 7 April 2010, 10:03:52.182 am
UUID: 784b0122-b6f5-45ef-9871-c0e1e114eeb2
Ancestors: KernelTests-jcg.146

Add VM version test to allow AllocationTest to run on updated Unix VM (pending). Flagged #toRemove, should be updated after new VMs are in general use.

=============== Diff against KernelTests-jcg.146 ===============

Item was added:
+ ----- Method: AllocationTest>>isSafeVM (in category 'workarounds') -----
+ isSafeVM
+ "False if the VM is a Unix VM that has not been updated to version 4.
+ Earlier versions may be subject to a bug that can crash the VM when
+ running AllocationTest."
+
+ self flag: #toRemove. "April 2010 dtl - remove this about one year from now"
+ ^ Smalltalk platformName ~= 'unix'
+ or: [(((Smalltalk getSystemAttribute: 0)
+ findTokens: FileDirectory slash)
+ select: [:e | e beginsWith: '4.']) isEmpty not]!

Item was changed:
  ----- Method: AllocationTest>>expectedFailures (in category 'tests') -----
  expectedFailures
  "should be fixed with latest VMs but unix is still pending"
+ self isSafeVM
+ ifTrue: [ ^#() ]
+ ifFalse: [ ^#(testOneGigAllocation testOutOfMemorySignal) ]!
- SmalltalkImage current platformName = 'unix'
- ifTrue: [ ^#(testOneGigAllocation testOutOfMemorySignal) ]
- ifFalse: [ ^#() ]!

Item was changed:
  ----- Method: AllocationTest>>testOutOfMemorySignal (in category 'tests') -----
  testOutOfMemorySignal
  "Ensure that OOM is signaled eventually"
  | sz |
+ self isSafeVM ifFalse: [ "avoid crashing"
- SmalltalkImage current platformName = 'unix' ifTrue: [ "avoid crashing"
  ^self assert: false ].
  sz := 512*1024*1024. "work around the 1GB alloc bug"
  self should:[(1 to: 2000) collect:[:i| Array new: sz]] raise: OutOfMemory.
 
  "Call me when this test fails, I want your machine"
  sz := 1024*1024*1024*1024.
  self should:[Array new: sz] raise: OutOfMemory.
  !