[rfc/testsuite/objc] objcdecode.exp: fix and clean up

Michael Elizabeth Chastain mec.gnu@mindspring.com
Fri Nov 28 17:30:00 GMT 2003


This is a similar fix-and-cleanup patch for gdb.objc/objcdecode.exp.

Again, this cleans up the regular expressions and adds an explicit
test for the output that I'm currently getting from gdb HEAD.

The big problem here was:

  -re "\\\[0\\\] cancel.*\\\[1\\\] all.*\\\[2\\\] -.Decode multipleDef. at .*\\\[3\\\] multipleDef at .*"

Because this ends in a ".*" instead of an anchor character,
"expect" will consume a non-deterministic amount of input.
This causes non-deterministic de-synchronized results for the
next test.

Testing: native i686-pc-linux-gnu, gcc v2 and v3, dwarf-2 and stabs+.

Okay to commit?

Michael C

2003-11-28  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.objc/objcdecode.exp: Match and KFAIL the output that comes
	from current versions of gdb.  Clean up regular expressions.
	Delete redundant timeout case.

Index: objcdecode.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.objc/objcdecode.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 objcdecode.exp
*** objcdecode.exp	26 Nov 2003 04:23:25 -0000	1.1
--- objcdecode.exp	28 Nov 2003 17:24:55 -0000
*************** do_objc_tests
*** 63,77 ****
  set name "break on multiply defined method"
  gdb_test_multiple "break multipleDef" $name \
  {
!     -re "\\\[0\\\] cancel.*\\\[1\\\] all.*\\\[2\\\] -.Decode multipleDef. at .*\\\[3\\\] multipleDef at .*" {
  	send_gdb "3\n"
  	exp_continue
      }
!     -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file *" { pass $name }
      -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
-     timeout                 { fail "$name (timeout)" }
  }
  
! gdb_test "run" \
!     "Starting program.*Breakpoint \[0-9\]+, multipleDef \\\(\\\) at .*" \
!     "continue after break on multiply defined symbol"
--- 63,86 ----
  set name "break on multiply defined method"
  gdb_test_multiple "break multipleDef" $name \
  {
!     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] -.Decode multipleDef. at .*\r\n\\\[3\\\] multipleDef at .*\r\n> $" {
  	send_gdb "3\n"
  	exp_continue
      }
!     -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*\r\n$gdb_prompt $" { pass $name }
      -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
  }
  
! set name "continue after break on multiply defined symbol"
! gdb_test_multiple "run" $name \
! {
!     -re "Starting program.*Breakpoint \[0-9\]+, multipleDef \\\(\\\) at .*\r\n$gdb_prompt $" {
! 	pass $name
!     }
!     -re "Starting program.*\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] -.Decode multipleDef. at .*\r\n\\\[3\\\] multipleDef at .*\r\n> $" {
! 	send_gdb "0\n"
! 	kfail "gdb/1238" $name
! 	# gdb is in a bad state here.
! 	# It would be difficult to do any more tests after this.
!     }
! }



More information about the Gdb-patches mailing list