[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dejagnu
Subject:    PATCH 1/3: Fix handling of blank lines in testsuite/runtest.libs/libs.exp
From:       Jacob Bachmeyer <jcb62281 () gmail ! com>
Date:       2019-01-10 4:14:13
Message-ID: 5C36C695.3020801 () gmail ! com
[Download RAW message or body]

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

_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic