* Re: remote.exp: fail properly if wrapper status message isn't found [not found] <Pine.BSF.4.30.0111101120000.83243-100000@dair.pair.com> @ 2002-01-20 17:10 ` Andrew Cagney 2002-01-21 8:42 ` Fernando Nasser 0 siblings, 1 reply; 3+ messages in thread From: Andrew Cagney @ 2002-01-20 17:10 UTC (permalink / raw) To: Fernando Nasser; +Cc: Hans-Peter Nilsson, gdb-patches Should this be committed to the src/dejagnu source base (regardless of dejagnu)? Andrew > Hi. > > I had a bug in the fini code in the newlib port of > mmix-knuth-mmixware (film at 11) which exposed this dejagnu > fault: a target using a wrapper gets a PASS if the "*** EXIT > code ..." pattern isn't output. IIRC, at the time I tested > this on other simulator targets, that fault exposed two other > gcc testsuite failures on some other target. I can't remember > which; it might have been d30v or mn10300. > > Please consider applying this. Please make sure to CC me on > follow-ups as I'm not subscribed to these lists. > > 2001-11-10 Hans-Peter Nilsson <hp@bitrange.com> > > * lib/remote.exp (check_for_board_status): Return 2 if the board > uses a status wrapper and there was no match for the expected > pattern. > > Index: remote.exp > =================================================================== > RCS file: /cvsroot/dejagnu/dejagnu/lib/remote.exp,v > retrieving revision 1.4 > diff -p -c -r1.4 remote.exp > *** remote.exp 2001/10/02 15:48:51 1.4 > --- remote.exp 2001/11/10 15:59:40 > *************** proc standard_wait { dest timeout } { > *** 1050,1055 **** > --- 1050,1065 ---- > proc check_for_board_status { variable } { > upvar $variable output; > > + # If all programs of this board have a wrapper that always outputs a > + # status message, then the absence of it means that the program > + # crashed, regardless of status found elsewhere (e.g. simulator exit > + # code). > + if { [target_info needs_status_wrapper] != "" } then { > + set nomatch_return 2 > + } else { > + set nomatch_return -1 > + } > + > if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { > regsub "^.*\\*\\*\\* EXIT code " $output "" result; > regsub "\[\r\n\].*$" $result "" result; > *************** proc check_for_board_status { variable > *** 1059,1070 **** > verbose "got board status $result" 3 > verbose "output is $output" 3 > if { $result == "" } { > ! return -1; > } else { > return [expr $result]; > } > } else { > ! return -1; > } > } > > --- 1069,1080 ---- > verbose "got board status $result" 3 > verbose "output is $output" 3 > if { $result == "" } { > ! return $nomatch_return > } else { > return [expr $result]; > } > } else { > ! return $nomatch_return > } > } > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remote.exp: fail properly if wrapper status message isn't found 2002-01-20 17:10 ` remote.exp: fail properly if wrapper status message isn't found Andrew Cagney @ 2002-01-21 8:42 ` Fernando Nasser 2002-01-21 8:48 ` Andrew Cagney 0 siblings, 1 reply; 3+ messages in thread From: Fernando Nasser @ 2002-01-21 8:42 UTC (permalink / raw) To: Andrew Cagney; +Cc: Hans-Peter Nilsson, gdb-patches Andrew Cagney wrote: > > Should this be committed to the src/dejagnu source base (regardless of dejagnu)? > > Andrew > We'd normally do that _and_ send the patch to the dejagnu external maintainer. Fernando > > Hi. > > > > I had a bug in the fini code in the newlib port of > > mmix-knuth-mmixware (film at 11) which exposed this dejagnu > > fault: a target using a wrapper gets a PASS if the "*** EXIT > > code ..." pattern isn't output. IIRC, at the time I tested > > this on other simulator targets, that fault exposed two other > > gcc testsuite failures on some other target. I can't remember > > which; it might have been d30v or mn10300. > > > > Please consider applying this. Please make sure to CC me on > > follow-ups as I'm not subscribed to these lists. > > > > 2001-11-10 Hans-Peter Nilsson <hp@bitrange.com> > > > > * lib/remote.exp (check_for_board_status): Return 2 if the board > > uses a status wrapper and there was no match for the expected > > pattern. > > > > Index: remote.exp > > =================================================================== > > RCS file: /cvsroot/dejagnu/dejagnu/lib/remote.exp,v > > retrieving revision 1.4 > > diff -p -c -r1.4 remote.exp > > *** remote.exp 2001/10/02 15:48:51 1.4 > > --- remote.exp 2001/11/10 15:59:40 > > *************** proc standard_wait { dest timeout } { > > *** 1050,1055 **** > > --- 1050,1065 ---- > > proc check_for_board_status { variable } { > > upvar $variable output; > > > > + # If all programs of this board have a wrapper that always outputs a > > + # status message, then the absence of it means that the program > > + # crashed, regardless of status found elsewhere (e.g. simulator exit > > + # code). > > + if { [target_info needs_status_wrapper] != "" } then { > > + set nomatch_return 2 > > + } else { > > + set nomatch_return -1 > > + } > > + > > if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { > > regsub "^.*\\*\\*\\* EXIT code " $output "" result; > > regsub "\[\r\n\].*$" $result "" result; > > *************** proc check_for_board_status { variable > > *** 1059,1070 **** > > verbose "got board status $result" 3 > > verbose "output is $output" 3 > > if { $result == "" } { > > ! return -1; > > } else { > > return [expr $result]; > > } > > } else { > > ! return -1; > > } > > } > > > > --- 1069,1080 ---- > > verbose "got board status $result" 3 > > verbose "output is $output" 3 > > if { $result == "" } { > > ! return $nomatch_return > > } else { > > return [expr $result]; > > } > > } else { > > ! return $nomatch_return > > } > > } > > > > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remote.exp: fail properly if wrapper status message isn't found 2002-01-21 8:42 ` Fernando Nasser @ 2002-01-21 8:48 ` Andrew Cagney 0 siblings, 0 replies; 3+ messages in thread From: Andrew Cagney @ 2002-01-21 8:48 UTC (permalink / raw) To: Fernando Nasser; +Cc: Hans-Peter Nilsson, gdb-patches > Andrew Cagney wrote: > >> >> Should this be committed to the src/dejagnu source base (regardless of dejagnu)? >> >> Andrew >> > > > We'd normally do that _and_ send the patch to the dejagnu external > maintainer. Just FYI, Hans-Peter's original post went to both lists. Andrew ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-21 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.BSF.4.30.0111101120000.83243-100000@dair.pair.com>
2002-01-20 17:10 ` remote.exp: fail properly if wrapper status message isn't found Andrew Cagney
2002-01-21 8:42 ` Fernando Nasser
2002-01-21 8:48 ` Andrew Cagney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox