8267163: Rename anonymous loader tests to hidden loader tests

Reviewed-by: dholmes, hseigel
This commit is contained in:
Mikhailo Seledtsov 2021-09-20 19:03:34 +00:00
parent b3b4b1cc21
commit 5c21c00441
15 changed files with 53 additions and 53 deletions

View File

@ -35,4 +35,4 @@ vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java 8265295 lin
vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/TestDescription.java 8245680 windows-x64
vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java 8273095 generic-all
vmTestbase/vm/mlvm/hiddenloader/stress/oome/heap/Test.java 8273095 generic-all

View File

@ -37,23 +37,23 @@
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.func.findByName.Test
* @build vm.mlvm.hiddenloader.func.findByName.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm vm.mlvm.anonloader.func.findByName.Test
* @run main/othervm vm.mlvm.hiddenloader.func.findByName.Test
*/
package vm.mlvm.anonloader.func.findByName;
package vm.mlvm.hiddenloader.func.findByName;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import vm.mlvm.anonloader.share.AnonkTestee01;
import vm.mlvm.hiddenloader.share.HiddenkTestee01;
import vm.mlvm.share.MlvmTest;
import vm.share.FileUtils;
public class Test extends MlvmTest {
private static final Class<?> PARENT = AnonkTestee01.class;
private static final Class<?> PARENT = HiddenkTestee01.class;
public boolean run() throws Exception {
try {

View File

@ -21,11 +21,11 @@
* questions.
*/
package vm.mlvm.anonloader.share;
package vm.mlvm.hiddenloader.share;
import vm.mlvm.share.Env;
public class AnonkTestee01 {
public class HiddenkTestee01 {
public final static String muzzy = "BIG \uFFFF\u0000\uFFFE\uFEFF MUZZY";
public final static String
theDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrum

View File

@ -21,8 +21,8 @@
* questions.
*/
package vm.mlvm.anonloader.share;
package vm.mlvm.hiddenloader.share;
public class AnonkTestee02 extends AnonkTestee01 {
public AnonkTestee02() {}
public class HiddenkTestee02 extends HiddenkTestee01 {
public HiddenkTestee02() {}
}

View File

@ -21,7 +21,7 @@
* questions.
*/
package vm.mlvm.anonloader.share;
package vm.mlvm.hiddenloader.share;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
@ -65,14 +65,14 @@ import vm.share.UnsafeAccess;
* <p>The test fails, if there were hangups.
*
* <p>By default, before loading class, the bytes are
* saved to {@code _AnonkTestee01.class} file in the current directory.
* saved to {@code _HiddenkTestee01.class} file in the current directory.
* If JVM crashes, the bytecodes can be analysed.
* Class saving is controlled by -saveClassFile option.
* A prefix can be added to the file name using {@link #setFileNamePrefix}
* function.
*/
public abstract class StressClassLoadingTest extends MlvmTest {
private static final String RESCUE_FILE_NAME = "_AnonkTestee01.class";
private static final String RESCUE_FILE_NAME = "_HiddenkTestee01.class";
private static final String HUNG_CLASS_FILE_NAME = "hang.class";
@Option(name = "iterations", default_value = "100000",
@ -100,7 +100,7 @@ public abstract class StressClassLoadingTest extends MlvmTest {
/**
* Sets prefix for names of the files, created by test:
* _AnonkTestee01.class and hangXX.class.
* _HiddenkTestee01.class and hangXX.class.
*
* @param p a prefix to add before file name.
* @throws java.lang.NullPointerException if p is null

View File

@ -27,23 +27,23 @@
* @key randomness
* @modules java.base/jdk.internal.misc
*
* @summary converted from VM Testbase vm/mlvm/anonloader/stress/byteMutation.
* @summary converted from VM Testbase vm/mlvm/hiddenloader/stress/byteMutation.
* VM Testbase keywords: [feature_mlvm, nonconcurrent]
*
* @library /vmTestbase
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.stress.byteMutation.Test
* @build vm.mlvm.hiddenloader.stress.byteMutation.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm vm.mlvm.anonloader.stress.byteMutation.Test -stressIterationsFactor 100000
* @run main/othervm vm.mlvm.hiddenloader.stress.byteMutation.Test -stressIterationsFactor 100000
*/
package vm.mlvm.anonloader.stress.byteMutation;
package vm.mlvm.hiddenloader.stress.byteMutation;
import vm.mlvm.anonloader.share.AnonkTestee01;
import vm.mlvm.anonloader.share.StressClassLoadingTest;
import vm.mlvm.hiddenloader.share.HiddenkTestee01;
import vm.mlvm.hiddenloader.share.StressClassLoadingTest;
import vm.share.FileUtils;
import vm.share.options.Option;
@ -67,7 +67,7 @@ import vm.share.options.Option;
*
*/
public class Test extends StressClassLoadingTest {
private final static Class<?> HOST_CLASS = AnonkTestee01.class;
private final static Class<?> HOST_CLASS = HiddenkTestee01.class;
private final byte[] testeeBytes;
@Option(name = "mutationCount", default_value = "3",
description = "How many bytes to mutate in a class")
@ -76,16 +76,16 @@ public class Test extends StressClassLoadingTest {
/**
* Constructs the test.
* @throws Exception if there are any errors when
* reading {@link vm.mlvm.anonloader.share.AnonkTestee01} class bytecodes.
* reading {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class bytecodes.
*/
public Test() throws Exception {
this.testeeBytes = FileUtils.readClass(AnonkTestee01.class.getName());
this.testeeBytes = FileUtils.readClass(HiddenkTestee01.class.getName());
}
/**
* Returns {@link vm.mlvm.anonloader.share.AnonkTestee01} class to the
* Returns {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class to the
* parent.
* @return {@link vm.mlvm.anonloader.share.AnonkTestee01} class.
* @return {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class.
*/
@Override
protected Class<?> getHostClass() {
@ -93,9 +93,9 @@ public class Test extends StressClassLoadingTest {
}
/**
* Takes {@link vm.mlvm.anonloader.share.AnonkTestee01} class bytecodes
* Takes {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class bytecodes
* and modifies mutationCount bytes setting them to random values.
* @return {@link vm.mlvm.anonloader.share.AnonkTestee01} class bytecodes with modified bytes.
* @return {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class bytecodes with modified bytes.
*/
@Override
protected byte[] generateClassBytes() {

View File

@ -34,20 +34,20 @@
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.stress.oome.heap.Test
* @build vm.mlvm.hiddenloader.stress.oome.heap.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm -XX:-UseGCOverheadLimit -Xmx128m vm.mlvm.anonloader.stress.oome.heap.Test
* @run main/othervm -XX:-UseGCOverheadLimit -Xmx128m vm.mlvm.hiddenloader.stress.oome.heap.Test
*/
package vm.mlvm.anonloader.stress.oome.heap;
package vm.mlvm.hiddenloader.stress.oome.heap;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.List;
import java.io.IOException;
import vm.mlvm.anonloader.share.AnonkTestee01;
import vm.mlvm.hiddenloader.share.HiddenkTestee01;
import vm.mlvm.share.MlvmOOMTest;
import vm.mlvm.share.MlvmTestExecutor;
import vm.mlvm.share.Env;
@ -71,14 +71,14 @@ public class Test extends MlvmOOMTest {
protected void eatMemory(List<Object> list) {
byte[] classBytes = null;
try {
classBytes = FileUtils.readClass(AnonkTestee01.class.getName());
classBytes = FileUtils.readClass(HiddenkTestee01.class.getName());
} catch (IOException e) {
Env.throwAsUncheckedException(e);
}
try {
while (true) {
Lookup lookup = MethodHandles.lookup();
Lookup ank_lookup = MethodHandles.privateLookupIn(AnonkTestee01.class, lookup);
Lookup ank_lookup = MethodHandles.privateLookupIn(HiddenkTestee01.class, lookup);
Class<?> c = ank_lookup.defineHiddenClass(classBytes, true).lookupClass();
list.add(c.newInstance());
}

View File

@ -33,21 +33,21 @@
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.stress.oome.metaspace.Test
* @build vm.mlvm.hiddenloader.stress.oome.metaspace.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm -XX:MaxRAMPercentage=25 -XX:-UseGCOverheadLimit -XX:MetaspaceSize=10m
* -XX:MaxMetaspaceSize=20m vm.mlvm.anonloader.stress.oome.metaspace.Test
* -XX:MaxMetaspaceSize=20m vm.mlvm.hiddenloader.stress.oome.metaspace.Test
*/
package vm.mlvm.anonloader.stress.oome.metaspace;
package vm.mlvm.hiddenloader.stress.oome.metaspace;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.List;
import java.io.IOException;
import vm.mlvm.anonloader.share.AnonkTestee01;
import vm.mlvm.hiddenloader.share.HiddenkTestee01;
import vm.mlvm.share.MlvmOOMTest;
import vm.mlvm.share.MlvmTestExecutor;
import vm.mlvm.share.Env;
@ -71,14 +71,14 @@ public class Test extends MlvmOOMTest {
protected void eatMemory(List<Object> list) {
byte[] classBytes = null;
try {
classBytes = FileUtils.readClass(AnonkTestee01.class.getName());
classBytes = FileUtils.readClass(HiddenkTestee01.class.getName());
} catch (IOException e) {
Env.throwAsUncheckedException(e);
}
try {
while (true) {
Lookup lookup = MethodHandles.lookup();
Lookup ank_lookup = MethodHandles.privateLookupIn(AnonkTestee01.class, lookup);
Lookup ank_lookup = MethodHandles.privateLookupIn(HiddenkTestee01.class, lookup);
Class<?> c = ank_lookup.defineHiddenClass(classBytes, true).lookupClass();
list.add(c.newInstance());
}

View File

@ -33,22 +33,22 @@
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.stress.parallelLoad.Test
* @build vm.mlvm.hiddenloader.stress.parallelLoad.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm
* -Xverify:all
* vm.mlvm.anonloader.stress.parallelLoad.Test
* vm.mlvm.hiddenloader.stress.parallelLoad.Test
* -threadsPerCpu 4
* -threadsExtra 20
* -parseTimeout 0
* -hiddenLoad true
*/
package vm.mlvm.anonloader.stress.parallelLoad;
package vm.mlvm.hiddenloader.stress.parallelLoad;
import vm.mlvm.anonloader.share.StressClassLoadingTest;
import vm.mlvm.anonloader.share.AnonkTestee01;
import vm.mlvm.hiddenloader.share.StressClassLoadingTest;
import vm.mlvm.hiddenloader.share.HiddenkTestee01;
import vm.mlvm.share.MlvmTestExecutor;
import vm.mlvm.share.MultiThreadedTest;
import vm.share.FileUtils;
@ -60,7 +60,7 @@ import vm.share.FileUtils;
*
*/
public class Test extends MultiThreadedTest {
private static final Class<?> HOST_CLASS = AnonkTestee01.class;
private static final Class<?> HOST_CLASS = HiddenkTestee01.class;
private static final String NAME_PREFIX = "thread%03d";
private final byte[] classBytes;
@ -89,7 +89,7 @@ public class Test extends MultiThreadedTest {
/**
* Constructs a sub-test class and runs it. The sub-test class loads
* {@link vm.mlvm.anonloader.share.AnonkTestee01} class bytecodes
* {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class bytecodes
* using {@link java.lang.invoke.MethodHandles.Lookup#defineHiddenClass}
* @param numThread Number of the thread
* @throws Exception if there any exceptions thrown in the sub-test

View File

@ -34,16 +34,16 @@
* /test/lib
*
* @comment build test class and indify classes
* @build vm.mlvm.anonloader.stress.randomBytecodes.Test
* @build vm.mlvm.hiddenloader.stress.randomBytecodes.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
* @run main/othervm vm.mlvm.anonloader.stress.randomBytecodes.Test -stressIterationsFactor 100000
* @run main/othervm vm.mlvm.hiddenloader.stress.randomBytecodes.Test -stressIterationsFactor 100000
*/
package vm.mlvm.anonloader.stress.randomBytecodes;
package vm.mlvm.hiddenloader.stress.randomBytecodes;
import java.util.Arrays;
import vm.mlvm.anonloader.share.StressClassLoadingTest;
import vm.mlvm.hiddenloader.share.StressClassLoadingTest;
/**
* The test does the following in a cycle:
@ -72,9 +72,9 @@ public class Test extends StressClassLoadingTest {
};
/**
* Returns {@link vm.mlvm.anonloader.share.AnonkTestee01} class to the
* Returns {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class to the
* parent.
* @return {@link vm.mlvm.anonloader.share.AnonkTestee01} class.
* @return {@link vm.mlvm.hiddenloader.share.HiddenkTestee01} class.
*/
@Override
protected Class<?> getHostClass() {