10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 4531526
26 * @summary Test that more than one debuggee cannot bind to same port
27 * at the same time.
28 * @library /lib/testlibrary
29 *
30 * @build jdk.testlibrary.ProcessTools jdk.testlibrary.JDKToolLauncher jdk.testlibrary.Utils
31 * @build VMConnection ExclusiveBind HelloWorld
32 * @run main ExclusiveBind
33 */
34 import java.net.ServerSocket;
35 import com.sun.jdi.Bootstrap;
36 import com.sun.jdi.VirtualMachine;
37 import com.sun.jdi.connect.Connector;
38 import com.sun.jdi.connect.AttachingConnector;
39
40 import java.util.ArrayList;
41 import java.util.Map;
42 import java.util.List;
43 import java.util.Iterator;
44 import java.util.concurrent.TimeUnit;
45
46 import jdk.testlibrary.ProcessTools;
47 import jdk.testlibrary.Utils;
48
49 public class ExclusiveBind {
50 /*
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 4531526
26 * @summary Test that more than one debuggee cannot bind to same port
27 * at the same time.
28 * @library /lib/testlibrary
29 *
30 * @build jdk.testlibrary.* VMConnection ExclusiveBind HelloWorld
31 * @build VMConnection ExclusiveBind HelloWorld
32 * @run main ExclusiveBind
33 */
34 import java.net.ServerSocket;
35 import com.sun.jdi.Bootstrap;
36 import com.sun.jdi.VirtualMachine;
37 import com.sun.jdi.connect.Connector;
38 import com.sun.jdi.connect.AttachingConnector;
39
40 import java.util.ArrayList;
41 import java.util.Map;
42 import java.util.List;
43 import java.util.Iterator;
44 import java.util.concurrent.TimeUnit;
45
46 import jdk.testlibrary.ProcessTools;
47 import jdk.testlibrary.Utils;
48
49 public class ExclusiveBind {
50 /*
|