Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8272970: Parallelize runtime/InvocationTests/ #5250

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -92,7 +92,9 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293 macosx-x64

runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP_JFR.java 8253437 windows-x64
runtime/cds/DeterministicDump.java 8253495 generic-all
runtime/InvocationTests/invokevirtualTests.java 8271125 generic-all
runtime/InvocationTests/invokevirtualTests.java#current-int 8271125 generic-all
runtime/InvocationTests/invokevirtualTests.java#current-comp 8271125 generic-all
runtime/InvocationTests/invokevirtualTests.java#old-int 8271125 generic-all
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
runtime/os/TestTracePageSizes.java#no-options 8267460 linux-aarch64
runtime/os/TestTracePageSizes.java#explicit-large-page-size 8267460 linux-aarch64
@@ -23,21 +23,42 @@
*/

/*
* @test
* @test id=special
* @bug 8226956
* @summary Run invocation tests against C1 compiler
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile shared/AbstractGenerator.java shared/AccessCheck.java shared/AccessType.java
* shared/Caller.java shared/ExecutorGenerator.java shared/Utils.java
* shared/ByteArrayClassLoader.java shared/Checker.java shared/GenericClassGenerator.java
* @compile invokespecial/Checker.java invokespecial/ClassGenerator.java invokespecial/Generator.java
* invokevirtual/Checker.java invokevirtual/ClassGenerator.java invokevirtual/Generator.java
* invokeinterface/Checker.java invokeinterface/ClassGenerator.java invokeinterface/Generator.java
*
* @run driver/timeout=1800 invocationC1Tests
* @run driver/timeout=1800 invocationC1Tests special
*/

/*
* @test id=virtual
* @bug 8226956
* @summary Run invocation tests against C1 compiler
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokevirtual/Checker.java invokevirtual/ClassGenerator.java invokevirtual/Generator.java
*
* @run driver/timeout=1800 invocationC1Tests virtual
*/

/*
* @test id=interface
* @bug 8226956
* @summary Run invocation tests against C1 compiler
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokeinterface/Checker.java invokeinterface/ClassGenerator.java invokeinterface/Generator.java
*
* @run driver/timeout=1800 invocationC1Tests interface
*/

import jdk.test.lib.process.ProcessTools;
@@ -73,11 +94,27 @@ public static void runTest(String whichTests, String classFileVersion) throws Th
}

public static void main(String args[]) throws Throwable {
if (args.length < 1) {
throw new IllegalArgumentException("Should provide the test name");
}
String testName = args[0];

// Get current major class file version and test with it.
byte klassbuf[] = InMemoryJavaCompiler.compile("blah", "public class blah { }");
int major_version = klassbuf[6] << 8 | klassbuf[7];
runTest("invokespecial.Generator", String.valueOf(major_version));
runTest("invokeinterface.Generator", String.valueOf(major_version));
runTest("invokevirtual.Generator", String.valueOf(major_version));

switch (testName) {
case "special":
runTest("invokespecial.Generator", String.valueOf(major_version));
break;
case "virtual":
runTest("invokevirtual.Generator", String.valueOf(major_version));
break;
case "interface":
runTest("invokeinterface.Generator", String.valueOf(major_version));
break;
default:
throw new IllegalArgumentException("Unknown test name: " + testName);
}
}
}
@@ -23,20 +23,39 @@
*/

/*
* @test
* @test id=special
* @summary Run invocation tests with old CHA (-XX:-UseVtableBasedCHA)
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile shared/AbstractGenerator.java shared/AccessCheck.java shared/AccessType.java
* shared/Caller.java shared/ExecutorGenerator.java shared/Utils.java
* shared/ByteArrayClassLoader.java shared/Checker.java shared/GenericClassGenerator.java
* @compile invokespecial/Checker.java invokespecial/ClassGenerator.java invokespecial/Generator.java
* invokevirtual/Checker.java invokevirtual/ClassGenerator.java invokevirtual/Generator.java
* invokeinterface/Checker.java invokeinterface/ClassGenerator.java invokeinterface/Generator.java
*
* @run driver/timeout=1800 invocationOldCHATests
* @run driver/timeout=1800 invocationOldCHATests special
*/

/*
* @test id=virtual
* @summary Run invocation tests with old CHA (-XX:-UseVtableBasedCHA)
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokevirtual/Checker.java invokevirtual/ClassGenerator.java invokevirtual/Generator.java
*
* @run driver/timeout=1800 invocationOldCHATests virtual
*/

/*
* @test id=interface
* @summary Run invocation tests with old CHA (-XX:-UseVtableBasedCHA)
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokeinterface/Checker.java invokeinterface/ClassGenerator.java invokeinterface/Generator.java
*
* @run driver/timeout=1800 invocationOldCHATests interface
*/

import jdk.test.lib.process.ProcessTools;
@@ -72,11 +91,27 @@ public static void runTest(String whichTests, String classFileVersion) throws Th
}

public static void main(String args[]) throws Throwable {
if (args.length < 1) {
throw new IllegalArgumentException("Should provide the test name");
}
String testName = args[0];

// Get current major class file version and test with it.
byte klassbuf[] = InMemoryJavaCompiler.compile("blah", "public class blah { }");
int major_version = klassbuf[6] << 8 | klassbuf[7];
runTest("invokespecial.Generator", String.valueOf(major_version));
runTest("invokeinterface.Generator", String.valueOf(major_version));
runTest("invokevirtual.Generator", String.valueOf(major_version));

switch (testName) {
case "special":
runTest("invokespecial.Generator", String.valueOf(major_version));
break;
case "virtual":
runTest("invokevirtual.Generator", String.valueOf(major_version));
break;
case "interface":
runTest("invokeinterface.Generator", String.valueOf(major_version));
break;
default:
throw new IllegalArgumentException("Unknown test name: " + testName);
}
}
}
@@ -23,20 +23,45 @@
*/

/*
* @test
* @test id=current-int
* @bug 8224137
* @summary Run invokeinterface invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile shared/AbstractGenerator.java shared/AccessCheck.java shared/AccessType.java
* shared/Caller.java shared/ExecutorGenerator.java shared/Utils.java
* shared/ByteArrayClassLoader.java shared/Checker.java shared/GenericClassGenerator.java
* @compile invokeinterface/Checker.java invokeinterface/ClassGenerator.java
* invokeinterface/Generator.java
*
* @run driver/timeout=1800 invokeinterfaceTests
* @run driver/timeout=1800 invokeinterfaceTests current-int
*/

/*
* @test id=current-comp
* @bug 8224137
* @summary Run invokeinterface invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokeinterface/Checker.java invokeinterface/ClassGenerator.java
* invokeinterface/Generator.java
*
* @run driver/timeout=1800 invokeinterfaceTests current-comp
*/

/*
* @test id=old-int
* @bug 8224137
* @summary Run invokeinterface invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokeinterface/Checker.java invokeinterface/ClassGenerator.java
* invokeinterface/Generator.java
*
* @run driver/timeout=1800 invokeinterfaceTests old-int
*/

import jdk.test.lib.process.ProcessTools;
@@ -71,13 +96,28 @@ public static void runTest(String classFileVersion, String option) throws Throwa
}

public static void main(String args[]) throws Throwable {
if (args.length < 1) {
throw new IllegalArgumentException("Should provide the test name");
}
String testName = args[0];

// Get current major class file version and test with it.
byte klassbuf[] = InMemoryJavaCompiler.compile("blah", "public class blah { }");
int major_version = klassbuf[6] << 8 | klassbuf[7];
runTest(String.valueOf(major_version), "-Xint");
runTest(String.valueOf(major_version), "-Xcomp");

// Test old class file version.
runTest("51", "-Xint"); // JDK-7
switch (testName) {
case "current-int":
runTest(String.valueOf(major_version), "-Xint");
break;
case "current-comp":
runTest(String.valueOf(major_version), "-Xcomp");
break;
case "old-int":
// Test old class file version.
runTest("51", "-Xint"); // JDK-7
break;
default:
throw new IllegalArgumentException("Unknown test name: " + testName);
}
}
}
@@ -23,19 +23,42 @@
*/

/*
* @test
* @test id=current-int
* @bug 8224137
* @summary Run invokespecial invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile shared/AbstractGenerator.java shared/AccessCheck.java shared/AccessType.java
* shared/Caller.java shared/ExecutorGenerator.java shared/Utils.java
* shared/ByteArrayClassLoader.java shared/Checker.java shared/GenericClassGenerator.java
* @compile invokespecial/Checker.java invokespecial/ClassGenerator.java invokespecial/Generator.java
*
* @run driver/timeout=1800 invokespecialTests
* @run driver/timeout=1800 invokespecialTests current-int
*/

/*
* @test id=current-comp
* @bug 8224137
* @summary Run invokespecial invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokespecial/Checker.java invokespecial/ClassGenerator.java invokespecial/Generator.java
*
* @run driver/timeout=1800 invokespecialTests current-comp
*/

/*
* @test id=old-int
* @bug 8224137
* @summary Run invokespecial invocation tests
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @compile invokespecial/Checker.java invokespecial/ClassGenerator.java invokespecial/Generator.java
*
* @run driver/timeout=1800 invokespecialTests old-int
*/

import jdk.test.lib.process.ProcessTools;
@@ -70,13 +93,28 @@ public static void runTest(String classFileVersion, String option) throws Throwa
}

public static void main(String args[]) throws Throwable {
if (args.length < 1) {
throw new IllegalArgumentException("Should provide the test name");
}
String testName = args[0];

// Get current major class file version and test with it.
byte klassbuf[] = InMemoryJavaCompiler.compile("blah", "public class blah { }");
int major_version = klassbuf[6] << 8 | klassbuf[7];
runTest(String.valueOf(major_version), "-Xint");
runTest(String.valueOf(major_version), "-Xcomp");

// Test old class file version.
runTest("51", "-Xint"); // JDK-7
switch (testName) {
case "current-int":
runTest(String.valueOf(major_version), "-Xint");
break;
case "current-comp":
runTest(String.valueOf(major_version), "-Xcomp");
break;
case "old-int":
// Test old class file version.
runTest("51", "-Xint"); // JDK-7
break;
default:
throw new IllegalArgumentException("Unknown test name: " + testName);
}
}
}