From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1818 invoked by alias); 12 Feb 2008 21:54:41 -0000 Received: (qmail 1783 invoked by uid 367); 12 Feb 2008 21:54:38 -0000 Date: Tue, 12 Feb 2008 21:54:00 -0000 Message-ID: <20080212215438.1768.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Use FileDescriptor and frysk.rsl in frysk.testbed. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: cf2909a63dfa39d541cb148d12bdcb538d909003 X-Git-Newrev: 4dd4ab30dd3aae2c59ad06e9f27a683ce9ce6394 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q1/txt/msg00202.txt.bz2 The branch, master has been updated via 4dd4ab30dd3aae2c59ad06e9f27a683ce9ce6394 (commit) from cf2909a63dfa39d541cb148d12bdcb538d909003 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 4dd4ab30dd3aae2c59ad06e9f27a683ce9ce6394 Author: Andrew Cagney Date: Tue Feb 12 16:48:11 2008 -0500 Use FileDescriptor and frysk.rsl in frysk.testbed. frysk-core/frysk/ftrace/ChangeLog 2008-02-12 Andrew Cagney * TestLtrace.java: Update to match frysk.testbed. * TestMappingGuard.java: Ditto. frysk-core/frysk/proc/ChangeLog 2008-02-12 Andrew Cagney * TestTaskTerminateObserver.java: Update to match frysk.testbed. * TestTaskSyscallObserver.java: Update. * TestProcGet.java: Ditto. * TestExec.java: Ditto. * TestTaskClonedObserver.java: Ditto. * TestTaskObserverDetach.java: Ditto. * TestFindProc.java: Ditto. frysk-core/frysk/proc/live/ChangeLog 2008-02-12 Andrew Cagney * TestRefresh.java: Update to match frysk.testbed. * TestTaskObserverCode.java: Ditto. * TestRuntimeIsa.java: Ditto. frysk-core/frysk/testbed/ChangeLog 2008-02-12 Andrew Cagney Replace "int pid" with ProcessIdentifier; use frysk.rsl. * TestLib.java: Update. * TestfileTokenScanner.java: Update. * TaskObserverBase.java: Update. * SignalWaiter.java: Update. * Offspring.java (getPid()): Return a ProcessIdentifier. (logger): Delete. * ExecOffspring.java: Update. * SynchronizedOffspring.java: Update. * SlaveOffspring.java: Update. (assertSendAddForkWaitForAcks(int)): Delete. (assertSendAddCloneWaitForAcks(int)): Delete. * LegacyOffspring.java: Update. (assertSendAddForkWaitForAcks(int)): Delete. (assertSendAddCloneWaitForAcks(int)): Delete. * StopEventLoopWhenProcRemoved.java: Update. * StatState.java: Update. (assertRunUntil(Task)): New. (assertIs(Task)): New. * DaemonBlockedAtSignal.java: Extend Offspring; update. * DaemonBlockedAtEntry.java: Ditto; update. frysk-sys/frysk/rsl/ChangeLog 2008-02-12 Andrew Cagney * Log.java: Add more loggers. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/ftrace/ChangeLog | 5 ++ frysk-core/frysk/ftrace/TestLtrace.java | 35 +++------ frysk-core/frysk/ftrace/TestMappingGuard.java | 9 +-- frysk-core/frysk/proc/ChangeLog | 10 +++ frysk-core/frysk/proc/TestExec.java | 8 +- frysk-core/frysk/proc/TestFindProc.java | 6 +- frysk-core/frysk/proc/TestProcGet.java | 4 +- frysk-core/frysk/proc/TestRun.java | 61 +++++++--------- frysk-core/frysk/proc/TestTaskClonedObserver.java | 4 +- frysk-core/frysk/proc/TestTaskForkedObserver.java | 4 +- frysk-core/frysk/proc/TestTaskObserverDetach.java | 2 +- frysk-core/frysk/proc/TestTaskSyscallObserver.java | 11 ++-- .../frysk/proc/TestTaskTerminateObserver.java | 4 +- frysk-core/frysk/proc/live/ChangeLog | 4 + frysk-core/frysk/proc/live/TestRefresh.java | 7 +- frysk-core/frysk/proc/live/TestRuntimeIsa.java | 6 +- .../frysk/proc/live/TestTaskObserverBlocked.java | 3 +- .../frysk/proc/live/TestTaskObserverCode.java | 5 +- frysk-core/frysk/testbed/ChangeLog | 24 ++++++ frysk-core/frysk/testbed/DaemonBlockedAtEntry.java | 19 +++-- .../frysk/testbed/DaemonBlockedAtSignal.java | 10 ++- frysk-core/frysk/testbed/ExecOffspring.java | 10 ++- frysk-core/frysk/testbed/LegacyOffspring.java | 12 +--- frysk-core/frysk/testbed/Offspring.java | 7 +- frysk-core/frysk/testbed/SignalWaiter.java | 23 ++---- frysk-core/frysk/testbed/SlaveOffspring.java | 12 +--- frysk-core/frysk/testbed/StatState.java | 24 +++++-- .../testbed/StopEventLoopWhenProcRemoved.java | 36 +++++---- .../frysk/testbed/SynchronizedOffspring.java | 23 +++---- frysk-core/frysk/testbed/TaskObserverBase.java | 18 ++--- frysk-core/frysk/testbed/TestLib.java | 48 ++++--------- frysk-core/frysk/testbed/TestfileTokenScanner.java | 74 +++++++++---------- frysk-sys/frysk/rsl/ChangeLog | 4 + frysk-sys/frysk/rsl/Log.java | 45 ++++++++++-- 34 files changed, 301 insertions(+), 276 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/ftrace/ChangeLog b/frysk-core/frysk/ftrace/ChangeLog index ed886b1..5d04a0a 100644 --- a/frysk-core/frysk/ftrace/ChangeLog +++ b/frysk-core/frysk/ftrace/ChangeLog @@ -1,3 +1,8 @@ +2008-02-12 Andrew Cagney + + * TestLtrace.java: Update to match frysk.testbed. + * TestMappingGuard.java: Ditto. + 2008-02-07 Andrew Cagney * Ftrace.java: Update to use Host.requestProc(int,FindProc). diff --git a/frysk-core/frysk/ftrace/TestLtrace.java b/frysk-core/frysk/ftrace/TestLtrace.java index 395eb93..b6b5f07 100644 --- a/frysk-core/frysk/ftrace/TestLtrace.java +++ b/frysk-core/frysk/ftrace/TestLtrace.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2007, Red Hat Inc. +// Copyright 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -41,7 +41,6 @@ package frysk.ftrace; import frysk.Config; import frysk.proc.Action; -import frysk.proc.Proc; import frysk.proc.Task; import frysk.testbed.*; @@ -249,13 +248,11 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-syscalls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); MappingGuard.requestAddMappingObserver(task, mappingObserver); assertRunUntilStop("add mapping observer"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); @@ -346,8 +343,6 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-calls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); GenericMappingObserver mappingObserver = new GenericMappingObserver(new ObserverCreator() { @@ -363,7 +358,7 @@ public class TestLtrace MappingGuard.requestAddMappingObserver(task, mappingObserver); assertRunUntilStop("add mapping observer"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); @@ -439,15 +434,13 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-calls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); - + String symbols[] = {"fun1", "alias1", "alias2"}; MyObserverCreator3 observerCreator = new MyObserverCreator3("alias2", "fun1", enterAliases, leaveAliases); MappingGuard.requestAddMappingObserver(task, new GenericMappingObserver(observerCreator)); assertRunUntilStop("add mapping observer"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); @@ -467,14 +460,12 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-calls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); - + Multicontroller observerCreator = new Multicontroller(N, "trace_me_1"); MappingGuard.requestAddMappingObserver(task, new GenericMappingObserver(observerCreator)); assertRunUntilStop("add mapping observer"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); @@ -495,9 +486,7 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-calls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); - + int N = 10; String[] symbols = {"trace_me_1", "trace_me_2"}; Multicontroller[] controllers = new Multicontroller[symbols.length]; @@ -508,7 +497,7 @@ public class TestLtrace } assertRunUntilStop("add mapping guards"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); @@ -530,14 +519,12 @@ public class TestLtrace String[] cmd = {Config.getPkgLibFile("funit-calls").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); - + SimpleController controller = new SimpleController("recursive"); MappingGuard.requestAddMappingObserver(task, new GenericMappingObserver(controller)); assertRunUntilStop("add mapping guards"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); diff --git a/frysk-core/frysk/ftrace/TestMappingGuard.java b/frysk-core/frysk/ftrace/TestMappingGuard.java index c00d0d7..c31df51 100644 --- a/frysk-core/frysk/ftrace/TestMappingGuard.java +++ b/frysk-core/frysk/ftrace/TestMappingGuard.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2007, Red Hat Inc. +// Copyright 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -42,7 +42,6 @@ package frysk.ftrace; import frysk.Config; import frysk.proc.Action; import frysk.proc.Manager; -import frysk.proc.Proc; import frysk.proc.Task; import frysk.testbed.*; @@ -92,14 +91,12 @@ public class TestMappingGuard String[] cmd = {Config.getPkgLibFile("funit-empty").getPath()}; DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(cmd); Task task = child.getMainTask(); - Proc proc = task.getProc(); - int pid = proc.getPid(); - + MyMappingObserver observer = new MyMappingObserver(); MappingGuard.requestAddMappingObserver(task, observer); assertRunUntilStop("add mapping observer"); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run child until exit"); diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog index 7158823..05ffdcc 100644 --- a/frysk-core/frysk/proc/ChangeLog +++ b/frysk-core/frysk/proc/ChangeLog @@ -1,3 +1,13 @@ +2008-02-12 Andrew Cagney + + * TestTaskTerminateObserver.java: Update to match frysk.testbed. + * TestTaskSyscallObserver.java: Update. + * TestProcGet.java: Ditto. + * TestExec.java: Ditto. + * TestTaskClonedObserver.java: Ditto. + * TestTaskObserverDetach.java: Ditto. + * TestFindProc.java: Ditto. + 2008-02-08 Andrew Cagney * Task.java (compareTo(Object)): New. diff --git a/frysk-core/frysk/proc/TestExec.java b/frysk-core/frysk/proc/TestExec.java index 0c2356c..f7b6e25 100644 --- a/frysk-core/frysk/proc/TestExec.java +++ b/frysk-core/frysk/proc/TestExec.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, 2006, 2007, Red Hat Inc. +// Copyright 2005, 2006, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -110,7 +110,7 @@ public class TestExec assertTrue("tmp file exists", tmpFile.stillExists()); // Unblock the process, let it exit. - new StopEventLoopWhenProcRemoved(task.getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); task.requestUnblock(execBlockCounter); assertRunUntilStop("wait for exec program exit"); @@ -150,7 +150,7 @@ public class TestExec mainTask.getProc().getTasks().size()); // Set things up to stop once the exec task exits. - new StopEventLoopWhenProcRemoved(mainTask.getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); mainTask.requestUnblock(execBlockCounter); assertRunUntilStop("wait for exec program exit"); @@ -204,7 +204,7 @@ public class TestExec // .updateExeced has been called. child.assertRunExec("exec-observer fires"); - assertEquals("pid after attached single exec", child.getPid(), + assertEquals("pid after attached single exec", child.getPid().intValue(), execObserver.savedTid); } diff --git a/frysk-core/frysk/proc/TestFindProc.java b/frysk-core/frysk/proc/TestFindProc.java index 7dcab2c..43f6dfa 100644 --- a/frysk-core/frysk/proc/TestFindProc.java +++ b/frysk-core/frysk/proc/TestFindProc.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, Red Hat Inc. +// Copyright 2005, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -120,8 +120,8 @@ public class TestFindProc * Find out how many processes are associated with the test process. * Should be just the one. */ - FindProc finder = new MyFinder(ackProc.getPid()); - Manager.host.requestProc(ackProc.getPid(), finder); + FindProc finder = new MyFinder(ackProc.getPid().intValue()); + Manager.host.requestProc(ackProc.getPid().intValue(), finder); assertRunUntilStop("testFindProc"); int postFind = o.getCount(); diff --git a/frysk-core/frysk/proc/TestProcGet.java b/frysk-core/frysk/proc/TestProcGet.java index e48b0f5..646cc7c 100644 --- a/frysk-core/frysk/proc/TestProcGet.java +++ b/frysk-core/frysk/proc/TestProcGet.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, 2006, 2007, Red Hat Inc. +// Copyright 2005, 2006, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -76,7 +76,7 @@ public class TestProcGet "/dev/null" }); - new StopEventLoopWhenProcRemoved(child.getMainTask().getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); // Grab the AUXV from the process sitting at its entry point. Auxv[] auxv = child.getMainTask().getProc().getAuxv(); assertNotNull("captured AUXV", auxv); diff --git a/frysk-core/frysk/proc/TestRun.java b/frysk-core/frysk/proc/TestRun.java index b463cea..84ba596 100644 --- a/frysk-core/frysk/proc/TestRun.java +++ b/frysk-core/frysk/proc/TestRun.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, 2006, 2007, Red Hat Inc. +// Copyright 2005, 2006, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -69,23 +69,19 @@ public class TestRun // events. ProcCounter procCounter = new ProcCounter(Pid.get()); - // Observe TaskObserver.Attached events; when any occur - // indicate that the curresponding task should continue. - class TaskCreatedContinuedObserver - extends TaskObserverBase + // Observe TaskObserver.Attached events; when any occur indicate + // that the curresponding task should continue. + class TaskCreatedContinuedObserver extends TaskObserverBase implements TaskObserver.Attached { - final TaskSet attachedTasks = new TaskSet(); - - int tid; - - public Action updateAttached (Task task) - { - attachedTasks.add(task); - tid = task.getTid(); - Manager.eventLoop.requestStop(); - return Action.CONTINUE; - } + final TaskSet attachedTasks = new TaskSet(); + Proc proc; + public Action updateAttached(Task task) { + attachedTasks.add(task); + proc = task.getProc(); + Manager.eventLoop.requestStop(); + return Action.CONTINUE; + } } TaskCreatedContinuedObserver createdObserver = new TaskCreatedContinuedObserver(); @@ -97,7 +93,7 @@ public class TestRun assertRunUntilStop("run \"rm\" to entry for tid"); // Once the proc destroyed has been seen stop the event loop. - new StopEventLoopWhenProcRemoved(createdObserver.tid); + new StopEventLoopWhenProcRemoved(createdObserver.proc); // Run the event loop, cap it at 5 seconds. assertRunUntilStop("run \"rm\" to exit"); @@ -117,24 +113,21 @@ public class TestRun TearDownFile tmpFile = TearDownFile.create(); assertNotNull("temporary file", tmpFile); - // Observe TaskObserver.Attached events; when any occur - // indicate that the curresponding task should block, and then - // request that the event-loop stop. + // Observe TaskObserver.Attached events; when any occur indicate + // that the curresponding task should block, and then request that + // the event-loop stop. class TaskCreatedStoppedObserver extends TaskObserverBase implements TaskObserver.Attached { - int tid; - - final TaskSet attachedTasks = new TaskSet(); - - public Action updateAttached (Task task) - { - attachedTasks.add(task); - tid = task.getTid(); - Manager.eventLoop.requestStop(); - return Action.BLOCK; - } + Proc proc; + final TaskSet attachedTasks = new TaskSet(); + public Action updateAttached(Task task) { + attachedTasks.add(task); + proc = task.getProc(); + Manager.eventLoop.requestStop(); + return Action.BLOCK; + } } TaskCreatedStoppedObserver createdObserver = new TaskCreatedStoppedObserver(); @@ -144,8 +137,8 @@ public class TestRun tmpFile.toString() }, createdObserver); - // Run the event loop. TaskCreatedStoppedObserver will BLOCK - // the process at the entry point. + // Run the event loop. TaskCreatedStoppedObserver will BLOCK the + // process at the entry point. assertRunUntilStop("run \"rm\" to entry"); // A single task should be blocked at its entry point. @@ -153,7 +146,7 @@ public class TestRun assertTrue("tmp file exists", tmpFile.stillExists()); // Once the proc destroyed has been seen stop the event loop. - new StopEventLoopWhenProcRemoved(createdObserver.tid); + new StopEventLoopWhenProcRemoved(createdObserver.proc); // Unblock the attached task and resume the event loop. This // will allow the "rm" command to run to completion. diff --git a/frysk-core/frysk/proc/TestTaskClonedObserver.java b/frysk-core/frysk/proc/TestTaskClonedObserver.java index e08e62b..2a6aa43 100644 --- a/frysk-core/frysk/proc/TestTaskClonedObserver.java +++ b/frysk-core/frysk/proc/TestTaskClonedObserver.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, 2006, 2007, Red Hat Inc. +// Copyright 2005, 2006, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ public class TestTaskClonedObserver Integer.toString(fibCount) }); - new StopEventLoopWhenProcRemoved(child.getMainTask().getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); child.getMainTask().requestAddClonedObserver(cloneCounter); child.requestRemoveBlock(); diff --git a/frysk-core/frysk/proc/TestTaskForkedObserver.java b/frysk-core/frysk/proc/TestTaskForkedObserver.java index 813d103..ee24c7c 100644 --- a/frysk-core/frysk/proc/TestTaskForkedObserver.java +++ b/frysk-core/frysk/proc/TestTaskForkedObserver.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, 2006, 2007, Red Hat Inc. +// Copyright 2005, 2006, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -112,7 +112,7 @@ public class TestTaskForkedObserver int pid = child.getMainTask().getProc().getPid(); ProcCounter procCounter = new ProcCounter(pid); - new StopEventLoopWhenProcRemoved(pid); + new StopEventLoopWhenProcRemoved(child); child.getMainTask().requestAddForkedObserver(forkObserver); child.requestRemoveBlock(); assertRunUntilStop("run \"fork\" until exit"); diff --git a/frysk-core/frysk/proc/TestTaskObserverDetach.java b/frysk-core/frysk/proc/TestTaskObserverDetach.java index fcae88b..684a4ab 100644 --- a/frysk-core/frysk/proc/TestTaskObserverDetach.java +++ b/frysk-core/frysk/proc/TestTaskObserverDetach.java @@ -117,7 +117,7 @@ public class TestTaskObserverDetach if (!eventIsSignal ()) assertRunUntilStop ("delivering signal"); - StatState.TRACED_OR_STOPPED.assertIs(task.getTid()); + StatState.TRACED_OR_STOPPED.assertIs(task); // Set up an ack handler to catch the process // acknowledging that it has completed the relevant task. diff --git a/frysk-core/frysk/proc/TestTaskSyscallObserver.java b/frysk-core/frysk/proc/TestTaskSyscallObserver.java index cde8b05..5966ae8 100644 --- a/frysk-core/frysk/proc/TestTaskSyscallObserver.java +++ b/frysk-core/frysk/proc/TestTaskSyscallObserver.java @@ -260,7 +260,7 @@ public class TestTaskSyscallObserver // XXX: This is wrong; the task isn't a child so this will // never work. What about assertRunUntilTaskRemoved (...)? - new StopEventLoopWhenProcRemoved(child.getMainTask().getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run until program exits"); @@ -293,7 +293,6 @@ public class TestTaskSyscallObserver } logger.log(Level.FINE, "{0} **updateAttached\n", task); - new StopEventLoopWhenProcRemoved(task.getProc().getPid()); task.requestAddSyscallsObserver(syscallObserver1); // task.requestUnblock(this); return Action.BLOCK; @@ -357,7 +356,7 @@ public class TestTaskSyscallObserver // XXX: This is wrong; the task isn't a child so this will // never work. What about assertRunUntilTaskRemoved (...)? - new StopEventLoopWhenProcRemoved(child.getMainTask().getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); child.requestRemoveBlock(); assertRunUntilStop("run until program exits"); @@ -423,7 +422,7 @@ public class TestTaskSyscallObserver // Create program making syscalls DaemonBlockedAtEntry child = new DaemonBlockedAtEntry(Config.getPkgLibFile("funit-syscalls")); - new StopEventLoopWhenProcRemoved(child.getMainTask().getProc().getPid()); + new StopEventLoopWhenProcRemoved(child); SyscallOpenObserver syscallOpenObserver = new SyscallOpenObserver( child.getMainTask()); @@ -580,7 +579,7 @@ public class TestTaskSyscallObserver // return; PipeReadChild prc = new PipeReadChild(false); - TestSyscallInterruptXXX t = new TestSyscallInterruptXXX(prc.getPid()); + TestSyscallInterruptXXX t = new TestSyscallInterruptXXX(prc.getPid().intValue()); new StopEventLoopWhenProcRemoved(prc.getPid()); assertRunUntilStop("run \"syscallint\" until exit"); @@ -598,7 +597,7 @@ public class TestTaskSyscallObserver { PipeReadChild prc = new PipeReadChild(true); - TestSyscallInterruptXXX t = new TestSyscallInterruptXXX(prc.getPid()); + TestSyscallInterruptXXX t = new TestSyscallInterruptXXX(prc.getPid().intValue()); new StopEventLoopWhenProcRemoved(prc.getPid()); assertRunUntilStop("run \"syscallint\" with restart until exit"); hooks/post-receive -- frysk system monitor/debugger