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
2016-04-12 Christophe Lyon <christophe.l...@linaro.org> * lib/rsh.exp (rsh_exec): Handle regexp return status.
diff --git a/lib/rsh.exp b/lib/rsh.exp index 123f245..c5d1cfc 100644 --- a/lib/rsh.exp +++ b/lib/rsh.exp @@ -310,7 +310,9 @@ proc rsh_exec { boardname program pargs inp outp } { regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output return [list $status "$RSH to $boardname failed for $program, $output"] } - regexp "XYZ(\[0-9\]*)ZYX" $output junk status + if { [regexp "XYZ(\[0-9\]*)ZYX" $output junk status] == 0 } { + set status "" + } verbose "rsh_exec: status:$status text:$output" 4 if { $status == "" } { return [list -1 "Couldn't parse $RSH output, $output."]
_______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu