[squeak-dev] The Inbox: KernelTests-jar.437.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jul 11 13:00:44 UTC 2022
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-jar.437.mcz
==================== Summary ====================
Name: KernelTests-jar.437
Author: jar
Time: 11 July 2022, 3:00:42.307972 pm
UUID: 8e550373-a0e1-9d4a-9d23-22020c403639
Ancestors: KernelTests-jar.436
Modify the test to cover a situation previously missed - see Kernel-jar.1487
Complements Kernel-jar.1487
=============== Diff against KernelTests-jar.436 ===============
Item was changed:
----- Method: ProcessTest>>testTerminateTerminatingProcessInUnwindTo (in category 'tests') -----
testTerminateTerminatingProcessInUnwindTo
"Terminating a terminatee process after the terminator process restarted the terminatee
process should unwind the terminatee process and let the terminator process terminate."
| terminator terminatee unwound |
unwound := false.
terminatee := [[Semaphore new wait] ensure: [unwound := true]] fork.
Processor yield.
terminator := [terminatee terminate] newProcess.
self assert: terminatee isBlocked.
self assert: terminator isSuspended.
terminator runUntil: [:ctx | ctx selectorToSendOrSelf = #resume].
"terminator steps until terminatee's unwind context is set"
terminator suspendedContext nextInstruction. "skip terminatee resume instruction"
terminator resume. "and run until parked at wait"
+ "terminatee is inside its helper stack, about to call #unwindTo:"
- terminatee runUntil: [:ctx | ctx selectorToSendOrSelf = #unwindTo:].
- "terminatee steps until at #unwindTo:"
self assert: terminatee isSuspended.
terminatee terminate.
self assert: terminatee isTerminated.
self assert: unwound.
Processor yield.
self assert: terminator isTerminated!
More information about the Squeak-dev
mailing list
|