Christoph Thiede uploaded a new version of ToolsTests to project The Trunk: http://source.squeak.org/trunk/ToolsTests-ct.117.mcz
==================== Summary ====================
Name: ToolsTests-ct.117 Author: ct Time: 25 November 2022, 6:19:53.110214 pm UUID: 8fd1a806-e8a6-a942-8dcd-28e258d88d39 Ancestors: ToolsTests-jar.116
Complements Kernel-ct.1493 (recursive process-faithful debugging)/merges recursive-profaide. Also adds an e2e test for simple process-faithful debugging.
=============== Diff against ToolsTests-jar.116 ===============
Item was added: + ----- Method: DebuggerTests>>test25ProcessFaithfulDebugging (in category 'tests') ----- + test25ProcessFaithfulDebugging + "Debugging a process which sends Processor activeProcess should have the same effect as running the process directly. End-to-end equivalent for ProcessTest>>#testProcessFaithfulSimulation." + + | userProcess | + process := Process forBlock: [ + Processor activeProcess environmentAt: #plonk put: 42. + Processor activeProcess suspend. + Processor activeProcess environmentAt: #plonk]. + process resume. + Processor yield. + self assert: (process environmentAt: #plonk) = 42. + + debugger := process debug. + + [userProcess := [debugger stepOver "suspend"; stepOver "activeProcess"; stepOver "environmentAt:"] fork. + Processor yield. + + self deny: [process isTerminated]. + self assert: [userProcess isTerminated]. + self assert: [process suspendedContext willReturn and: [process suspendedContext top = 42]]. + self assert: (userProcess environmentAt: #plonk ifAbsent: []) = nil] + + ensure: [ + process terminateAggressively. + debugger close. + process := userProcess. + self findDebugger "for correct tearDown"].!
Item was added: + ----- Method: DebuggerTests>>test26RecursiveProcessFaithfulDebugging (in category 'tests') ----- + test26RecursiveProcessFaithfulDebugging + "Debugging the debugger for a process which sends Processor activeProcess should have the same effect as running the original debugger directly. End-to-end equivalent for ProcessTest>>#testProcessFaithfulSimulationMeta." + + | userProcess metaDebugger metaProcess | + process := Process forBlock: [ + Processor activeProcess environmentAt: #plonk put: 42. + Processor activeProcess suspend. + Processor activeProcess environmentAt: #plonk]. + process resume. + Processor yield. + self assert: (process environmentAt: #plonk) = 42. + + debugger := process debug. + metaProcess := Process forBlock: [ + [debugger stepOver "suspend"; stepOver "activeProcess"; stepOver "environmentAt:"] value]. + metaDebugger := metaProcess debug. + + [userProcess := [metaDebugger stepOver "value"] fork. + Processor yield. + + self deny: [process isTerminated]. + self assert: [userProcess isTerminated]. + self assert: [process suspendedContext willReturn and: [process suspendedContext top = 42]]. + self assert: (userProcess environmentAt: #plonk ifAbsent: []) = nil] + + ensure: [ + process terminateAggressively. + debugger close. + metaProcess terminateAggressively. + metaDebugger close. + process := userProcess. + self findDebugger "for correct tearDown"].!
squeak-dev@lists.squeakfoundation.org