Skip to content
Permalink
Browse files
8210732: remove jdk.testlibrary.Utils
Reviewed-by: mdoerr
Backport-of: 8b28ad6
  • Loading branch information
GoeLin committed Mar 30, 2022
1 parent c2e43f7 commit b6f4e3e1a40ba144c738615504931eb1dfabf2d2
Show file tree
Hide file tree
Showing 92 changed files with 150 additions and 467 deletions.
@@ -36,18 +36,17 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;
import jdk.test.lib.process.ProcessTools;

/* @test
* @bug 6306165 6432567
* @summary Check that a bad handshake doesn't cause a debuggee to abort
* @library /lib/testlibrary
* @library /test/lib
*
* @modules java.management
* jdk.jdi
* @build jdk.testlibrary.* VMConnection BadHandshakeTest Exit0
* @build VMConnection BadHandshakeTest Exit0
* @run driver BadHandshakeTest
*/
public class BadHandshakeTest {
@@ -24,7 +24,6 @@
/*
* @test
* @summary Smoke test for JDWP hardening
* @library /lib/testlibrary
* @library /test/lib
* @run driver BasicJDWPConnectionTest
*/
@@ -23,16 +23,14 @@

import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/* @test
* @bug 6354345
* @summary Check that multiple -agentlib statements in command line fails
*
* @library /lib/testlibrary
* @library /test/lib
* @modules java.management
* @build jdk.testlibrary.*
* @build DoubleAgentTest Exit0
* @run driver DoubleAgentTest
*/
@@ -28,7 +28,7 @@

import jdk.test.lib.thread.ProcessThread;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/*
* Utility functions for test runners.
@@ -34,19 +34,18 @@
import javax.management.remote.JMXConnectorFactory;

import jdk.test.lib.thread.ProcessThread;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/*
* @test
* @summary Test for VirtualMachine.startManagementAgent and VirtualMachine.startLocalManagementAgent
*
* @library /lib/testlibrary
* @library /test/lib
* @modules java.management
* jdk.attach
* jdk.jartool/sun.tools.jar
*
* @run build jdk.testlibrary.* Application SimpleProvider jdk.testlibrary.*
* @run build Application SimpleProvider
* @run main/timeout=300 StartManagementAgent
*/

@@ -27,12 +27,12 @@
@bug 8071668
@summary Check whether clipboard see changes from external process after taking ownership
@author Anton Nashatyrev: area=datatransfer
@library /lib/testlibrary
@build jdk.testlibrary.Utils
@library /test/lib
@build jdk.test.lib.Utils
@run main ClipboardInterVMTest
*/

import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

import java.awt.*;
import java.awt.datatransfer.*;
@@ -28,7 +28,7 @@
import java.util.concurrent.locks.LockSupport;

import jdk.test.lib.LockFreeLogger;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/**
* ThreadStateController allows a thread to request this thread to transition
@@ -23,17 +23,16 @@

import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/*
* @test
* @bug 6289149
* @summary test when the agent's class is missing the premain() function.
* @library /lib/testlibrary
* @library /test/lib
* @modules java.management
* java.instrument
* @run build jdk.testlibrary.* DummyMain
* @run build DummyMain
* @run shell ../MakeJAR3.sh NoPremainAgent
* @run main/othervm -XX:-CreateCoredumpOnCrash NoPremainAgentTest
*/
@@ -23,16 +23,15 @@

import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/*
* @test
* @bug 5055293
* @summary Test non ascii characters in the Premain-Class attribute.
* @library /lib/testlibrary
* @library /test/lib
* @modules java.management
* @run build jdk.testlibrary.* DummyMain
* @run build DummyMain
* @run main PremainClassTest
*/
public class PremainClassTest {
@@ -23,17 +23,16 @@

import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/*
* @test
* @bug 6289149
* @summary test when the agent's class has a zero arg premain() function.
* @library /lib/testlibrary
* @library /test/lib
* @modules java.management
* java.instrument
* @run build jdk.testlibrary.* DummyMain
* @run build DummyMain
* @run shell ../MakeJAR3.sh ZeroArgPremainAgent
* @run main/othervm -XX:-CreateCoredumpOnCrash ZeroArgPremainAgentTest
*/
@@ -22,7 +22,7 @@
*/

import jdk.test.lib.TimeLimitedRunner;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;
import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
import test.java.lang.invoke.lib.Helper;

@@ -25,7 +25,7 @@

import jdk.test.lib.TimeLimitedRunner;
import jdk.testlibrary.Asserts;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;
import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
import test.java.lang.invoke.lib.Helper;

@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesAsCollectorTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesCastFailureTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesGeneralTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesInsertArgumentsTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesInvokersTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesPermuteArgumentsTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for java.lang.invoke.MethodHandles
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile MethodHandlesTest.java MethodHandlesSpreadArgumentsTest.java remote/RemoteExample.java
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-VerifyDependencies
@@ -23,7 +23,7 @@

/* @test
* @summary unit tests for method handles which permute their arguments
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @run testng/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -ea -esa -DPermuteArgsTest.MAX_ARITY=8 test.java.lang.invoke.PermuteArgsTest
*/

@@ -24,7 +24,7 @@
/*
* @test
* @bug 8019184
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @summary MethodHandles.catchException() fails when methods have 8 args + varargs
* @run main TestCatchExceptionWithVarargs
*/
@@ -34,7 +34,7 @@
* @summary unit tests for varargs array methods: MethodHandleInfo.varargsArray(int),
* MethodHandleInfo.varargsArray(Class,int) & MethodHandleInfo.varargsList(int)
* @modules java.base/sun.invoke.util
* @library /lib/testlibrary /java/lang/invoke/common
* @library /test/lib /java/lang/invoke/common
* @compile/module=java.base java/lang/invoke/MethodHandleHelper.java
* @run main/bootclasspath VarargsArrayTest
* @run main/bootclasspath/othervm -DVarargsArrayTest.MAX_ARITY=255 -DVarargsArrayTest.START_ARITY=250
@@ -23,7 +23,7 @@

package test.java.lang.invoke.lib;

import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

/**
* Helper class used to catch and process VirtualMachineError with message "Out
@@ -36,7 +36,7 @@ public class CodeCacheOverflowProcessor {
/**
* Checks if an instance of Throwable is caused by VirtualMachineError with
* message "Out of space in CodeCache". May be used as filter in method
* {@code jdk.testlibrary.Utils.filterException}.
* {@code jdk.test.lib.Utils.filterException}.
*
* @param t - Throwable to check.
* @return true if Throwable is caused by VME, false otherwise.
@@ -32,9 +32,9 @@
* @requires vm.gc == "null"
* @requires vm.opt.ExplicitGCInvokesConcurrent != "true"
* @requires vm.opt.DisableExplicitGC != "true"
* @library /lib/testlibrary/ /test/lib
* @library /test/lib
*
* @build jdk.testlibrary.* LowMemoryTest MemoryUtil RunUtil
* @build LowMemoryTest MemoryUtil RunUtil
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm/timeout=600 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. LowMemoryTest
@@ -47,7 +47,7 @@
import javax.management.openmbean.CompositeData;
import jdk.test.lib.JDKToolFinder;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

import sun.hotspot.code.Compiler;

@@ -31,7 +31,7 @@
import jdk.test.lib.JDKToolFinder;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

public class RunUtil {

@@ -25,9 +25,7 @@
* @test
* @bug 8072466
* @summary Deadlock when initializing MulticastSocket and DatagramSocket
* @library /lib/testlibrary
* @library /test/lib
* @build jdk.testlibrary.*
* @run main/othervm MultiDead
*/

@@ -38,7 +36,7 @@
import java.util.concurrent.CountDownLatch;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import jdk.test.lib.JDKToolLauncher;
import jdk.testlibrary.Utils;
import jdk.test.lib.Utils;

public class MultiDead {
private static final int THREAD_PAIR_COUNT = 4;