public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: rmoseley@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Get commandline args from proc's getCmdLine() method. Date: Fri, 06 Jun 2008 18:34:00 -0000 [thread overview] Message-ID: <20080606183445.19195.qmail@sourceware.org> (raw) The branch, master has been updated via 1cfab34772f780f0496b3d5007217b41c04264d6 (commit) from 0b84d1552a760ccbf0df4e6caa2948cc2a952012 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1cfab34772f780f0496b3d5007217b41c04264d6 Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com> Date: Fri Jun 6 13:32:35 2008 -0500 Get commandline args from proc's getCmdLine() method. * CoreCommand.java: Get args from commandline for run. * TestCoreCommand.java: Add test for above. * testbed/SlaveOffspring.java: Add methods to accept commandline args. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 5 +++++ frysk-core/frysk/hpd/CoreCommand.java | 1 + frysk-core/frysk/hpd/TestCoreCommand.java | 21 +++++++++++++++++++++ frysk-core/frysk/testbed/ChangeLog | 4 ++++ frysk-core/frysk/testbed/SlaveOffspring.java | 10 ++++++++++ 5 files changed, 41 insertions(+), 0 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 33e1546..417a8e9 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,3 +1,8 @@ +2006-06-06 Rick Moseley <rmoseley@redhat.com> + + * CoreCommand.java: Get args from commandline for run. + * TestCoreCommand.java: Add test for above. + 2008-06-05 Rick Moseley <rmoseley@redhat.com> * UnloadCommand.java: Fix errors for unloading processes. diff --git a/frysk-core/frysk/hpd/CoreCommand.java b/frysk-core/frysk/hpd/CoreCommand.java index 7677ee9..ced6d22 100644 --- a/frysk-core/frysk/hpd/CoreCommand.java +++ b/frysk-core/frysk/hpd/CoreCommand.java @@ -140,6 +140,7 @@ public class CoreCommand extends ParameterizedCommand { // Finally, done. synchronized (cli) { cli.coreProcs.put(coreProc, new Integer(procID)); + cli.ptsetParams.put(new Integer(procID), coreProc.getCmdLine()); } cli.outWriter.println("Attached to core file: " + coreProc.getHost().getName()); diff --git a/frysk-core/frysk/hpd/TestCoreCommand.java b/frysk-core/frysk/hpd/TestCoreCommand.java index 9ba3eb1..787edf8 100644 --- a/frysk-core/frysk/hpd/TestCoreCommand.java +++ b/frysk-core/frysk/hpd/TestCoreCommand.java @@ -41,6 +41,7 @@ package frysk.hpd; import java.io.File; import frysk.testbed.CorefileFactory; +import frysk.testbed.SlaveOffspring; import frysk.config.Prefix; public class TestCoreCommand extends TestLib { @@ -85,4 +86,24 @@ public class TestCoreCommand extends TestLib { e.sendCommandExpectPrompt("run", "Attached to process.*"); } + + public void testCoreLoadedParams() { + + if (unresolved(6602)) + return; + String[] args = {"zzz", "yyy" }; + SlaveOffspring newProc = SlaveOffspring.createDaemon(args); + int pid = newProc.getPid().intValue(); + e = new HpdTestbed(); + e.sendCommandExpectPrompt("start", "starting.*zzz yyy.*" + + "Attached to process ([0-9]+).*"); + e.sendCommandExpectPrompt("dump -a -o test_core." + pid, "Generating corefile.*"); + e.sendCommandExpectPrompt("unload -t 0", "Removed Target set \\[0\\].*"); + e.sendCommandExpectPrompt("core test_core." + pid, "Attached to core.*"); + e.sendCommandExpectPrompt("run", "running.*zzz yyy.*" + + "Attached to process ([0-9]+).*" + "Running process ([0-9]+).*"); + e.send("quit\n"); + e.expect("Quitting\\.\\.\\."); + e.close(); + } } diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog index 68af896..1babdc8 100644 --- a/frysk-core/frysk/testbed/ChangeLog +++ b/frysk-core/frysk/testbed/ChangeLog @@ -1,3 +1,7 @@ +2008-06-06 Rick Moseley <rmoseley@redhat.com> + + * SlaveOffspring.java: Add methods to accept commandline args. + 2008-05-09 Andrew Cagney <cagney@redhat.com> * OffspringType.java: Pass File to Fork.daemon. diff --git a/frysk-core/frysk/testbed/SlaveOffspring.java b/frysk-core/frysk/testbed/SlaveOffspring.java index ad1382f..7c07fd6 100644 --- a/frysk-core/frysk/testbed/SlaveOffspring.java +++ b/frysk-core/frysk/testbed/SlaveOffspring.java @@ -109,6 +109,10 @@ public class SlaveOffspring super(type, CHILD_ACK, funitSlaveCommand(false, null)); } + /** Create an ack process with args. */ + private SlaveOffspring (OffspringType type, String[] args) { + super(type, CHILD_ACK, funitSlaveCommand(false, args)); + } /** * Create an SlaveOffspring; if BUSY, the process will use a * busy-loop, instead of suspending, when waiting for signal @@ -264,6 +268,12 @@ public class SlaveOffspring return new SlaveOffspring(OffspringType.DAEMON); } /** + * Create a slave-process that is a child of this process with args. + */ + static public SlaveOffspring createDaemon(String[] args) { + return new SlaveOffspring(OffspringType.DAEMON, args); + } + /** * Create a slave-process that is a child of this process. */ static public SlaveOffspring createDaemon(boolean busy) { hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-06-06 18:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080606183445.19195.qmail@sourceware.org \ --to=rmoseley@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).