Bug 4386 - Running testSyscallRunning(frysk.proc.TestSyscallRunning) ...WARNING: EventLoop.tid changed
Summary: Running testSyscallRunning(frysk.proc.TestSyscallRunning) ...WARNING: EventLo...
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:52 UTC by Andrew Cagney
Modified: 2007-04-17 19:46 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:52:16 UTC
All ptrace calls must originate from the one thread, and if that thread is the
event-loop thread it can't change.

Running testSyscallRunning(frysk.proc.TestSyscallRunning) ...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.TestSyscallRunning.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 20751 from ...
java.lang.Exception
   at frysk.event.EventLoop.updateTid(TestRunner)
   at frysk.event.EventLoop.run(TestRunner)
   at frysk.proc.TestSyscallRunning$EventLoopRunner.run(TestRunner)
Comment 1 Andrew Cagney 2007-04-17 16:55:22 UTC
See frysk.proc.TestBreakpoint for how to rewrite the code and eliminate the problem.
Comment 2 Andrew Cagney 2007-04-17 20:46:03 UTC
2007-04-17  Andrew Cagney  <cagney@redhat.com>

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