8242471: remove "temporarily" restrictions of nsk/jdi/Argument/value/value004

Reviewed-by: amenkov, cjplummer
This commit is contained in:
Igor Ignatyev 2020-04-13 12:30:07 -07:00
parent 68e0e49bc8
commit 15464b36c3
2 changed files with 14 additions and 31 deletions

View File

@ -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 java.io.*;
import javax.naming.directory.Attribute;
import java.util.*;
import jtreg.SkippedException;
/**
* Test for the control of
*
@ -49,10 +51,6 @@ import java.util.*;
* 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 class value004 {
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 class value004 {
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 class value004 {
}
}
}
};
skipped = false;
}
if (skipped) {
throw new SkippedException("no suitable connectors");
}
log.display("Test PASSED!");
return 0;
}

View File

@ -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