[squeak-dev] The Trunk: KernelTests-tpr.441.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 00:41:45 UTC 2023


tim Rowledge uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-tpr.441.mcz

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

Name: KernelTests-tpr.441
Author: tpr
Time: 15 January 2023, 4:41:44.135551 pm
UUID: 2d8e9299-b189-4012-9a86-3fb744ebe79a
Ancestors: KernelTests-ct.440

Remove some variable shadowing

=============== Diff against KernelTests-ct.440 ===============

Item was changed:
  ----- Method: ProcessTest>>testResumeTerminatingProcess (in category 'tests') -----
  testResumeTerminatingProcess
  	"An attempt to resume a terminating process should probably raise an error;
  	leave this test as an expected failure for the moment."
  
+ 	| terminatee terminator resumed |
- 	| terminatee terminator resumed semaphore |
- 	semaphore := Semaphore new.
  	terminatee := [semaphore critical:[]. resumed := true] fork.
  	Processor yield.
  	terminator := [terminatee terminate] newProcess.
  	self assert: terminatee suspendingList == semaphore.
  	self assert: terminator isSuspended. 
  	"run terminator and stop inside #terminate"
  	terminator runUntil: [:ctx | ctx selectorToSendOrSelf = #priority:].
  	self assert: terminator isSuspended.
  	"resume the terminatee process and and check if the VM raises an error;
  	an error is expected because terminatee's suspendedContext equals nil"
  	self should: [terminatee resume] raise: Error.
  	"now let the terminator finish terminating the terminatee process"
  	terminator resume.
  	Processor yield.
  	self assert: resumed isNil.
  	self assert: terminatee isTerminated.
  	self assert: terminator isTerminated!

Item was changed:
  ----- Method: ProcessTest>>testTerminateTerminatingProcess (in category 'tests') -----
  testTerminateTerminatingProcess
  	"An attempt to terminate a terminating process should probably raise an error;
  	leave this test as an expected failure for the moment."
  
+ 	| terminatee terminator resumed |
- 	| terminatee terminator resumed semaphore |
- 	semaphore := Semaphore new.
  	terminatee := [semaphore critical:[]. resumed := true] fork.
  	Processor yield.
  	terminator := [terminatee terminate] newProcess.
  	self assert: terminatee suspendingList == semaphore.
  	self assert: terminator isSuspended. 
  	"run terminator and stop inside #terminate"
  	terminator runUntil: [:ctx | ctx selectorToSendOrSelf = #priority:].
  	self assert: terminator isSuspended.
  	"terminate the terminatee process again and let the termination finish;
  	an error is expected because #terminate detected multiple termination"
  	self should: [terminatee terminate] raise: Error.
  	"now let the terminator finish terminating the terminatee process"
  	terminator resume.
  	Processor yield.
  	self assert: resumed isNil.
  	self assert: terminatee isTerminated.
  	self assert: terminator isTerminated!



More information about the Squeak-dev mailing list