Skip to content
Permalink
Browse files
8242471: remove "temporarily" restrictions of nsk/jdi/Argument/value/…
…value004

Reviewed-by: amenkov, cjplummer
  • Loading branch information
iignatev committed Apr 13, 2020
1 parent 68e0e49 commit 15464b36c32ac190abfa0d894e00920994a8650b
Showing 2 changed files with 14 additions and 31 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
import javax.naming.directory.Attribute;
import java.util.*;

import jtreg.SkippedException;

/**
* Test for the control of
*
@@ -49,10 +51,6 @@
* value and then checks that new value remains previously
* after connection establishing with debugee VM and
* after debugee VM finishing.
*
* Warning: Temporarily the test is prepared only for
* Sparc.Solaris.dt_socket-transport of RawCommandLineLaunch
* connector
*/

public class value004 {
@@ -78,28 +76,15 @@ public static int run(String argv[],PrintStream out) {
return 2;
}

boolean skipped = true;
Iterator lci = lcl.iterator();
for (int i = 1; lci.hasNext(); i++) {
while (lci.hasNext()) {
Connector c = (Connector) lci.next();
if (c.name().compareTo("com.sun.jdi.RawCommandLineLaunch") != 0) {
if (!"com.sun.jdi.RawCommandLineLaunch".equals(c.name())) {
log.display("skipping " + c);
continue;
}
log.display("Connector's transport is: " + c.transport().name());
if (c.transport().name().compareTo("dt_socket") != 0) {
log.display("WARNING: Temporarily the test is prepared only "
+ "for dt_socket-transport of "
+ "RawCommandLineLaunch connector!");
return 0;
}
if (System.getProperties().getProperty("os.arch")
.compareTo("sparc") != 0 ||
System.getProperties().getProperty("os.name")
.compareTo("SunOS") != 0) {
log.display("WARNING: Temporarily the test is prepared "
+ "only for Sparc.Solaris-transport of "
+ "RawCommandLineLaunch connector!");
return 0;
}
Map<java.lang.String,? extends com.sun.jdi.connect.Connector.Argument> cdfltArgmnts = c.defaultArguments();
int ksz = cdfltArgmnts.size();
String av[] = new String[ksz + 1];
@@ -138,7 +123,7 @@ public static int run(String argv[],PrintStream out) {
flg = true;
ovl = argHandler.getLaunchExecPath() + " "
+ "-Xdebug -Xnoagent -Djava.compiler=NONE "
+ "-Xrunjdwp:transport=dt_socket,suspend=y,"
+ "-Xrunjdwp:transport=" + c.transport().name() + ",suspend=y,"
+ "address=" + address + " nsk.jdi.Argument.value.value004a";
if (argval.isValid(ovl)) {
argval.setValue(ovl);
@@ -213,7 +198,11 @@ public static int run(String argv[],PrintStream out) {
}
}
}
};
skipped = false;
}
if (skipped) {
throw new SkippedException("no suitable connectors");
}
log.display("Test PASSED!");
return 0;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,12 +47,6 @@
* Test was fixed according to test bug:
* 4778296 TEST_BUG: debuggee VM intemittently hangs after resuming
* - debuggee wrapper is used to handle VMStartEvent
* ================================================
* WARNING:
* Temporarily the test is prepared only for
* Sparc.Solaris.dt_socket-transport of RawCommandLineLaunch
* connector
* ================================================
*
* @library /vmTestbase
* /test/lib

0 comments on commit 15464b3

Please sign in to comment.