Bug 4387 - Running testIt(frysk.proc.TestSyscallSignal) ...WARNING: EventLoop.tid changed
Summary: Running testIt(frysk.proc.TestSyscallSignal) ...WARNING: EventLoop.tid changed
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 1524
  Show dependency treegraph
 
Reported: 2007-04-17 16:54 UTC by Andrew Cagney
Modified: 2007-04-17 19:34 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.