PATCH 1/3: Fix handling of blank lines in testsuite/runtest.libs/libs.exp

Jacob Bachmeyer <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
Previously, Expect could hang if the child process running tests emitted 
a blank line, or if an end-of-line sequence was split (this latter 
circumstance is very rare and I have not directly observed it -- only an 
unreproducible hang, once, that I now believe to have been caused by 
this bug), causing all subsequent output to pile up in Expect's buffer 
unrecognized.

----
ChangeLog entry:
	* testsuite/runtest.libs/libs.exp (process_test): Handle blank
	lines from child process correctly.
---
 testsuite/runtest.libs/libs.exp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/testsuite/runtest.libs/libs.exp b/testsuite/runtest.libs/libs.exp
index 80b46ab..8521ead 100644
--- a/testsuite/runtest.libs/libs.exp
+++ b/testsuite/runtest.libs/libs.exp
@@ -44,6 +44,7 @@ proc process_test { test } {
 	    "no such file or directory" {
 		perror "$test wouldn't run" 0
 	    }
+	    -re {^[\r\n]+} { exp_continue }
 	    -re "^\[^\r\n\]*NOTSUPPORTED: $text\[\r\n\]*" {
 		unsupported "[lrange $expect_out(0,string) 1 end]"
 		exp_continue
----


-- Jacob
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.