Staffan,

could you please be my sponsor and push this fix?

I have discovered three more tests that should bechanged:
sun/management/jmxremote/bootstrap/CustomLauncherTest.java
java/lang/management/MemoryMXBean/CollectionUsageThreshold.java
java/lang/management/MemoryMXBean/LowMemoryTest.java

The webrev that includes them can be found here: http://cr.openjdk.java.net/~ykantser/8034960/webrev.02/

Thanks,
Katja



-------- Original Message --------
Subject: Re: RFR(S): 8034960: Serviceability tests using @library failing with java.lang.NoClassDefFoundError
Date:   Fri, 9 May 2014 12:48:56 +0200
From:   Staffan Larsen <[email protected]>
To:     Yekaterina Kantserova <[email protected]>
CC: Alan Bateman <[email protected]>, "[email protected] [email protected]" <[email protected]>, core-libs-dev Libs <[email protected]>



Looks good!

Thanks,
/Staffan

On 9 maj 2014, at 12:43, Yekaterina 
Kantserova<[email protected]>  wrote:

Hi,

The version b09 of JTreg which 
containshttps://bugs.openjdk.java.net/browse/CODETOOLS-7900178  has been 
promoted. So it seems to be time to push the fix for JDK-8034960. I've made a 
new webrev to be sure the changes fit in in the latest jdk9 source. The webrev 
can be found here: cr.openjdk.java.net/~ykantser/8034960/webrev.01.

Thanks,
Katja



On 03/25/2014 01:14 PM, Staffan Larsen wrote:
I’ve looked at a random sample of these changes and they look ok.

Since some of the changes are in non-serviceability code I have also added 
core-libs to the review thread.

I’m sure you know this, but for the record: please don’t push this until jtreg 
with the fix has been promoted.

Thanks,
/Staffan

On 25 mar 2014, at 13:07, Yekaterina 
Kantserova<[email protected]>  wrote:

Hi,

Could I please have a review of this fix.

webrev:http://cr.openjdk.java.net/~ykantser/8034960/webrev.00/
bug:https://bugs.openjdk.java.net/browse/JDK-8034960

When using @library in a JTreg test even @build need to be specify for all 
library files used by the test. If @build is not specified it can lead to 
intermittent failures when running tests concurrently, since javac implicit 
compilation and @library and -concurrency don't play well together.

Verified locally since no JTreg with fix has been promoted yet.


Thanks,
Katja




# HG changeset patch
# User ykantser
# Date 1399641897 -7200
# Node ID 8e306bd741abb1758868226baa76b036cea1e810
# Parent  c7c8002d02721e02131d104549ebeb8b379fb8d2
8034960: Serviceability tests using @library failing with java.lang.NoClassDefFoundError
Reviewed-by: sla, alanb

diff --git a/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java b/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
--- a/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
+++ b/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
@@ -26,6 +26,7 @@
  * @bug 8028994
  * @author Staffan Larsen
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main CheckOrigin
  */
 
diff --git a/test/com/sun/tools/attach/BasicTests.java b/test/com/sun/tools/attach/BasicTests.java
--- a/test/com/sun/tools/attach/BasicTests.java
+++ b/test/com/sun/tools/attach/BasicTests.java
@@ -38,7 +38,7 @@
  * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
  * @summary Basic unit tests for the VM attach mechanism.
  * @library /lib/testlibrary
- * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil
+ * @run build jdk.testlibrary.* Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil
  * @run main BasicTests
  *
  * This test will perform a number of basic attach tests.
diff --git a/test/com/sun/tools/attach/PermissionTest.java b/test/com/sun/tools/attach/PermissionTest.java
--- a/test/com/sun/tools/attach/PermissionTest.java
+++ b/test/com/sun/tools/attach/PermissionTest.java
@@ -34,7 +34,7 @@
  * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
  * @summary Basic unit tests for the VM attach mechanism.
  * @library /lib/testlibrary
- * @run build Application Shutdown
+ * @run build jdk.testlibrary.* Application Shutdown
  * @run main PermissionTest
  *
  * Unit test for Attach API -
diff --git a/test/com/sun/tools/attach/ProviderTest.java b/test/com/sun/tools/attach/ProviderTest.java
--- a/test/com/sun/tools/attach/ProviderTest.java
+++ b/test/com/sun/tools/attach/ProviderTest.java
@@ -33,7 +33,7 @@
  * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
  * @summary Basic unit tests for the VM attach mechanism.
  * @library /lib/testlibrary
- * @run build SimpleProvider
+ * @run build jdk.testlibrary.* SimpleProvider
  * @run main ProviderTest
  *
  * The test will attach and detach to/from the running Application.
diff --git a/test/java/io/BufferedInputStream/LargeCopyWithMark.java b/test/java/io/BufferedInputStream/LargeCopyWithMark.java
--- a/test/java/io/BufferedInputStream/LargeCopyWithMark.java
+++ b/test/java/io/BufferedInputStream/LargeCopyWithMark.java
@@ -26,6 +26,7 @@
  * @summary BufferedInputStream calculates negative array size with large
  *          streams and mark
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main/othervm LargeCopyWithMark
  */
 
diff --git a/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java b/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java
--- a/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java
+++ b/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java
@@ -30,7 +30,7 @@
  * @bug 6289149
  * @summary test when the agent's class is missing the premain() function.
  * @library /lib/testlibrary
- * @run build DummyMain
+ * @run build jdk.testlibrary.* DummyMain
  * @run shell ../MakeJAR3.sh NoPremainAgent
  * @run main NoPremainAgentTest
  */
diff --git a/test/java/lang/instrument/PremainClass/PremainClassTest.java b/test/java/lang/instrument/PremainClass/PremainClassTest.java
--- a/test/java/lang/instrument/PremainClass/PremainClassTest.java
+++ b/test/java/lang/instrument/PremainClass/PremainClassTest.java
@@ -30,7 +30,7 @@
  * @bug 5055293
  * @summary Test non ascii characters in the Premain-Class attribute.
  * @library /lib/testlibrary
- * @run build DummyMain
+ * @run build jdk.testlibrary.* DummyMain
  * @run main PremainClassTest
  */
 public class PremainClassTest {
diff --git a/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java b/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java
--- a/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java
+++ b/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java
@@ -30,7 +30,7 @@
  * @bug 6289149
  * @summary test when the agent's class has a zero arg premain() function.
  * @library /lib/testlibrary
- * @run build DummyMain
+ * @run build jdk.testlibrary.* DummyMain
  * @run shell ../MakeJAR3.sh ZeroArgPremainAgent
  * @run main ZeroArgPremainAgentTest
  */
diff --git a/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java b/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java
--- a/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java
+++ b/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java
@@ -31,7 +31,7 @@
  * @author  Mandy Chung
  *
  * @library /lib/testlibrary/
- * @build CollectionUsageThreshold MemoryUtil RunUtil
+ * @build jdk.testlibrary.* CollectionUsageThreshold MemoryUtil RunUtil
  * @run main/timeout=300 CollectionUsageThreshold
  */
 
diff --git a/test/java/lang/management/MemoryMXBean/LowMemoryTest.java b/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
--- a/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
+++ b/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
@@ -31,7 +31,7 @@
  * @author  Mandy Chung
  *
  * @library /lib/testlibrary/
- * @build LowMemoryTest MemoryUtil RunUtil
+ * @build jdk.testlibrary.* LowMemoryTest MemoryUtil RunUtil
  * @run main/timeout=600 LowMemoryTest
  */
 
diff --git a/test/java/net/URLPermission/nstest/lookup.sh b/test/java/net/URLPermission/nstest/lookup.sh
--- a/test/java/net/URLPermission/nstest/lookup.sh
+++ b/test/java/net/URLPermission/nstest/lookup.sh
@@ -26,7 +26,7 @@
 # @library /lib/testlibrary
 # @compile -XDignore.symbol.file=true SimpleNameService.java
 #            LookupTest.java SimpleNameServiceDescriptor.java
-# @build jdk.testlibrary.Utils
+# @build jdk.testlibrary.*
 # @run shell/timeout=50 lookup.sh
 #
 
diff --git a/test/javax/management/monitor/StartStopTest.java b/test/javax/management/monitor/StartStopTest.java
--- a/test/javax/management/monitor/StartStopTest.java
+++ b/test/javax/management/monitor/StartStopTest.java
@@ -28,7 +28,7 @@
  *          monitors are started and stopped in a loop.
  * @author Luis-Miguel Alventosa
  * @library /lib/testlibrary
- * @run build jdk.testlibrary.Utils
+ * @build jdk.testlibrary.*
  * @run clean StartStopTest
  * @run build StartStopTest
  * @run main/othervm/timeout=300 StartStopTest 1
diff --git a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java
--- a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java
+++ b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java
@@ -41,7 +41,7 @@
  * @test
  * @bug 6434402 8004926
  * @library /lib/testlibrary
- * @build jdk.testlibrary.ProcessTools
+ * @build jdk.testlibrary.*
  * @build TestManager TestApplication CustomLauncherTest
  * @run main/othervm CustomLauncherTest
  * @author Jaroslav Bachorik
diff --git a/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java b/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java
--- a/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java
+++ b/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java
@@ -28,6 +28,7 @@
  * @author  Robert Field
  * @library /lib/testlibrary
  * @compile -XDignore.symbol.file ManyNewInstanceAnonTest.java
+ * @build jdk.testlibrary.*
  * @run main ClassFileInstaller ManyNewInstanceAnonTest
  * @run main/othervm -Xbootclasspath/a:. -Xverify:all ManyNewInstanceAnonTest
  * @run main/othervm -Xbootclasspath/a:. -Xverify:all -Dsun.reflection.noInflation=true ManyNewInstanceAnonTest
diff --git a/test/sun/tools/jcmd/TestJcmdDefaults.java b/test/sun/tools/jcmd/TestJcmdDefaults.java
--- a/test/sun/tools/jcmd/TestJcmdDefaults.java
+++ b/test/sun/tools/jcmd/TestJcmdDefaults.java
@@ -39,6 +39,7 @@
  * @test
  * @bug 7104647
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main TestJcmdDefaults
  */
 public class TestJcmdDefaults {
diff --git a/test/sun/tools/jcmd/TestJcmdSanity.java b/test/sun/tools/jcmd/TestJcmdSanity.java
--- a/test/sun/tools/jcmd/TestJcmdSanity.java
+++ b/test/sun/tools/jcmd/TestJcmdSanity.java
@@ -40,6 +40,7 @@
  * @test
  * @bug 7104647 7154822
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main TestJcmdSanity
  */
 public class TestJcmdSanity {
diff --git a/test/sun/tools/jmap/BasicJMapTest.java b/test/sun/tools/jmap/BasicJMapTest.java
--- a/test/sun/tools/jmap/BasicJMapTest.java
+++ b/test/sun/tools/jmap/BasicJMapTest.java
@@ -34,6 +34,7 @@
  * @bug 6321286
  * @summary Unit test for jmap utility
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main BasicJMapTest
  */
 public class BasicJMapTest {
diff --git a/test/sun/tools/jstack/BasicJStackTest.java b/test/sun/tools/jstack/BasicJStackTest.java
--- a/test/sun/tools/jstack/BasicJStackTest.java
+++ b/test/sun/tools/jstack/BasicJStackTest.java
@@ -32,6 +32,7 @@
  * @bug 6260070
  * @summary Unit test for jstack utility
  * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main BasicJStackTest
  */
 public class BasicJStackTest {

Reply via email to