Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix some Java test case problems
@ 2003-12-04 20:11 Ulrich Weigand
  2003-12-04 20:28 ` David Carlton
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Weigand @ 2003-12-04 20:11 UTC (permalink / raw)
  To: gdb-patches; +Cc: uweigand

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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [PATCH] Fix some Java test case problems
@ 2003-12-04 21:48 Michael Elizabeth Chastain
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-04 21:48 UTC (permalink / raw)
  To: gdb-patches, weigand; +Cc: uweigand

Hi Ulrich,

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

Right, there is a bit of a mess there.

The old tests were written to accommodate the behavior of the demangler
at the time.  The demangler has been rewritten, and is still up in the
air.  In fact some more demangler fixes were checked in today.

First could you check that you have a very current copy of libiberty,
particularly libiberty/cp-demangle.c.

Then, instead of a patch, file a gdb PR.  Throw in the URL of your
post to gdb-patches if you want.

Then when the demangler settles down, and I get some time,
I will overhaul the tests.

Michael C


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-04 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04 20:11 [PATCH] Fix some Java test case problems Ulrich Weigand
2003-12-04 20:28 ` David Carlton
2003-12-04 21:40   ` Ulrich Weigand
2003-12-04 21:48 Michael Elizabeth Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox