The Trunk: KernelTests-eem.347.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-eem.347.mcz

commits-2
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.347.mcz

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

Name: KernelTests-eem.347
Author: eem
Time: 3 August 2018, 6:09:13.151209 pm
UUID: 3f1b38be-71e3-43ff-8a57-d9921d2f2fb1
Ancestors: KernelTests-eem.346

Additional test cases for process termination from Andreas.

=============== Diff against KernelTests-eem.346 ===============

Item was added:
+ ----- Method: MutexTest>>testTerminationOfLowPriorityProcessDoesNotShutOutHighPriorityProcess (in category 'testing') -----
+ testTerminationOfLowPriorityProcessDoesNotShutOutHighPriorityProcess
+ | m p s |
+ m := Mutex new.
+ p := [m critical: [Semaphore new wait]] forkAt: Processor activePriority - 10.
+ (Delay forMilliseconds: 100) wait. "Allow p to enter critical section, owning m"
+ [m critical: [s := #in]] forkAt: Processor activePriority + 10.
+ "r := { p suspendedContext pc. p suspendedContext copyStack }."
+ p terminate.
+ self deny: m isOwned.
+ self assert: s == #in.
+ "(m isOwned not and: [s == #in]) ifFalse:
+ [Debugger openContext: r last label: 'p' contents: nil]"!

Item was added:
+ ----- Method: MutexTest>>testTerminationOfOneOfTwoLowPriorityProcesses (in category 'testing') -----
+ testTerminationOfOneOfTwoLowPriorityProcesses
+ | mutex p1 p2 entered1 entered2 |
+ mutex := Mutex new.
+ entered1 := entered2 := false.
+ p1 := [mutex critical:[entered1 := true]]
+ forkAt: Processor activePriority - 1.
+ p2 := [mutex critical:[entered2 := true]]
+ forkAt: Processor activePriority - 2.
+ mutex critical:[(Delay forMilliseconds: 100) wait].
+ p1 terminate.
+ (Delay forMilliseconds: 100) wait.
+ self deny: entered1.
+ self assert: entered2!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: KernelTests-eem.347.mcz

David T. Lewis
On Sat, Aug 04, 2018 at 01:09:46AM +0000, [hidden email] wrote:
> Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
>
> Additional test cases for process termination from Andreas.

:-)