Bug 4387

Summary: Running testIt(frysk.proc.TestSyscallSignal) ...WARNING: EventLoop.tid changed
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Andrew Cagney <cagney>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1524    

Description Andrew Cagney 2007-04-17 16:54:01 UTC
All ptrace calls must originate from the one thread, and if that thread is the
event-loop thread it can't change.

Running testIt(frysk.proc.TestSyscallSignal) ...WARNING: EventLoop.tid changed
First set to 20447 from ...
java.lang.Exception
   at frysk.event.EventLoop.updateTid(TestRunner)
   at frysk.event.EventLoop.run(TestRunner)
   at frysk.proc.TestSyscallSignal.setUp(TestRunner)
   at junit.framework.TestCase.runBare(TestRunner)
   at junit.framework.TestResult$1.protect(TestRunner)
   at junit.framework.TestResult.runProtected(TestRunner)
   at junit.framework.TestResult.run(TestRunner)
   at junit.framework.TestCase.run(TestRunner)
   at junit.framework.TestSuite.runTest(TestRunner)
   at junit.framework.TestSuite.run(TestRunner)
   at junit.framework.TestSuite.runTest(TestRunner)
   at junit.framework.TestSuite.run(TestRunner)
   at junit.textui.TestRunner.doRun(TestRunner)
   at junit.textui.TestRunner.doRun(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Now set to 20753 from ...
java.lang.Exception
   at frysk.event.EventLoop.updateTid(TestRunner)
   at frysk.event.EventLoop.run(TestRunner)
   at frysk.proc.TestSyscallSignal$EventLoopRunner.run(TestRunner)
Comment 1 Andrew Cagney 2007-04-17 16:55:24 UTC
See frysk.proc.TestBreakpoint for how to rewrite the code and eliminate the problem.
Comment 2 Andrew Cagney 2007-04-17 20:34:58 UTC
2007-04-17  Andrew Cagney  <cagney@redhat.com>

	* TestSyscallSignal.java (setUp): Use Replace EventLoop.run with
	assertRunUntilStop; do not create EventLoopRunner.
	(EventLoopRunner, eventLoop, monitor): Delete.
	(tearDown): Delete.
	(testIt): Replace synchronize blocks with calls to
	assertRunUntilStop.
	(SignalObserver.addedTo, SignalObserver.deletedFrom)
	(SyscallObserver.updateSyscallEnter, SyscallObserver.addedTo)
	(SyscallObserver.deletedFrom): Simplify, call
	EventLoop.requestStop.