Re: Line-truncation bug in host_execute?

Ben Elliston <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
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  <[email protected]>

	    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 <[email protected]>.
 
 # 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 } {

_______________________________________________
DejaGnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/dejagnu
signature.asc (application/pgp-signature, 811 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBVsEWG3Y2KIi1WYjUAQiVURAAwCqcWyGFPgaRwaRxPDwikr7lysrjAWgB
yloYst90EWnJsZgPRhuohm8acL6s/w8FK+kxuwNa93pUYWgPNqTJd5H+RD4BIiC/
V4mj1lv1IjgdSUV2aRXdFMG/SDikaES61kKdpca/1vdw7tnbnwf8n71WSupHgAbS
GkPv8WeSMHlGS+jc0/K8EHLRg45HserjDzJwrPxPZL95/5jEeiGhn5zWZYpSErfZ
DSO+9SqyH/Rq3F2koA50IluW+MKZP2uT0ax5a6MJH8ARD18O55mqmP462vJLwjrZ
2UgLtjxkbcCSs45RBq5ueoIj7sovWIWFa/rvF/lxVCKe51okUGSzm9AoXsyan6gJ
nW3BfmOWhTH37ruVlxgOCsZ2vGZq+Zb3zgVz2fcUT+nKjDGB0cdikm9yVHzBtdiC
RaR3Wfg+GCPGD+MQQgJGc4Ph3PZIbli5GFAwjspnCq8b7cvH5iF4EpSWRFlHYPee
Hgi7pWrsMmrdzst64f1Zy4z7/brF5iDjZLUap1qWTD0JRoXMlAXJJhA5+wOSy1jK
Atj9fJZ4fwIE1M70ldbfEF+CAnZ41JBMKsWyqQ1QSPeHXU+X7IkTowsXAqP8r7/U
JlcNm89rd3IL4i5T3wvN1/1c7jkRWOAKWa4aZOm5MYTz15K8miYaZ6JTqK0vfrMQ
DgCe52xv+yk=
=cPov
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.