Chris Muller uploaded a new version of KernelTests to project The Inbox: http://source.squeak.org/inbox/KernelTests-cmm.423.mcz
==================== Summary ====================
Name: KernelTests-cmm.423 Author: cmm Time: 31 May 2022, 5:53:42.444296 pm UUID: a504f011-37fb-4d93-ae2f-c3e1fc832b49 Ancestors: KernelTests-nice.422
#testOutOfMemorySignalExtreme can be stressful on a system that running the Squeak VM unconstrained (which is the default). Therefore, only run it if the vm is explicitly constrained. Note this requires
=============== Diff against KernelTests-nice.422 ===============
Item was changed: ----- Method: AllocationTest>>testOutOfMemorySignalExtreme (in category 'tests') ----- testOutOfMemorySignalExtreme + "Try to allocate more memory than permitted by the -memory vm argument, and check whether the expected error is signaled. Note that current (2017) Spur VMs fail in #new: and #basicNew: with #'bad argument' if given other than a non-negative SmallInteger." + Smalltalk heapMemoryLimit ifNotNil: + [ : bytes | + self + should: [ Array new: (bytes // Smalltalk wordSize) + 100 ] + raise: OutOfMemory, Error + withExceptionDo: + [:ex| + ex class == Error ifTrue: + [self assert: [ex messageText includesSubstring: 'basicNew: with invalid argument' ]]]]! - "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']]]!
"Note this requires..." System-cmm.1353.
On Tue, May 31, 2022 at 5:53 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of KernelTests to project The Inbox: http://source.squeak.org/inbox/KernelTests-cmm.423.mcz
==================== Summary ====================
Name: KernelTests-cmm.423 Author: cmm Time: 31 May 2022, 5:53:42.444296 pm UUID: a504f011-37fb-4d93-ae2f-c3e1fc832b49 Ancestors: KernelTests-nice.422
#testOutOfMemorySignalExtreme can be stressful on a system that running the Squeak VM unconstrained (which is the default). Therefore, only run it if the vm is explicitly constrained. Note this requires
=============== Diff against KernelTests-nice.422 ===============
Item was changed: ----- Method: AllocationTest>>testOutOfMemorySignalExtreme (in category 'tests') ----- testOutOfMemorySignalExtreme
"Try to allocate more memory than permitted by the -memory vm
argument, and check whether the expected error is signaled. Note that current (2017) Spur VMs fail in #new: and #basicNew: with #'bad argument' if given other than a non-negative SmallInteger."
Smalltalk heapMemoryLimit ifNotNil:
[ : bytes |
self
should: [ Array new: (bytes // Smalltalk wordSize)
- 100 ]
raise: OutOfMemory, Error
withExceptionDo:
[:ex|
ex class == Error ifTrue:
[self assert: [ex messageText
includesSubstring: 'basicNew: with invalid argument' ]]]]!
"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']]]!
squeak-dev@lists.squeakfoundation.org