test/hotspot/jtreg/serviceability/attach/ShMemLongName.java
author sspitsyn
Tue, 26 Jun 2018 13:50:59 -0700
changeset 50802 fa380b3b2b7d
parent 49609 cc63a8331f91
permissions -rw-r--r--
8205721: Problem list serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java Summary: Add the test to the ProblemList.txt Reviewed-by: dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49609
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     1
/*
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     4
 *
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     8
 *
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    13
 * accompanied this code).
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    14
 *
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    18
 *
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    21
 * questions.
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    22
 */
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    23
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    24
/*
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    25
 * @test
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    26
 * @bug 8049695
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    27
 * @summary Ensure shmem transport works with long names
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    28
 * @requires os.family == "windows"
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    29
 * @library /test/lib
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    30
 * @run main/othervm ShMemLongName
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    31
 */
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    32
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    33
import java.io.BufferedReader;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    34
import java.io.IOException;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    35
import java.io.InputStreamReader;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    36
import java.io.InputStream;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    37
import java.util.Collections;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    38
import java.util.Map;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    39
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    40
import com.sun.jdi.Bootstrap;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    41
import com.sun.jdi.VirtualMachine;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    42
import com.sun.jdi.connect.AttachingConnector;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    43
import com.sun.jdi.connect.Connector;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    44
import jdk.test.lib.process.ProcessTools;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    45
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    46
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    47
public class ShMemLongName {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    48
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    49
    private static final int maxShMemLength = 49;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    50
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    51
    private static final String transport = "dt_shmem";
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    52
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    53
    public static void main(String[] args) throws Exception {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    54
        // test with the maximum supported shmem name length
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    55
        String shmemName = ("ShMemLongName" + ProcessHandle.current().pid()
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    56
                                    + String.join("", Collections.nCopies(maxShMemLength, "x"))
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    57
                                 ).substring(0, maxShMemLength);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    58
        Process target = getTarget(shmemName).start();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    59
        try {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    60
            waitForReady(target);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    61
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    62
            log("attaching to the VM...");
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    63
            AttachingConnector ac = Bootstrap.virtualMachineManager().attachingConnectors()
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    64
                    .stream()
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    65
                    .filter(c -> transport.equals(c.transport().name()))
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    66
                    .findFirst()
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    67
                    .orElseThrow(() -> new RuntimeException("Failed to find transport " + transport));
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    68
            Map<String, Connector.Argument> acArgs = ac.defaultArguments();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    69
            acArgs.get("name").setValue(shmemName);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    70
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    71
            VirtualMachine vm = ac.attach(acArgs);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    72
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    73
            log("attached. test(1) PASSED.");
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    74
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    75
            vm.dispose();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    76
        } finally {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    77
            target.destroy();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    78
            target.waitFor();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    79
        }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    80
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    81
        // extra test: ensure using of too-long name fails gracefully
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    82
        // (shmemName + "X") is expected to be "too long".
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    83
        ProcessTools.executeProcess(getTarget(shmemName + "X"))
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    84
                .shouldContain("address strings longer than")
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    85
                .shouldHaveExitValue(2);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    86
        log("test(2) PASSED.");
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    87
    }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    88
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    89
    private static void log(String s) {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    90
        System.out.println(s);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    91
        System.out.flush();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    92
    }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    93
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    94
    // creates target process builder for the specified shmem transport name
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    95
    private static ProcessBuilder getTarget(String shmemName) throws IOException {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    96
        log("starting target with shmem name: '" + shmemName + "'...");
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    97
        return ProcessTools.createJavaProcessBuilder(
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    98
                "-Xdebug",
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
    99
                "-Xrunjdwp:transport=" + transport + ",server=y,suspend=n,address=" + shmemName,
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   100
                "ShMemLongName$Target");
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   101
    }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   102
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   103
    private static void waitForReady(Process target) throws Exception {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   104
        InputStream os = target.getInputStream();
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   105
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(os))) {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   106
            String line;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   107
            while ((line = reader.readLine()) != null) {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   108
                if (line.equals(Target.readyString)) {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   109
                    return;
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   110
                }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   111
            }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   112
        }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   113
    }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   114
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   115
    public static class Target {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   116
        public static final String readyString = "Ready";
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   117
        public static void main(String[] args) throws Exception {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   118
            log(readyString);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   119
            while (true) {
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   120
                Thread.sleep(1000);
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   121
            }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   122
        }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   123
    }
cc63a8331f91 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
amenkov
parents:
diff changeset
   124
}