This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Adjust one timing-out java test


I fixed all the other Java tests to work with gcj's new mangling,
which includes method signatures, a couple months ago.  I missed this
one since it was XFAILed, though; I noticed it today while searching
for timeouts in gdb.sum.

Tested on x86_64-linux and committed.

-- 
Daniel Jacobowitz
CodeSourcery

2007-04-29  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.java/jmain.exp: Handle demangled names with and without method
	signatures.

Index: gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.5
diff -u -p -r1.5 jmain.exp
--- gdb.java/jmain.exp	12 Jan 2007 11:36:20 -0000	1.5
+++ gdb.java/jmain.exp	29 Apr 2007 17:13:10 -0000
@@ -50,18 +50,46 @@ gdb_test "set print sevenbit-strings" ".
 
 set bpmain "Breakpoint .* file .*jmain.java, line 5\."
 
+# Where GCC PR 16439 puts the breakpoint.
+set earlybpmain "Breakpoint .* file .*jmain.java, line 4\."
+
 gdb_load "${binfile}"
 setup_kfail *-*-* java/1567
 gdb_test "break main" "${bpmain}"
 
 # Check that an unqualified "main" works.
 
-
 gdb_load "${binfile}"
 setup_kfail *-*-* java/1565
 gdb_test "break jmain.main" "${bpmain}"
 
 # Check that a fully qualified "main" works.
 gdb_load "${binfile}"
-setup_xfail *-*-* gcc/16439
-gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"
+set cmd "break \'${testfile}.main(java.lang.String\[\])\'"
+set msg $cmd
+gdb_test_multiple $cmd $msg {
+    -re "${bpmain}\r\n$gdb_prompt $" {
+	pass $msg
+    }
+    -re "${earlybpmain}\r\n$gdb_prompt $" {
+	setup_xfail *-*-* gcc/16439
+	fail $msg
+    }
+    -re "Make breakpoint pending.* \\(y or \\\[n\\\]\\) $" {
+	gdb_test "n" "" ""
+
+	# Check again with a method signature at the end.
+	set cmd "break \'${testfile}.main(java.lang.String\[\])void\'"
+	set msg $cmd
+	gdb_test_multiple $cmd $msg {
+	    -re "${bpmain}\r\n$gdb_prompt $" {
+		pass $msg
+	    }
+	    -re "${earlybpmain}\r\n$gdb_prompt $" {
+		setup_xfail *-*-* gcc/16439
+		fail $msg
+	    }
+	}
+    }
+}
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]