-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta2
-
generic
-
generic
-
Verified
Name: dkR10014 Date: 03/15/2001
The merlin HS VM fails to pass the following test from testbase_nsk:
nsk/jdi/MethodExitEvent/_itself_/methodexit001
The JDK1.3 spec for MethodExitEvent interface of com.sun.jdi.event package
reads:
"Method exit events are not generated if the method terminates with a thrown
exception."
The test checks the following assertions:
- MethodExitEvent is not received by debugger if the method terminated
with thrown exception in debugged VM.
The test works as follows.
A debugger class - nsk.jdi.MethodExitEvent._itself_.methodexit001 ;
a debuggee class - nsk.jdi.MethodExitEvent._itself_.methodexit001a .
The test uses supporting nsk/jdi/share classes for launching debuggee
and for creating communication pipe between debugger and debuggee. The
debugger and debugee communicates with special commands.
The debugger launches and connects to debuggee using the default launching
connector. The debugger creates MethodExitRequest filtered to
<methodexit001a> class. The debugger starts <EventHandler> thread for
listening events delivered from debuggee.
Upon receiving <GO> command from debugger, the debuggee invokes <run()>
method. This method throws user-defined uncatched exception
<methodexit001e>.
The debugger switches <EventHandler> the to listen the event during the time
specified by <waittime> parameter. Then debugger shuts down debuggee by
<QUIT> command.
The test fails if debugger receives MethodExitEvent which has reference
to <run()> method. The test passes if such MethodExitEvent is not received.
Below is code fragment of the debuggee:
---------------------------------------------------------------
public class methodexit001a {
....
public static void main(String args[]) {
.....
try {
run();
System.err.println("TEST BUG: method <run> does not terminated with exception");
} catch (methodexit001e e) {
System.out.println("Method <run> terminated with exception");
}
....
System.exit(JCK_STATUS_BASE + PASSED);
}
static void run() throws methodexit001e {
throw new methodexit001e();
}
}
class methodexit001e extends Exception {}
--------------------------------------------------------------
Below is error message in the test execution output:
--------------------------------------------------------------
Getting loaded class in debuggee
Getting reference to method 'run'
Creating MethodExitRequest
MethodExitRequest is created
Starting eventHandler
Sending command: go
FAILURE 1: MethodExitEvent is received for method run at location 52
Sending command: quit
debugee.out> Method <run> terminated with exception
eventHandler completed
Waiting for debuggee terminating
--------------------------------------------------------------
The failures of this test are observed for HS (Client and Server)
merlin-beta-b55 on following H/S configurations:
- P-II 350MHz, 128Mb RAM, Win NT 4.0 SP6
- dual P-III 600MHz, 512Mb RAM, Linux Red Hat 6.2
- dual P-III 600MHz, 512Mb RAM, Solaris 8 for x86
- ULTRA 60 UltraSparc 450 MHz, 512 RAM, Solaris sparc 8
But the test passes on ladybird-rc1-b19 on the same configurations.
The test will appear in the next testbase_nsk release r03 located at:
/net/sqesvr.eng/export/vsn/VM/testbase/testbase_nsk
Steps to reproduce:
1. cd /net/sqesvr.eng/export/vsn/GammaBase/Bugs/<this bug number>
2. sh ./doit.ksh $JAVA_HOME
Input parameter -waittime of nsk.jdi.MethodExitEvent._itself_.methodexit001
specifies timeout in minutes for test execution.
======================================================================