dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line-truncation bug in host_execute?


From: Ben Elliston
Subject: Re: Line-truncation bug in host_execute?
Date: Mon, 15 Feb 2016 11:04:44 +1100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi David,

On Fri, Jan 22, 2016 at 04:53:00PM -0500, David Malcolm wrote:

> My tests use dejagnu.h to write "PASSED" etc lines, some of which are
> very long.  They're sometimes being truncated by fixed_host_execute when
> re-emitted as PASS results, so e.g.
> PASSED: test-combination.c.exe iteration 1 of 5: make_calc_discriminant: 
> actual: "q->b * q->b - (double)4 * q->a * q->c" == expected: "q->b * q->b - 
> (double)4 * q->a * q->c"
> is re-emitted as:
> PASS:  test-combination.c.exe iteration 1 of 5: make_calc_discriminant: 
> actual: "q-
> (note the truncation in mid-expression).

I tracked the problem down here using a small Tcl script to verify
Tcl's regexp behaviour.  My minimal Tcl script that reproduces your
problem:

$ tclsh foo.tcl
      PASSED: test-combination.c.exe iteration 1 of 5: make_calc_discriminant: 
actual: "q-

The problem is that less-than and greater-than are not in the pattern
for text permitted in the messages.  This patch fixes it and I'm
committing it now.  Can we please work on eliminating the need for
your modified version of host_execute?


2016-02-15  Ben Elliston  <address@hidden>

            Reported by David Malcolm.
            * lib/dejagnu.exp (text): Allow angle brackets in test messages.

diff --git a/lib/dejagnu.exp b/lib/dejagnu.exp
index b2ffe40..89016b4 100644
--- a/lib/dejagnu.exp
+++ b/lib/dejagnu.exp
@@ -20,7 +20,7 @@
 # This file was written by Rob Savoye <address@hidden>.
 
 # A hairy pattern to recognize text.
-set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]"
+set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*<>]"
 
 set SIZE size
 if { [which $SIZE] == 0 } {

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]