[squeak-dev] The Inbox: KernelTests-jar.420.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Dec 22 15:46:07 UTC 2021
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-jar.420.mcz
==================== Summary ====================
Name: KernelTests-jar.420
Author: jar
Time: 22 December 2021, 4:46:05.533362 pm
UUID: 65aaab07-f677-d94f-ac59-3a9889aaf8e8
Ancestors: KernelTests-jar.419
update comments in KernelTests-jar.419;
forgot to remove unrelated comments from KernelTests-jar.419; sorry for the noise.
please remove KernelTests-jar.419 from the Inbox
=============== Diff against KernelTests-jar.419 ===============
Item was changed:
----- Method: MutexTest>>testMutexInCriticalEnsureArgument (in category 'tests') -----
+ testMutexInCriticalEnsureArgument "self run: #testMutexInCriticalEnsureArgument"
+ "This tests whether a process that is in the ensure argument block in critical: but has yet to evaluate the primitiveExitCriticalSection
+ leaves it with the mutex unlocked."
- 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 deny: mutex isOwned.
+ self assert: mutex isEmpty!
- self assert: terminatee isTerminated.
- self deny: mutex isOwned!
Item was changed:
----- Method: SemaphoreTest>>testSemaInCriticalEnsureArgument (in category 'tests') -----
+ testSemaInCriticalEnsureArgument "self run: #testSemaInCriticalEnsureArgument"
+ "This tests whether a process that is in ensure argument block but has yet to evaluate the signal
+ leaves it with signaling the associated semaphore."
- 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 Squeak-dev
mailing list
|