[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rsh.exp: Handle regexp return status
From: |
Christophe Lyon |
Subject: |
rsh.exp: Handle regexp return status |
Date: |
Tue, 12 Apr 2016 17:02:28 +0200 |
Hello,
I noticed that in rsh.exp, we do not handle regexp return status.
In some cases where the test output is truncated, XYZ$?ZYX
cannot match, but this is un-noticed.
The attached patch fixes this. Note that I also needed to patch
GCC's testsuite/lib/gcc-dg.exp because we now return unresolved
for testcases where the output is truncated while GCC
only expects "pass" or "fail". The GCC patch looks like:
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 9e4ecce..6cdce0d 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -380,6 +380,7 @@ if { [info procs ${tool}_load] != [list] \
switch [lindex $result 0] {
"pass" { set status "fail" }
"fail" { set status "pass" }
+ default { set status [lindex $result 0] }
}
set result [list $status [lindex $result 1]]
}
I will submit it separately of course.
OK?
Christophe
dj-rsh.log.txt
Description: Text document
dj-rsh.patch.txt
Description: Text document
- rsh.exp: Handle regexp return status,
Christophe Lyon <=