[Pkg] The Treated Inbox: KernelTests-jar.419.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu May 5 13:48:14 UTC 2022
Marcel Taeumel uploaded a new version of KernelTests to project The Treated Inbox:
http://source.squeak.org/treated/KernelTests-jar.419.mcz
==================== Summary ====================
Name: KernelTests-jar.419
Author: jar
Time: 22 December 2021, 9:46:49.513682 am
UUID: bdc99b3d-0509-ec4c-9d24-4a20c6605fcc
Ancestors: KernelTests-ct.415
add tests documenting a bug in #releaseCriticalSection:
A solution has been proposed in
http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217744.html
=============== Diff against KernelTests-ct.415 ===============
Item was added:
+ ----- Method: MutexTest>>testMutexInCriticalEnsureArgument (in category 'tests') -----
+ testMutexInCriticalEnsureArgument
+ "Terminating a terminator process should unwind both the terminator and its terminatee process"
+
+ | terminatee mutex |
+ mutex := Mutex new.
+ terminatee := [mutex critical: []] newProcess.
+ self assert: terminatee isSuspended.
+ terminatee runUntil: [:ctx | ctx selectorToSendOrSelf = #primitiveExitCriticalSection].
+ self assert: terminatee isSuspended.
+ terminatee terminate.
+ self assert: terminatee isTerminated.
+ self deny: mutex isOwned!
Item was added:
+ ----- Method: SemaphoreTest>>testSemaInCriticalEnsureArgument (in category 'tests') -----
+ testSemaInCriticalEnsureArgument
+ "Terminating a terminator process should unwind both the terminator and its terminatee process"
+
+ | terminatee sema |
+ sema := Semaphore forMutualExclusion.
+ terminatee := [sema critical: []] newProcess.
+ self assert: terminatee isSuspended.
+ terminatee runUntil: [:ctx | ctx selectorToSendOrSelf = #signal].
+ self assert: terminatee isSuspended.
+ terminatee terminate.
+ self assert: terminatee isTerminated.
+ self assert: sema excessSignals = 1 !
More information about the Packages
mailing list