[rfa/testsuite/objc] nondebug.exp: add a kfail and clean-up

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


I have some problems with the new gdb.objc/nondebug.exp.  I was too busy
to review it before it went in so now it's more work for everybody.
My apologies to Adam.

The big problem is that gdb HEAD currently prints:

  (gdb) break someMethod
  [0] cancel
  [1] all
  >

But there is no pattern for this case.  So the test script just hangs
until the timeout.

I fixed this by adding a pattern and KFAIL'ing it to gdb/1236.
Indeed, gdb/1236 says that current gdb's will print "cancel/all"
and that's it.

I also cleaned up some of the other regular expressions:

  . replaced ".*" with "\r\n" in some places
  . terminated an r.e. with "$gdb_prompt$ "
  . removed the "timeout" case, because gdb_test_multiple
    already handles timeouts.

Testing: the usual, native i686-pc-linux-gnu, gcc v2 and v3, dwarf-2 and
stabs+.  All configurations hit the new KFAIL.

Okay to commit?

Michael C

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

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

Index: nondebug.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.objc/nondebug.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 nondebug.exp
*** nondebug.exp	26 Nov 2003 04:21:51 -0000	1.1
--- nondebug.exp	28 Nov 2003 16:44:22 -0000
*************** do_objc_tests
*** 63,74 ****
  set name "break on non-debuggable method"
  gdb_test_multiple "break someMethod" $name \
  {
!     -re "\\\[0\\\] cancel.*\\\[1\\\] all.*\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
  	send_gdb "2\n"
  	exp_continue
      }
!     -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*" { pass $name }
      -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
-     timeout                 { fail "$name (timeout)" }
  }
  
--- 63,77 ----
  set name "break on non-debuggable method"
  gdb_test_multiple "break someMethod" $name \
  {
!     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
  	send_gdb "2\n"
  	exp_continue
      }
!     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n> " {
! 	gdb_test "0" "" ""
! 	kfail "gdb/1236" $name
!     }
!     -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*$gdb_prompt $" { pass $name }
      -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
  }
  



More information about the Gdb-patches mailing list