This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Make ferror use the right Option constructor


Hi,

The help text for ferror looked slightly strange:
ferror options:
  -e error regex to catch in double quotes -e "<error string>"      --error

Looking at the code revealed that it used the wrong Option constructor
(wrong order of arguments). This fixes it to use the Options(String,
char, String, String) constructor (long-option, short-option,
description, argument-description).

frysk-core/frysk/bindir/ChangeLog
2008-04-10  Mark Wielaard  <mwielaard@redhat.com>

    * ferror.java (options): Use correct Options constructor.

No regressions with this patch.

There is one failure that seems to have been there for a while (bug
#6390):

testFerrorTracesPID(frysk.bindir.TestFerror)junit.framework.AssertionFailedError: run until signal: assertSendAddCloneWaitForAcks(signals {SIGUSR1(10),SIGUSR2(12)}); outstanding: {SIGUSR2(12)}

Cheers,

Mark


diff --git a/frysk-core/frysk/bindir/ferror.java b/frysk-core/frysk/bindir/ferror.java
index 06cb1ca..ed0cbdb 100644
--- a/frysk-core/frysk/bindir/ferror.java
+++ b/frysk-core/frysk/bindir/ferror.java
@@ -64,8 +64,9 @@ public class ferror {
     private static Pattern writePattern;
     private static OptionGroup[] options() {
        OptionGroup group = new OptionGroup("ferror options");
-       group.add(new Option('e', "--error",
-                            "error regex to catch in double quotes -e \"<error string>\"") {
+       group.add(new Option("error", 'e',
+                            "error regex to catch in double quotes",
+                            "<error string>") {
                public void parsed(String argument) throws OptionException {
                    writePattern = Pattern.compile(argument);
                }  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]