[PATCH] Fix some Java test case problems

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Thu Dec 4 20:11:00 GMT 2003


Hello,

various Java test cases were failing due to what appears to
be incorrect names in the test case.

jmisc.exp, jmisc1.exp, and jmisc2.exp all expect the class
constructor to be have the signature
  void <init>(void)
while it is actually being reported as
  void jmisc()

This may be related to demangler changes ...

Similarly, jmisc.exp fails because it does 'runto main',
instead of 'runto main(java.lang.String[])' as jmisc1.exp
and jmisc2.exp do.

As these look like testcase bugs to me, I've simply updated
the test cases accordingly.

Tested on s390-ibm-linux and s390x-ibm-linux with no new regressions.
Fixes 6 test failures on both platforms.

Bye,
Ulrich


testsuite/ChangeLog:

	* gdb.java/jmisc.exp: Adapt to changed constructor name.
	* gdb.java/jmisc1.exp: Likewise.
	* gdb.java/jmisc2.exp: Likewise.


diff -c -p -r gdb-head/gdb/testsuite/gdb.java/jmisc.exp gdb-head-new/gdb/testsuite/gdb.java/jmisc.exp
*** gdb-head/gdb/testsuite/gdb.java/jmisc.exp	Thu Dec  4 19:54:17 2003
--- gdb-head-new/gdb/testsuite/gdb.java/jmisc.exp	Thu Dec  4 19:55:25 2003
*************** gdb_reinitialize_dir $srcdir/$subdir
*** 66,76 ****
  gdb_test "set print sevenbit-strings" ".*"
  
  if ![set_lang_java] then {
!     runto ${testfile}.main
  
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
--- 66,76 ----
  gdb_test "set print sevenbit-strings" ".*"
  
  if ![set_lang_java] then {
!     runto ${testfile}.main(java.lang.String\[\])
  
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
diff -c -p -r gdb-head/gdb/testsuite/gdb.java/jmisc1.exp gdb-head-new/gdb/testsuite/gdb.java/jmisc1.exp
*** gdb-head/gdb/testsuite/gdb.java/jmisc1.exp	Thu Dec  4 19:54:17 2003
--- gdb-head-new/gdb/testsuite/gdb.java/jmisc1.exp	Thu Dec  4 19:55:41 2003
*************** if ![set_lang_java] then {
*** 70,76 ****
  
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
--- 70,76 ----
  
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
diff -c -p -r gdb-head/gdb/testsuite/gdb.java/jmisc2.exp gdb-head-new/gdb/testsuite/gdb.java/jmisc2.exp
*** gdb-head/gdb/testsuite/gdb.java/jmisc2.exp	Thu Dec  4 19:54:17 2003
--- gdb-head-new/gdb/testsuite/gdb.java/jmisc2.exp	Thu Dec  4 19:55:52 2003
*************** gdb_test "set print sevenbit-strings" ".
*** 68,74 ****
  if ![set_lang_java] then {
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
--- 68,74 ----
  if ![set_lang_java] then {
      send_gdb "ptype jmisc\n"   
      gdb_expect {   
! 	-re "type = class jmisc  extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $"               { pass "ptype jmisc" }
  	-re ".*$gdb_prompt $"             { fail "ptype jmisc" }
  	timeout { fail "ptype jmisc (timeout)" ; return }
      }
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gdb-patches mailing list