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

Reviewed-by: amenkov, cjplummer
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004.java
index f8e0e22..4b291d4 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004.java
@@ -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 @@
             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 @@
                 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 @@
                     }
                 }
             }
-        };
+            skipped = false;
+        }
+        if (skipped) {
+            throw new SkippedException("no suitable connectors");
+        }
         log.display("Test PASSED!");
         return 0;
     }
diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java
index 6a35466..149f806 100644
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java
@@ -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