Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/request/request001.java
41161 views
/*1* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package nsk.jdi.Event.request;2425import nsk.share.*;26import nsk.share.jdi.*;2728import com.sun.jdi.*;29import com.sun.jdi.event.*;30import com.sun.jdi.request.*;3132import java.util.*;33import java.io.*;3435/**36* The test for the implementation of an object of the type <BR>37* Event. <BR>38* <BR>39* The test checks that results of the method <BR>40* <code>com.sun.jdi.Event.request()</code> <BR>41* complies with its spec. <BR>42* <BR>43* The test checks that for all Event objects, <BR>44* except for ClassUnloadEvent, the method returns <BR>45* either the EventRequest that requested this event <BR>46* or null if event does not have a corresponding request. <BR>47* <BR>48* The test has three phases and works as follows. <BR>49* <BR>50* In first phase, <BR>51* upon launching debuggee's VM which will be suspended, <BR>52* a debugger waits for the VMStartEvent within a predefined <BR>53* time interval. If no the VMStartEvent received, the test is FAILED. <BR>54* Upon getting the VMStartEvent, it saves its EventSet into <BR>55* a special array and makes the request for debuggee's <BR>56* ClassPrepareEvent with SUSPEND_EVENT_THREAD, resumes the VM, <BR>57* and waits for the event within the predefined time interval. <BR>58* If no the ClassPrepareEvent received, the test is FAILED. <BR>59* Upon getting the ClassPrepareEvent, <BR>60* the debugger saves its EVENTSet into the array and <BR>61* sets up the breakpoint with SUSPEND_EVENT_THREAD <BR>62* within debuggee's special methodForCommunication(). <BR>63* <BR>64* In second phase the debugger and the debuggee perform the following. <BR>65* - The debugger creates ThreadStartRequest, ThreadDeathRequest, and <BR>66* an extra VMDeathRequest, resumes the debuggee, and <BR>67* waits for corresponding ThreadStartEvent and ThreadDeathEvent. <BR>68* - The debuggee creates new thread, named "thread2", <BR>69* whose running creates the above events. <BR>70* - Upon getting the events, the debugger saves their sets in the array,<BR>71* resumes the debuggee and waits for the BreakpointEvent. <BR>72* - The debuggee creates a number of threads, one for each <BR>73* following event: AccessWatchpoint, ModificationWatchpoint, <BR>74* MethodEntry, MethodExit, Step, Exception, and Breakpoint, <BR>75* and invokes the methodForCommunication to be suspended and <BR>76* to inform the debugger with the event. <BR>77* - Upon getting the BreakpointForCommunication, the debugger <BR>78* gets ThreadReferences mirroring all tested threads in the debuggee,<BR>79* sets up Requests within them to get EventSETS to check up on, <BR>80* resumes the debuggee, waits for events, and upon getting them, <BR>81* saves its EventSets into the array. <BR>82* <BR>83* In third phase,at the end <BR>84* the debuggee changes the value of the "instruction" <BR>85* to inform the debugger of checks finished, and ends. <BR>86* The debugger waits for VMDeathEvents and VMDisconnectEvents, and <BR>87* upon getting them, saves their EventSets into the array. <BR>88* Finally, the debugger, using the array of EventSets, <BR>89* compares Requests from Events to ones set up. <BR>90* If any mismatch, the test FAILED. <BR>91* <BR>92* Note. To inform each other of needed actions, the debugger and <BR>93* and the debuggee use debuggee's variable "instruction". <BR>94* <BR>95*/9697public class request001 extends JDIBase {9899public static void main (String argv[]) {100101int result = run(argv, System.out);102103System.exit(result + PASS_BASE);104}105106public static int run (String argv[], PrintStream out) {107108int exitCode = new request001().runThis(argv, out);109110if (exitCode != PASSED) {111System.out.println("TEST FAILED");112}113return testExitCode;114}115116// ************************************************ test parameters117118private String debuggeeName =119"nsk.jdi.Event.request.request001a";120121private String testedClassName =122"nsk.jdi.Event.request.TestClass";123124//====================================================== test program125126// Event #:127// 0-6 : AccessWatchpoint, ModificationWatchpoint, Breakpoint, Exception,128// MethodEntry, MethodExit, Step129// 7-8 : ClassPrepare, ClassUnload130// 9-10 : ThreadDeath, ThreadStart131// 11-13 : VMDeath, VMDisconnect, VMStart132133EventSet eventSets[] = new EventSet [14];134EventRequest eRequests[] = new EventRequest[14];135136int eventFlags[] = { 0,0,0,0, 0,0,0,0, 3,0,0,0, 1,1 };137138//------------------------------------------------------ methods139140private int runThis (String argv[], PrintStream out) {141142argsHandler = new ArgumentHandler(argv);143logHandler = new Log(out, argsHandler);144Binder binder = new Binder(argsHandler, logHandler);145146waitTime = argsHandler.getWaitTime() * 60000;147148try {149log2("launching a debuggee :");150log2(" " + debuggeeName);151if (argsHandler.verbose()) {152debuggee = binder.bindToDebugeeNoWait(debuggeeName + " -vbs");153} else {154debuggee = binder.bindToDebugeeNoWait(debuggeeName);155}156if (debuggee == null) {157log3("ERROR: no debuggee launched");158return FAILED;159}160log2("debuggee launched");161} catch ( Exception e ) {162log3("ERROR: Exception : " + e);163log2(" test cancelled");164return FAILED;165}166167debuggee.redirectOutput(logHandler);168169vm = debuggee.VM();170171eventQueue = vm.eventQueue();172if (eventQueue == null) {173log3("ERROR: eventQueue == null : TEST ABORTED");174vm.exit(PASS_BASE);175return FAILED;176}177178log2("invocation of the method runTest()");179switch (runTest()) {180181case 0 : log2("test phase has finished normally");182log2(" waiting for the debuggee to finish ...");183debuggee.waitFor();184185log2("......getting the debuggee's exit status");186int status = debuggee.getStatus();187if (status != PASS_BASE) {188log3("ERROR: debuggee returned UNEXPECTED exit status: " +189status + " != PASS_BASE");190testExitCode = FAILED;191} else {192log2("......debuggee returned expected exit status: " +193status + " == PASS_BASE");194}195break;196197default : log3("ERROR: runTest() returned unexpected value");198199case 1 : log3("test phase has not finished normally: debuggee is still alive");200log2("......forcing: vm.exit();");201testExitCode = FAILED;202try {203vm.exit(PASS_BASE);204} catch ( Exception e ) {205log3("ERROR: Exception : e");206}207break;208209case 2 : log3("test cancelled due to VMDisconnectedException");210log2("......trying: vm.process().destroy();");211testExitCode = FAILED;212try {213Process vmProcess = vm.process();214if (vmProcess != null) {215vmProcess.destroy();216}217} catch ( Exception e ) {218log3("ERROR: Exception : e");219}220break;221}222223return testExitCode;224}225226227/*228* Return value: 0 - normal end of the test229* 1 - ubnormal end of the test230* 2 - VMDisconnectedException while test phase231*/232233private int runTest() {234235try {236log2("waiting for VMStartEvent");237getEventSet();238//239eventSets[13] = eventSet;240if (eventIterator.nextEvent() instanceof VMStartEvent) {241log2("VMStartEvent received; test begins");242243testRun();244245log2("waiting for VMDeathEvent");246getEventSet();247eventSets[11] = eventSet;248if ( !(eventIterator.nextEvent() instanceof VMDeathEvent) ) {249log3("ERROR: last event is not the VMDeathEvent");250return 1;251}252253log2("waiting for VMDisconnectEvent");254getEventSet();255//256eventSets[12] = eventSet;257if ( !(eventIterator.nextEvent() instanceof VMDisconnectEvent) ) {258log3("ERROR: last event is not the VMDisconnectEvent");259return 1;260}261262check();263return 0;264} else {265log3("ERROR: first event is not the VMStartEvent");266return 1;267}268} catch ( VMDisconnectedException e ) {269log3("ERROR: VMDisconnectedException : " + e);270return 2;271} catch ( Exception e ) {272log3("ERROR: Exception : " + e);273return 1;274}275276}277278private void testRun()279throws JDITestRuntimeException, Exception {280281eventRManager = vm.eventRequestManager();282283ClassPrepareRequest cpRequest = eventRManager.createClassPrepareRequest();284cpRequest.setSuspendPolicy( EventRequest.SUSPEND_EVENT_THREAD);285cpRequest.addClassFilter(debuggeeName);286287log2("......setting up ClassPrepareRequest");288eRequests[7] = cpRequest;289290cpRequest.enable();291vm.resume();292293getEventSet();294eventSets[7] = eventSet;295296cpRequest.disable();297298ClassPrepareEvent event = (ClassPrepareEvent) eventIterator.next();299debuggeeClass = event.referenceType();300301if (!debuggeeClass.name().equals(debuggeeName))302throw new JDITestRuntimeException("** Unexpected ClassName for ClassPrepareEvent **");303304log2(" received: ClassPrepareEvent for debuggeeClass");305306log2("......setting up ClassPrepareEvent");307308String bPointMethod = "methodForCommunication";309String lineForComm = "lineForComm";310BreakpointRequest bpRequest;311312ThreadReference mainThread = debuggee.threadByNameOrThrow("main");313314bpRequest = settingBreakpoint(mainThread,315debuggeeClass,316bPointMethod, lineForComm, "zero");317bpRequest.enable();318319//------------------------------------------------------ testing section320321log1(" TESTING BEGINS");322323{324log2("...... setting up VMDeathRequest");325if (vm.canRequestVMDeathEvent()) {326VMDeathRequest vmdr = eventRManager.createVMDeathRequest();327vmdr.putProperty("number", "VMDeathRequest");328vmdr.setSuspendPolicy(EventRequest.SUSPEND_NONE);329vmdr.enable();330eRequests[11] = vmdr;331} else {332eventFlags[11] = 2;333}334335log2("......setting up ThreadStartRequest");336ThreadStartRequest tsr = eventRManager.createThreadStartRequest();337tsr.addCountFilter(1);338tsr.setSuspendPolicy(EventRequest.SUSPEND_ALL);339tsr.putProperty("number", "ThreadStartRequest");340tsr.enable();341342eRequests[10] = tsr;343344log2("......setting up ThreadDeathRequest");345ThreadDeathRequest tdr = eventRManager.createThreadDeathRequest();346tdr.addCountFilter(1);347tdr.setSuspendPolicy(EventRequest.SUSPEND_ALL);348tsr.putProperty("number", "ThreadDeathRequest");349tdr.enable();350351eRequests[9] = tdr;352353log2("......vm.resume();");354vm.resume();355356log2("......waiting for ThreadStartEvent");357getEventSetForThreadStartDeath("thread2");358eventSets[10] = eventSet;359360Event receivedEvent = eventIterator.nextEvent();361if ( !(receivedEvent instanceof ThreadStartEvent) ) {362testExitCode = FAILED;363log3("ERROR: new event is not ThreadStartEvent: " + receivedEvent);364return;365}366tsr.disable();367368log2("......vm.resume();");369vm.resume();370371log2("......waiting for ThreadDeathEvent");372getEventSetForThreadStartDeath("thread2");373eventSets[9] = eventSet;374receivedEvent = eventIterator.nextEvent();375if ( !(receivedEvent instanceof ThreadDeathEvent) ) {376testExitCode = FAILED;377log3("ERROR: new event is not ThreadDeathEvent: " + receivedEvent);378return;379}380tdr.disable();381}382383for (int i = 0; ; i++) {384385vm.resume();386breakpointForCommunication();387388int instruction = ((IntegerValue)389(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();390391if (instruction == 0) {392vm.resume();393break;394}395396log1(":::::: case: # " + i);397398//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ variable part399400String bpLineName = "breakpointLine";401String bpMethodName = "method";402String awFieldName = "awFieldName";403String mwFieldName = "mwFieldName";404405String namesArray = "threadNames";406407String threadNames[] = {408"awThread" ,409"mwThread" ,410"bpThread" ,411"excThread" ,412"menThread" ,413"mexThread" ,414"stThread"415};416417int flags = 0;418419ThreadReference eventThreads[] = new ThreadReference[threadNames.length];420421422List allThreads = vm.allThreads();423424log2("......getting: ArrayReference namesRef = (ArrayReference) debuggeeClass.getValue(debuggeeClass.fieldByName(namesArray));");425ArrayReference namesRef = (ArrayReference)426debuggeeClass.getValue(debuggeeClass.fieldByName(namesArray));427log2(" namesRef.length() == " + namesRef.length());428429log2("......getting and checking up on debuggee threads' names");430for (int n1 = 0; n1 < namesRef.length(); n1++) {431432log2(" String name = ((StringReference) namesRef.getValue(n1)).value();");433String name = ((StringReference) namesRef.getValue(n1)).value();434435label0: {436for (int n2 = 0; n2 < threadNames.length; n2++) {437438if (name.equals(threadNames[n2])) {439ListIterator li = allThreads.listIterator();440for (; li.hasNext(); ) {441ThreadReference thread = (ThreadReference) li.next();442if (thread.name().equals(name)) {443eventThreads[n1] = thread;444break;445}446}447break label0;448}449}450testExitCode = FAILED;451log3("ERROR: no thread found in the debuggee : " + name);452}453}454if (testExitCode == FAILED)455break;456457458log2("......ReferenceType testClass = (ReferenceType) (vm.classesByName(testedClassName)).get(0);");459ReferenceType testClass = (ReferenceType) (vm.classesByName(testedClassName)).get(0);460461log2("......setting up Requests");462for ( int n3 = 0; n3 < namesRef.length(); n3++) {463switch (n3) {464case 0:465if (vm.canWatchFieldAccess()) {466String awName = ( (StringReference) testClass.getValue(467testClass.fieldByName(awFieldName))).value();468eRequests[n3] = settingAccessWatchpoint(eventThreads[n3],469testClass, awName, threadNames[n3]);470eRequests[n3].enable();471flags |= 1;472}473break;474475case 1:476if (vm.canWatchFieldModification() ) {477String mwName = ( (StringReference) testClass.getValue(478testClass.fieldByName(mwFieldName))).value();479eRequests[n3] = settingModificationWatchpoint(eventThreads[n3],480testClass, mwName, threadNames[n3]);481eRequests[n3].enable();482flags |= 1<<1;483}484break;485486case 2:487eRequests[n3] = settingBreakpoint(eventThreads[n3], testClass,488bpMethodName, bpLineName, threadNames[n3]);489eRequests[n3].setSuspendPolicy( EventRequest.SUSPEND_NONE);490eRequests[n3].enable();491flags |= 1<<2;492break;493494case 3:495eRequests[n3] = settingException(eventThreads[n3], debuggeeClass,496threadNames[n3]);497eRequests[n3].enable();498flags |= 1<<3;499break;500501case 4:502eRequests[n3] = settingMethodEntry(eventThreads[n3], testClass,503threadNames[n3]);504eRequests[n3].enable();505flags |= 1<<4;506break;507508case 5:509eRequests[n3] = settingMethodExit(eventThreads[n3], testClass,510threadNames[n3]);511eRequests[n3].enable();512flags |= 1<<5;513break;514515case 6:516eRequests[n3] = settingStep(eventThreads[n3], threadNames[n3]);517eRequests[n3].enable();518flags |= 1<<6;519break;520521default:522throw new JDITestRuntimeException("** default case while prepareing requests**");523}524}525526log2(":::::::::vm.resume();");527vm.resume();528529Event event1 = null;530int flagsCopy = flags;531String eName = null;532int index = 0;533534log2("......getting and checking up on Events");535for (int n4 = 0; n4 < namesRef.length(); n4++) {536int flag;537538getEventSet();539event1 = eventIterator.nextEvent();540541if (event1 instanceof AccessWatchpointEvent) {542index = 0;543} else if (event1 instanceof ModificationWatchpointEvent ) {544index = 1;545} else if (event1 instanceof BreakpointEvent ) {546index = 2;547} else if (event1 instanceof ExceptionEvent ) {548index = 3;549} else if (event1 instanceof MethodEntryEvent ) {550index = 4;551} else if (event1 instanceof MethodExitEvent ) {552index = 5;553} else if (event1 instanceof StepEvent ) {554index = 6;555} else {556log3("ERROR: else clause in detecting type of event1");557testExitCode = FAILED;558}559560flag = 1 << index;561if ((flagsCopy & flag) == 0) {562log3("ERROR: event duplication: " + eName);563testExitCode = FAILED;564} else {565flagsCopy ^= flag;566flags |= flag;567}568569eventSets[index] = eventSet;570}571572if (testExitCode == FAILED)573break;574575breakpointForCommunication();576577//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~578}579log1(" TESTING ENDS");580return;581}582583// ============================== test's additional methods584585private AccessWatchpointRequest settingAccessWatchpoint (586ThreadReference thread,587ReferenceType testedClass,588String fieldName,589String property)590throws JDITestRuntimeException {591592log2("......setting up AccessWatchpoint:");593log2(" thread: " + thread + "; class: " + testedClass +594"; fieldName: " + fieldName);595596AccessWatchpointRequest awRequest = null;597try {598Field field = testedClass.fieldByName(fieldName);599awRequest = eventRManager.createAccessWatchpointRequest(field);600awRequest.putProperty("number", property);601awRequest.addThreadFilter(thread);602awRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);603} catch ( Exception e ) {604log3("ERROR: ATTENTION: Exception within settingAccessWatchpoint() : " + e);605log3(" AN ACCESSWATCHPOINT HAS NOT BEEN SET UP");606throw new JDITestRuntimeException("** FAILURE to set up an AccessWatchpoint **");607}608609log2(" an AccessWatchpoint has been set up");610return awRequest;611}612613private ModificationWatchpointRequest settingModificationWatchpoint (614ThreadReference thread,615ReferenceType testedClass,616String fieldName,617String property)618throws JDITestRuntimeException {619620log2("......setting up ModificationWatchpoint:");621log2(" thread: " + thread + "; class: " + testedClass +622"; fieldName: " + fieldName);623624ModificationWatchpointRequest mwRequest = null;625try {626Field field = testedClass.fieldByName(fieldName);627mwRequest = eventRManager.createModificationWatchpointRequest(field);628mwRequest.putProperty("number", property);629mwRequest.addThreadFilter(thread);630mwRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);631} catch ( Exception e ) {632log3("ERROR: ATTENTION: Exception within settingModificationWatchpoint() : " + e);633log3(" AN ModificationWATCHPOINT HAS NOT BEEN SET UP");634throw new JDITestRuntimeException("** FAILURE to set up an AccessWatchpoint **");635}636637log2(" a ModificationWatchpoint has been set up");638return mwRequest;639}640641private MethodEntryRequest settingMethodEntry ( ThreadReference thread,642ReferenceType testedClass,643String property)644throws JDITestRuntimeException {645646log2("......setting up MethodEntry:");647log2(" thread: " + thread + "; class: " + testedClass +648"; property: " + property);649650MethodEntryRequest menRequest = null;651try {652menRequest = eventRManager.createMethodEntryRequest();653menRequest.putProperty("number", property);654menRequest.addThreadFilter(thread);655menRequest.addClassFilter(testedClass);656menRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);657} catch ( Exception e ) {658log3("ERROR: ATTENTION: Exception within settingMethodEntry() : " + e);659log3(" A MethodEntry HAS NOT BEEN SET UP");660throw new JDITestRuntimeException("** FAILURE to set up a MethodEntry **");661}662663log2(" a MethodEntry has been set up");664return menRequest;665}666667private MethodExitRequest settingMethodExit ( ThreadReference thread,668ReferenceType testedClass,669String property)670throws JDITestRuntimeException {671672log2("......setting up MethodExit:");673log2(" thread: " + thread + "; class: " + testedClass +674"; property: " + property);675676MethodExitRequest mexRequest = null;677try {678mexRequest = eventRManager.createMethodExitRequest();679mexRequest.putProperty("number", property);680mexRequest.addThreadFilter(thread);681mexRequest.addClassFilter(testedClass);682mexRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);683} catch ( Exception e ) {684log3("ERROR: ATTENTION: Exception within settingMethodExit() : " + e);685log3(" A MethodExit HAS NOT BEEN SET UP");686throw new JDITestRuntimeException("** FAILURE to set up a MethodExit **");687}688689log2(" a MethodExit has been set up");690return mexRequest;691}692693private StepRequest settingStep ( ThreadReference thread, String property)694throws JDITestRuntimeException {695696log2("......setting up Step:");697log2(" thread: " + thread + "; property: " + property);698699StepRequest stRequest = null;700try {701stRequest = eventRManager.createStepRequest(thread, StepRequest.STEP_LINE, StepRequest.STEP_OVER);702stRequest.putProperty("number", property);703stRequest.addCountFilter(1);704stRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);705} catch ( Exception e ) {706log3("ERROR: ATTENTION: Exception within settingStep() : " + e);707log3(" A Step HAS NOT BEEN SET UP");708throw new JDITestRuntimeException("** FAILURE to set up a Step **");709}710711log2(" a Step has been set up");712return stRequest;713}714715716private ExceptionRequest settingException ( ThreadReference thread,717ReferenceType testedClass,718String property)719throws JDITestRuntimeException {720721log2("......setting up Exception:");722log2(" thread: " + thread + "; class: " + testedClass +723"; property: " + property);724725ExceptionRequest excRequest = null;726try {727excRequest = eventRManager.createExceptionRequest(null, true, true);728excRequest.putProperty("number", property);729excRequest.addThreadFilter(thread);730excRequest.addClassFilter(testedClass);731excRequest.setSuspendPolicy( EventRequest.SUSPEND_NONE);732} catch ( Exception e ) {733log3("ERROR: ATTENTION: Exception within settingException() : " + e);734log3(" A Exception HAS NOT BEEN SET UP");735throw new JDITestRuntimeException("** FAILURE to set up a Exception **");736}737738log2(" a Exception has been set up");739return excRequest;740}741742private void check() {743744EventSet evSet = null;745EventIterator evI = null;746EventRequest eR = null;747748log2("......performing the check;");749for (int k = 0; k < eventFlags.length; k++) {750751switch (eventFlags[k]) {752753case 0:754evSet = eventSets[k];755evI = evSet.eventIterator();756if (eRequests[k].equals(evI.nextEvent().request()))757break;758testExitCode = FAILED;759log3("ERROR: eventRequest is not equal to event.request() : k == " + k);760break;761762763case 1:764evSet = eventSets[k];765evI = evSet.eventIterator();766if (evI.nextEvent().request() == null)767break;768testExitCode = FAILED;769log3("ERROR: event.request() != null : k == " + k);770break;771772case 2:773evSet = eventSets[k];774evI = evSet.eventIterator();775try {776eR = evI.nextEvent().request();777if (eR == null) {778if ( !eRequests[k].equals(evI.nextEvent().request()) ) {779testExitCode = FAILED;780log3("ERROR: eventRequest is not equal to event.request() : k == " + k);781}782} else {783if ( !eRequests[k].equals(eR) ) {784testExitCode = FAILED;785log3("ERROR: eventRequest is not equal to event.request() : k == " + k);786} else if (evI.nextEvent().request() != null) {787testExitCode = FAILED;788log3("ERROR: eventRequest != null : k == " + k);789}790}791} catch ( Exception e ) {792log3("ERROR: Unexpected Exception : " + e + " :: k == " + k);793testExitCode = FAILED;794}795break;796797case 3:798break;799800default:801log3("ERROR: unexpected default case");802testExitCode = FAILED;803throw new JDITestRuntimeException("** FAILURE within check() **");804}805}806}807808}809810811