The Inbox: KernelTests-ar.172.mcz

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

The Inbox: KernelTests-ar.172.mcz

commits-2
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ar.172.mcz

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

Name: KernelTests-ar.172
Author: ar
Time: 31 December 2010, 10:39:05.433 am
UUID: 6395cb0a-8bf0-fb4c-92a5-405af64146b4
Ancestors: KernelTests-ar.171

Illustrate a problem of the current interpreter VM not suspending inactive processes primitively.

=============== Diff against KernelTests-ar.171 ===============

Item was added:
+ ----- Method: Process>>suspendPrimitivelyOrFail (in category '*KernelTests-Processes') -----
+ suspendPrimitivelyOrFail
+ "Test support. Execute primitive 88, or fail."
+
+ <primitive: 88>
+ ^self primitiveFailed!

Item was added:
+ ClassTestCase subclass: #ProcessTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'KernelTests-Processes'!

Item was added:
+ ----- Method: ProcessTest>>testAtomicSuspend (in category 'tests') -----
+ testAtomicSuspend
+ "Test atomic suspend of foreign processes"
+
+ | list p sema |
+ sema := Semaphore new.
+ p := [sema wait] fork.
+ Processor yield.
+ self shouldnt: [list := p suspendPrimitivelyOrFail] raise: Error.
+ self assert: list == sema.
+ !