test/jdk/com/sun/jdi/TwoThreadsTest.java
author jlahoda
Tue, 12 Nov 2019 06:32:13 +0000
changeset 59021 cfc7bb9a5a92
parent 47216 71c04702a3d5
permissions -rw-r--r--
8232684: Make switch expressions final Reviewed-by: alanb, mcimadamore, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
30376
2ccf2cf7ea48 8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents: 24973
diff changeset
     2
 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/**
44423
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    25
 * @test
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    26
 * @bug 6296125
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    27
 * @summary  JDI: Disabling an EventRequest can cause a multi-threaded debuggee to hang
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    28
 * @author jjh
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *
44423
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    30
 * @run build TestScaffold VMConnection TargetListener TargetAdapter
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    31
 * @run compile -g TwoThreadsTest.java
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    32
 * @run driver TwoThreadsTest
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import com.sun.jdi.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import com.sun.jdi.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import com.sun.jdi.request.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.util.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * This debuggee basically runs two threads each of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * which loop, hitting a bkpt in each iteration.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
class TwoThreadsTarg extends Thread {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    static boolean one = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    static String name1 = "Thread 1";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    static String name2 = "Thread 2";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    static int count = 100;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    public static void main(String[] args) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        System.out.println("Howdy!");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        TwoThreadsTarg t1 = new TwoThreadsTarg(name1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
        TwoThreadsTarg t2 = new TwoThreadsTarg(name2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        t1.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        t2.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    public TwoThreadsTarg(String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        super(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        if (getName().equals(name1)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
            run1();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
            run2();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    public void bkpt1(int i) {
59021
cfc7bb9a5a92 8232684: Make switch expressions final
jlahoda
parents: 47216
diff changeset
    73
        Thread.yield();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    public void run1() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        int i = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        while (i < count) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
            bkpt1(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    public void bkpt2(int i) {
59021
cfc7bb9a5a92 8232684: Make switch expressions final
jlahoda
parents: 47216
diff changeset
    85
        Thread.yield();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    public void run2() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        int i = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        while (i < count) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            i++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            bkpt2(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
/********** test program **********/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
public class TwoThreadsTest extends TestScaffold {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    ReferenceType targetClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    ThreadReference mainThread;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    BreakpointRequest request1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    BreakpointRequest request2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    static volatile int bkpts = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    Thread timerThread;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    static int waitTime = 20000;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    TwoThreadsTest (String args[]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        super(args);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    public static void main(String[] args)      throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        new TwoThreadsTest(args).startTests();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    /* BreakpointEvent handler */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    public void breakpointReached(BreakpointEvent event) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        if (bkpts == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
             * This thread will watch for n secs to go by with no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
             * calls to this method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
             */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            timerThread.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        synchronized("abc") {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
             * Note that this will most likely never get to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
             * the number of times the two bkpt lines in the debuggee
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
             * are hit because bkpts are lost while they are disabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
             */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            bkpts++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
         * The bug occurs when the requests are disabled
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
         * and then re-enabled during the event handler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        request1.disable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        request2.disable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
         * This code between the disables and enables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
         * is just filler that leaves the requests disabled
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
         * for awhile.  I suppose a sleep could be used instead
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        Method mmm = event.location().method();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        List lvlist;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            lvlist = mmm.variablesByName("i");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        } catch (AbsentInformationException ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
            failure("FAILED: can't get local var i");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        LocalVariable ivar = (LocalVariable)lvlist.get(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        ThreadReference thr = event.thread();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        StackFrame sf;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            sf = thr.frame(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        } catch (IncompatibleThreadStateException ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
            failure("FAILED: bad thread state");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        Value ival = sf.getValue(ivar);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        println("Got bkpt at: " + event.location() + ", i = " + ival);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        request1.enable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        request2.enable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    /********** test core **********/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    protected void runTests() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
         * Get to the top of main()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
         * to determine targetClass and mainThread
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        BreakpointEvent bpe = startToMain("TwoThreadsTarg");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        targetClass = bpe.location().declaringType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        mainThread = bpe.thread();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        EventRequestManager erm = vm().eventRequestManager();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        final Thread mainThread = Thread.currentThread();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
         * Set event requests
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        Location loc1 = findMethod(targetClass, "bkpt1", "(I)V").location();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        Location loc2 = findMethod(targetClass, "bkpt2", "(I)V").location();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        request1 = erm.createBreakpointRequest(loc1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        request2 = erm.createBreakpointRequest(loc2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        request1.enable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        request2.enable();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
         * This thread will be started when we get the first bkpt.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
         * (Which we always expect to get).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
         * It awakens every n seconds and checks to see if we
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
         * got any breakpoint events while it was asleep.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        timerThread = new Thread("test timer") {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                    int myBkpts = bkpts;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                    while (true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                            Thread.sleep(waitTime);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                            System.out.println("bkpts = " + bkpts);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                            if (myBkpts == bkpts) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                                // no bkpt for 'waitTime' secs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                                failure("failure: Debuggee appears to be hung");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                                vmDisconnected = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                                // This awakens the main thread which is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                                // waiting for a VMDisconnect.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                                mainThread.interrupt();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                            myBkpts = bkpts;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                        } catch (InterruptedException ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
                            // If the test completes, this occurs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                            println("timer Interrupted");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
            };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
         * resume the target, listening for events
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        listenUntilVMDisconnect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        timerThread.interrupt();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
         * deal with results of test
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
         * if anything has called failure("foo") testFailed will be true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        if (!testFailed) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
            println("TwoThreadsTest: passed; bkpts = " + bkpts);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
            throw new Exception("TwoThreadsTest: failed; bkpts = " + bkpts);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
}