public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: rmoseley@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Add TestUnloadCommand, fix regexp errors, add info message, remove unnecessary remove proc call. Date: Fri, 29 Feb 2008 21:52:00 -0000 [thread overview] Message-ID: <20080229215255.28887.qmail@sourceware.org> (raw) The branch, master has been updated via 2f59fef898b23d942b8091b7c5fdfa992888039d (commit) from 5b833702426e587b5ca96e851d338d1a1b948709 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 2f59fef898b23d942b8091b7c5fdfa992888039d Author: Rick Moseley <rmoseley@localhost.localdomain> Date: Fri Feb 29 15:51:10 2008 -0600 Add TestUnloadCommand, fix regexp errors, add info message, remove unnecessary remove proc call. * TestUnloadommand.java; New. * TestLoadCommand.java: Fix regexp errors. * UnloadCommand.java: Add info message when removing id's; remove proc.getHost().remove(proc) call. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 7 ++++++- frysk-core/frysk/hpd/TestLoadCommand.java | 4 ++-- frysk-core/frysk/hpd/UnloadCommand.java | 14 +++++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 2759746..68eaa90 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -7,7 +7,12 @@ 2008-02-29 Rick Moseley <rmoseley@redhat.com> * TestKillCommand.java: Add test that points to bz 5615. - + + * TestUnloadommand.java; New. + * TestLoadCommand.java: Fix regexp errors. + * UnloadCommand.java: Add info message when removing id's; + remove proc.getHost().remove(proc) call. + 2008-02-28 Andrew Cagney <cagney@redhat.com> * HardList.java: Use frysk.rsl. diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java index dba8d10..40e1134 100644 --- a/frysk-core/frysk/hpd/TestLoadCommand.java +++ b/frysk-core/frysk/hpd/TestLoadCommand.java @@ -77,7 +77,7 @@ public class TestLoadCommand extends TestLib { e.sendCommandExpectPrompt("focus", "Target set.*\\[0\\.0\\]\t\t0\t0.*"+ "\\[1\\.0\\]\t\t0*\\t0.*"); e.sendCommandExpectPrompt("start", "Attached to process.*Attached to process.*"); - e.sendCommandExpectPrompt("focus", "Target set.*\\[0\\.0\\].*\\[1\\.0].*"); + e.sendCommandExpectPrompt("focus", "Target set.*\\[0\\.0\\].*\\[1\\.0\\].*"); e.send("quit\n"); e.expect("Quitting\\.\\.\\."); e.close(); @@ -109,7 +109,7 @@ public class TestLoadCommand extends TestLib { "Loaded executable file.*"); e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(), "Loaded executable file.*"); - e.sendCommandExpectPrompt("load", "Target set.*\\[0\\.0\\].*\\[1\\.0].*"); + e.sendCommandExpectPrompt("load", "Target set.*\\[0\\.0\\].*\\[1\\.0\\].*"); e.send("quit\n"); e.expect("Quitting\\.\\.\\."); e.close(); diff --git a/frysk-core/frysk/hpd/UnloadCommand.java b/frysk-core/frysk/hpd/UnloadCommand.java index 741c587..68d15e0 100644 --- a/frysk-core/frysk/hpd/UnloadCommand.java +++ b/frysk-core/frysk/hpd/UnloadCommand.java @@ -90,9 +90,12 @@ public class UnloadCommand extends ParameterizedCommand { cli.addMessage("Trying to remove a proc that has not been loaded", Message.TYPE_ERROR); return; } - removeFromHashMap(proc, cli.getLoadedProcs(), cli); - cli.targetset.removeProc(id); - proc.getHost().remove(proc); + if (removeFromHashMap(proc, cli.getLoadedProcs(), cli)) { + cli.targetset.removeProc(id); + cli.addMessage("Removed Target set [" + id + "]" , Message.TYPE_NORMAL); + } else { + cli.addMessage("Target id " + id + " could not be found", Message.TYPE_ERROR); + } return; } if (cmd.parameter(0).equals("-all")) { @@ -109,7 +112,7 @@ public class UnloadCommand extends ParameterizedCommand { * @param procMap is the HashMap of the procs to search for removal * @param cli is the current command line interface object */ - private void removeFromHashMap(Proc proc, HashMap procMap, CLI cli) { + private boolean removeFromHashMap(Proc proc, HashMap procMap, CLI cli) { Set procSet = procMap.entrySet(); Iterator foo = procSet.iterator(); while (foo.hasNext()) { @@ -119,9 +122,10 @@ public class UnloadCommand extends ParameterizedCommand { synchronized (cli) { foo.remove(); } - return; + return true; } } + return false; } /** hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-02-29 21:52 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=20080229215255.28887.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).