From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7515 invoked by alias); 10 Apr 2008 10:55:19 -0000 Received: (qmail 7477 invoked by uid 22791); 10 Apr 2008 10:55:18 -0000 X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64,J_CHICKENPOX_66 X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Apr 2008 10:54:56 +0000 Received: from cc1341701-a.deven1.ov.home.nl ([82.72.26.122] helo=[192.168.1.108]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1JjuQd-0005KY-40 for frysk@sourceware.org; Thu, 10 Apr 2008 12:54:53 +0200 Subject: [patch] Make ferror use the right Option constructor From: Mark Wielaard To: frysk@sourceware.org Content-Type: text/plain Date: Thu, 10 Apr 2008 11:38:00 -0000 Message-Id: <1207824887.5343.44.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-Transfer-Encoding: 7bit X-Spam-Score: -0.6 (/) X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00044.txt.bz2 Hi, The help text for ferror looked slightly strange: ferror options: -e error regex to catch in double quotes -e "" --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 * 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 \"\"") { + group.add(new Option("error", 'e', + "error regex to catch in double quotes", + "") { public void parsed(String argument) throws OptionException { writePattern = Pattern.compile(argument); }