[Pkg] The Trunk: KernelTests-eem.316.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Nov 17 01:46:22 UTC 2016


Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.316.mcz

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

Name: KernelTests-eem.316
Author: eem
Time: 16 November 2016, 5:45:22.111899 pm
UUID: f0525c34-c0bf-47a7-834e-bda4d9445411
Ancestors: KernelTests-nice.315

Improve the testOutOfMemorySignal test so as not to take an age on 64-bit machines.

=============== Diff against KernelTests-nice.315 ===============

Item was added:
+ ----- Method: AllocationTest>>setFreeSpaceLimitOf:around: (in category 'support') -----
+ setFreeSpaceLimitOf: bytes around: aBlock
+ 	"Attempt to evaluate aBlock with a limit of the requested ammount
+ 	 of free old space, restoring the extant limit after the evaluation."
+ 
+ 	| extantLimit |
+ 	extantLimit := Smalltalk vmParameterAt: 67.
+ 	Smalltalk vmParameterAt: 67 put: (Smalltalk vmParameterAt: 1) + bytes asInteger.
+ 	^aBlock ensure: [Smalltalk vmParameterAt: 67 put: extantLimit]!

Item was changed:
  ----- Method: AllocationTest>>testOutOfMemorySignal (in category 'tests') -----
  testOutOfMemorySignal
  	"Ensure that OOM is signaled eventually"
  	| sz |
+ 	self setFreeSpaceLimitOf: 1024 * 1024 * 1024 * (Smalltalk wordSize = 8
+ 														ifTrue: [4]
+ 														ifFalse: [1.5])
+ 		around:
+ 			[sz := 512*1024*1024. "work around the 1GB alloc bug"
+ 			 self should:[(1 to: 2000) collect:[:i| Array new: sz]] raise: OutOfMemory].
- 	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!
- 	self should:[Array new: sz] raise: OutOfMemory.
- !



More information about the Packages mailing list