[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-dev
Subject:    [squeak-dev] The Trunk: KernelTests-mt.380.mcz
From:       commits () source ! squeak ! org
Date:       2020-04-30 10:22:17
Message-ID: E1jU6Ki-0004rY-3M () andreas
[Download RAW message or body]

Marcel Taeumel uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-mt.380.mcz

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

Name: KernelTests-mt.380
Author: mt
Time: 30 April 2020, 12:22:16.766652 pm
UUID: c45fab34-ced0-9340-9f23-8f6af2c21f88
Ancestors: KernelTests-mt.379

Split up memory allocation tests.

=============== Diff against KernelTests-mt.379 ===============

Item was changed:
  ----- Method: AllocationTest>>testOutOfMemorySignal (in category 'tests') -----
  testOutOfMemorySignal
+ 	"Ensure that OutOfMemory is signaled eventually. Restrain the available memory \
first to not stress the machine too much." + 	
- 	"Ensure that OutOfMemory 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].!
- 			 self should: [(1 to: 2000) collect: [:i| Array new: sz]] raise: OutOfMemory].
- 
- 	"Call me when this test fails, I want your machine."
- 	"Current (2017) Spur VMs fail new: & basicNew: with #'bad argument' if given other \
                than a non-negative SmallInteger."
- 	sz := 1024*1024*1024*1024.
- 	self should: [Array new: sz]
- 		raise: OutOfMemory, Error
- 		withExceptionDo:
- 			[:ex|
- 			 ex class == Error ifTrue:
- 				[self assert: [ex messageText includesSubstring: 'basicNew: with invalid \
argument']]]!

Item was added:
+ ----- Method: AllocationTest>>testOutOfMemorySignalExtreme (in category 'tests') \
----- + testOutOfMemorySignalExtreme
+ 	"Try to allocate a ridiculous amount of memory and check whether the expected \
error is signaled. Call Eliot when this test fails, he want your machine. :-) + 	
+ 	Note that current (2017) Spur VMs fail in #new: and #basicNew: with #'bad \
argument' if given other than a non-negative SmallInteger. + 	
+ 	Also note that this test can be quite stressful to your machine depending on how \
your operating system allocates the required memory behind the curtains. Better not \
triggering some robot fetching a tape from somewhere..." + 	
+ 	| sz |
+ 	sz := 1024*1024*1024*1024. "= 1 TiB"
+ 	self should: [Array new: sz]
+ 		raise: OutOfMemory, Error
+ 		withExceptionDo:
+ 			[:ex|
+ 			 ex class == Error ifTrue:
+ 				[self assert: [ex messageText includesSubstring: 'basicNew: with invalid \
argument']]]!


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic