From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10217 invoked by alias); 10 Mar 2008 10:16:21 -0000 Received: (qmail 10208 invoked by uid 22791); 10 Mar 2008 10:16:21 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 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; Mon, 10 Mar 2008 10:16:04 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1JYf33-0005VU-4B; Mon, 10 Mar 2008 11:16:01 +0100 Subject: Re: Patch for PR 5809 From: Mark Wielaard To: Tom Tromey Cc: frysk@sourceware.org In-Reply-To: <1204740862.3367.108.camel@dijkstra.wildebeest.org> References: <18382.38977.407225.695512@fleche.redhat.com> <1204740862.3367.108.camel@dijkstra.wildebeest.org> Content-Type: text/plain Date: Mon, 10 Mar 2008 10:16:00 -0000 Message-Id: <1205144160.3356.11.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) 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-q1/txt/msg00139.txt.bz2 Hi, On Wed, 2008-03-05 at 19:14 +0100, Mark Wielaard wrote: > Yeah, there should have been written a testcase when this code was > changed. I created one that fails before and succeeds after your patch > (attached). Here is a slightly better one that has tighter regexps for the expect output. The original could sometimes gobble up too much output through .* if it was already available. This expects the output more stricly by explicitly matching the \r\n at the end of line output that fhpd does. frysk-core/frysk/hpd/ChangeLog 2008-03-10 Mark Wielaard * TestActionsCommand: Use tighter expect regular expressions. Cheers, Mark diff --git a/frysk-core/frysk/hpd/TestActionsCommand.java b/frysk-core/frysk/hpd index a01b9e8..b72be4d 100644 --- a/frysk-core/frysk/hpd/TestActionsCommand.java +++ b/frysk-core/frysk/hpd/TestActionsCommand.java @@ -47,15 +47,15 @@ public class TestActionsCommand extends TestLib { hpd = HpdTestbed.load("funit-hello"); hpd.send("break print\n"); - hpd.expect("breakpoint.*\n" + prompt); + hpd.expect("breakpoint 0 deferred\r\n" + prompt); hpd.send("run\n"); - hpd.expect("Breakpoint 0.*\n"); + hpd.expect("Breakpoint 0 print 0x[0-9a-f]+\r\n"); - hpd.send("actions\n"); - hpd.expect("actions.*\n"); - hpd.expect("BREAKPOINTS.*\n"); - hpd.expect("0 y print [0-9]+.*\n"); + hpd.send("actions\r\n"); + hpd.expect("actions\r\n"); + hpd.expect("BREAKPOINTS\r\n"); + hpd.expect("0 y print [0-9]+ \r\n"); hpd.send("quit\n"); hpd.expect("quit.*\nQuitting...");