The Trunk: ToolsTests-mt.102.mcz

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

The Trunk: ToolsTests-mt.102.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-mt.102.mcz

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

Name: ToolsTests-mt.102
Author: mt
Time: 15 March 2021, 11:26:23.080586 am
UUID: cd7ffa73-b283-8244-85fd-0eef99f698b4
Ancestors: ToolsTests-eem.101

Complements Kernel-mt.1381

Fixes for debugger invocation during code simulation. See  http://forum.world.st/Please-try-out-Fixes-for-debugger-invocation-during-code-simulation-td5127684.html

=============== Diff against ToolsTests-eem.101 ===============

Item was changed:
  ----- Method: DebuggerTests>>test06DebugSpecificContext (in category 'tests') -----
  test06DebugSpecificContext
 
  | context |
 
  process := [ #(1 2 3) collect: [:ea | ea odd ifTrue: [ ea ] ifFalse: [ Processor activeProcess suspend ] ] ] newProcess.
  process priority: Processor activeProcess priority + 1.
  process resume.
 
  "Find specific context by following #sender chain."
  context := process suspendedContext.
  [context selector = #collect: ] whileFalse: [context := context sender].
 
+ debugger := ToolSet debugProcess: process context: context label: nil contents: nil fullView: true.
- debugger := process debug: context.
 
  self assert: debugger contextStackTop = context.!

Item was changed:
  ----- Method: DebuggerTests>>test09DebuggerNotifierOrFull (in category 'tests') -----
  test09DebuggerNotifierOrFull
  "Test the defaults."
 
  process := [ 3+4 ] newProcess.
  debugger := process debug.
  self assert: debugger isFull.
 
  debugger close.
 
  process := [ 3+4 ] newProcess.
  debugger := process debugWithTitle: 'Test'.
  self assert: debugger isFull.
 
  debugger close.
 
  process := [ 3+4 ] newProcess.
+ debugger := process debugWithTitle: 'Test 2' full: false.
- debugger := process debug: process suspendedContext.
  self assert: debugger isNotifier.!

Item was added:
+ ----- Method: DebuggerTests>>test16HandleSimulationError (in category 'tests') -----
+ test16HandleSimulationError
+ "Regression test. In the past, the scenario below led to an infinite debugger chain freezing your image. Be careful when running this test in an unpatched image!! For more information, see http://forum.world.st/I-broke-the-debugger-td5110752.html."
+
+ | userProcess |
+ process := Process forBlock: [
+ "the faulty user code"
+ thisContext pc: nil].
+ debugger := process debug.
+
+ [userProcess := [debugger stepThrough] fork.
+ Processor yield.
+
+ self deny: [process isTerminated].
+ self assert: [userProcess isSuspended]]
+
+ ensure: [
+ process suspendedContext: nil; terminate.
+ debugger close.
+ process := userProcess.
+ self findDebugger "for correct tearDown"].!

Item was added:
+ ----- Method: DebuggerTests>>test17HandleBlockCannotReturn (in category 'tests') -----
+ test17HandleBlockCannotReturn
+ "Regression test. In the past, the scenario below led to an infinite debugger chain freezing your image. Be careful when running this test in an unpatched image!! For more information, see http://forum.world.st/I-broke-the-debugger-td5110752.html."
+
+ | userProcess |
+ process := Process forBlock: [
+ "the faulty user code"
+ [] ensure: [thisContext privSender: nil]].
+ debugger := process debug.
+
+ [userProcess := [debugger stepOver] fork.
+ Processor yield.
+
+ self assert: [process isTerminated].
+ self deny: [userProcess isRunnable]]
+
+ ensure: [
+ process terminate.
+ debugger close.
+ process := userProcess.
+ self findDebugger "for correct tearDown"].!

Item was added:
+ ----- Method: DebuggerTests>>test18HandleNestedBlockCannotReturn (in category 'tests') -----
+ test18HandleNestedBlockCannotReturn
+ "Regression test. In the past, the scenario below led to an infinite debugger chain freezing your image. Be careful when running this test in an unpatched image!! For more information, see http://forum.world.st/I-broke-the-debugger-td5110752.html."
+
+ | metaProcess metaDebugger userProcess |
+ process := Process forBlock: [
+ "the faulty user code"
+ [] ensure: [thisContext privSender: nil]].
+ debugger := process debug.
+ metaProcess := Process forBlock: [
+ debugger stepOver].
+ metaDebugger := metaProcess debug.
+
+ [userProcess := [metaDebugger stepOver] fork.
+ Processor yield.
+
+ self assert: [process isTerminated].
+ self deny: [userProcess isRunnable]]
+
+ ensure: [
+ process terminate.
+ debugger close.
+ metaProcess terminate.
+ metaDebugger close.
+ process := userProcess.
+ self findDebugger "for correct tearDown"].!