8267095: Miscellaneous cleanups in vm.runtime.defmeth tests
Reviewed-by: dholmes, hseigel
This commit is contained in:
parent
6149b9ad75
commit
229a6e2f36
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -21,22 +21,44 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.AccessibilityFlagsTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import vm.runtime.defmeth.shared.data.method.body.EmptyBody;
|
import vm.runtime.defmeth.shared.data.method.body.EmptyBody;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test allowed combinations of access flags on methods in interfaces.
|
* Test allowed combinations of access flags on methods in interfaces.
|
||||||
* Based on assertions from JVMS8.
|
* Based on assertions from JVMS.
|
||||||
*/
|
*/
|
||||||
public class AccessibilityFlagsTest extends DefMethTest {
|
public class AccessibilityFlagsTest extends DefMethTest {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new AccessibilityFlagsTest(), args);
|
DefMethTest.runTest(AccessibilityFlagsTest.class,
|
||||||
|
/* majorVer */ Set.of(MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====================================================================== */
|
/* ====================================================================== */
|
||||||
@ -207,7 +229,6 @@ public class AccessibilityFlagsTest extends DefMethTest {
|
|||||||
// ACC_STATIC 0x0008 Declared static.
|
// ACC_STATIC 0x0008 Declared static.
|
||||||
// ACC_BRIDGE 0x0040 A bridge method, generated by the compiler.
|
// ACC_BRIDGE 0x0040 A bridge method, generated by the compiler.
|
||||||
// ACC_VARARGS 0x0080 Declared with variable number of arguments.
|
// ACC_VARARGS 0x0080 Declared with variable number of arguments.
|
||||||
// ACC_STRICT 0x0800 Declared strictfp; floating-point mode is FP-strict.
|
|
||||||
// ACC_SYNTHETIC 0x1000 Declared synthetic; not present in the source code.
|
// ACC_SYNTHETIC 0x1000 Declared synthetic; not present in the source code.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -222,22 +243,10 @@ public class AccessibilityFlagsTest extends DefMethTest {
|
|||||||
createDefaultMethodInterface(ACC_STATIC | ACC_PRIVATE));
|
createDefaultMethodInterface(ACC_STATIC | ACC_PRIVATE));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* interface I { strictfp void m() default {}; }
|
|
||||||
*
|
|
||||||
* TEST: ClassLoader.loadClass("I") == succeeds
|
|
||||||
*/
|
|
||||||
public void testStrictFPMethodDefault() {
|
|
||||||
loadClass(
|
|
||||||
createDefaultMethodInterface(ACC_STRICT | ACC_PUBLIC));
|
|
||||||
loadClass(
|
|
||||||
createDefaultMethodInterface(ACC_STRICT | ACC_PRIVATE));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =============================================================================== */
|
/* =============================================================================== */
|
||||||
|
|
||||||
// If a specific method of a class or interface has its ACC_ABSTRACT flag set,
|
// If a specific method of a class or interface has its ACC_ABSTRACT flag set,
|
||||||
// it must not have any of its ACC_FINAL, ACC_NATIVE, ACC_PRIVATE, ACC_STATIC, ACC_STRICT,
|
// it must not have any of its ACC_FINAL, ACC_NATIVE, ACC_PRIVATE, ACC_STATIC,
|
||||||
// or ACC_SYNCHRONIZED flags set (8.4.3.1, 8.4.3.3, 8.4.3.4).
|
// or ACC_SYNCHRONIZED flags set (8.4.3.1, 8.4.3.3, 8.4.3.4).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -326,26 +335,6 @@ public class AccessibilityFlagsTest extends DefMethTest {
|
|||||||
createAbstractMethodClass(ACC_STATIC));
|
createAbstractMethodClass(ACC_STATIC));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* interface I { strictfp void m(); }
|
|
||||||
* abstract class C { abstract strictfp void m(); }
|
|
||||||
*
|
|
||||||
* TEST: ClassLoader.loadClass("I") ==> ClassFormatError
|
|
||||||
* TEST: ClassLoader.loadClass("C") ==> ClassFormatError
|
|
||||||
*/
|
|
||||||
public void testStrictFPMethodAbstract() {
|
|
||||||
/* interface I */
|
|
||||||
expectClassFormatError(
|
|
||||||
createAbstractMethodInterface(ACC_STRICT));
|
|
||||||
|
|
||||||
expectClassFormatError(
|
|
||||||
createAbstractMethodInterface(ACC_STRICT | ACC_PUBLIC));
|
|
||||||
|
|
||||||
/* abstract class C */
|
|
||||||
expectClassFormatError(
|
|
||||||
createAbstractMethodClass(ACC_STRICT));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =============================================================================== */
|
/* =============================================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,19 +21,36 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.BasicTest
|
||||||
|
*/
|
||||||
|
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import nsk.share.TestFailure;
|
import nsk.share.TestFailure;
|
||||||
import nsk.share.test.TestBase;
|
|
||||||
import vm.runtime.defmeth.shared.MemoryClassLoader;
|
import vm.runtime.defmeth.shared.MemoryClassLoader;
|
||||||
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
|
import vm.runtime.defmeth.shared.executor.TestExecutor;
|
||||||
|
|
||||||
import java.util.Map;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,7 +59,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
public class BasicTest extends DefMethTest {
|
public class BasicTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new BasicTest(), args);
|
DefMethTest.runTest(BasicTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -63,9 +84,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
* objectref does not implement the resolved interface, invokevirtual throws
|
* objectref does not implement the resolved interface, invokevirtual throws
|
||||||
* an IncompatibleClassChangeError.
|
* an IncompatibleClassChangeError.
|
||||||
*/
|
*/
|
||||||
public void testInterfaceNotImplemented() {
|
public void testInterfaceNotImplemented(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()V").emptyBody().build()
|
.defaultMethod("m", "()V").emptyBody().build()
|
||||||
.build();
|
.build();
|
||||||
@ -92,9 +111,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
expectedClass = IncompatibleClassChangeError.class;
|
expectedClass = IncompatibleClassChangeError.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()V").throws_(expectedClass).done()
|
b.test().callSite(I, C, "m", "()V").throws_(expectedClass).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -105,9 +122,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*/
|
*/
|
||||||
public void testNoMatch() {
|
public void testNoMatch(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "(Ljava/lang/Object;)V").emptyBody().build()
|
.defaultMethod("m", "(Ljava/lang/Object;)V").emptyBody().build()
|
||||||
.build();
|
.build();
|
||||||
@ -116,9 +131,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m", "()I").throws_(NoSuchMethodError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(NoSuchMethodError.class).done()
|
||||||
.test().callSite(C, C, "m1", "()V").throws_(NoSuchMethodError.class).done()
|
.test().callSite(C, C, "m1", "()V").throws_(NoSuchMethodError.class).done()
|
||||||
.test().callSite(C, C, "m", "(I)V").throws_(NoSuchMethodError.class).done()
|
.test().callSite(C, C, "m", "(I)V").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -133,9 +146,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*/
|
*/
|
||||||
public void testNonPublic() {
|
public void testNonPublic(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m1", "()V").private_().emptyBody().build()
|
.defaultMethod("m1", "()V").private_().emptyBody().build()
|
||||||
.defaultMethod("m2", "()I").private_().returns(1).build()
|
.defaultMethod("m2", "()I").private_().returns(1).build()
|
||||||
@ -144,9 +155,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(C, C, "m1", "()V").throws_(NoSuchMethodError.class).done()
|
b.test().callSite(C, C, "m1", "()V").throws_(NoSuchMethodError.class).done()
|
||||||
.test().callSite(C, C, "m2", "()I").throws_(NoSuchMethodError.class).done()
|
.test().callSite(C, C, "m2", "()I").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -160,9 +169,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void testNonPublicOverride() {
|
public void testNonPublicOverride(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -181,9 +188,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(I, D, "m", "()I").throws_(IllegalAccessError.class).done()
|
.test().callSite(I, D, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test().callSite(I, E, "m", "()I").throws_(IllegalAccessError.class).done()
|
.test().callSite(I, E, "m", "()I").throws_(IllegalAccessError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -199,9 +204,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
* Static initialization of class C will trigger
|
* Static initialization of class C will trigger
|
||||||
* I's static initialization due to I's default method.
|
* I's static initialization due to I's default method.
|
||||||
*/
|
*/
|
||||||
public void testStaticInit() throws ClassNotFoundException {
|
public void testStaticInit(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("<clinit>", "()V")
|
.defaultMethod("<clinit>", "()V")
|
||||||
.flags(ACC_STATIC)
|
.flags(ACC_STATIC)
|
||||||
@ -218,9 +221,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
Class expectedError = isReflectionMode ? RuntimeException.class
|
Class expectedError = isReflectionMode ? RuntimeException.class
|
||||||
: ExceptionInInitializerError.class;
|
: ExceptionInInitializerError.class;
|
||||||
|
|
||||||
b.test().new_(C).throws_(expectedError).done()
|
b.test().new_(C).throws_(expectedError).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -235,9 +236,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
* Static initialization of class C will trigger
|
* Static initialization of class C will trigger
|
||||||
* I's static initialization due to I's private concrete method.
|
* I's static initialization due to I's private concrete method.
|
||||||
*/
|
*/
|
||||||
public void testStaticInitPrivate() throws ClassNotFoundException {
|
public void testStaticInitPrivate(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("<clinit>", "()V")
|
.defaultMethod("<clinit>", "()V")
|
||||||
.flags(ACC_STATIC)
|
.flags(ACC_STATIC)
|
||||||
@ -255,9 +254,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
Class expectedError = isReflectionMode ? RuntimeException.class
|
Class expectedError = isReflectionMode ? RuntimeException.class
|
||||||
: ExceptionInInitializerError.class;
|
: ExceptionInInitializerError.class;
|
||||||
|
|
||||||
b.test().new_(C).throws_(expectedError).done()
|
b.test().new_(C).throws_(expectedError).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -274,9 +271,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
* Static initialization of class C will not trigger
|
* Static initialization of class C will not trigger
|
||||||
* I's static initialization since I has no concrete methods.
|
* I's static initialization since I has no concrete methods.
|
||||||
*/
|
*/
|
||||||
public void testNotStaticInitNoDefault() throws ClassNotFoundException {
|
public void testNotStaticInitNoDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("<clinit>", "()V")
|
.defaultMethod("<clinit>", "()V")
|
||||||
.flags(ACC_STATIC)
|
.flags(ACC_STATIC)
|
||||||
@ -291,9 +286,7 @@ public class BasicTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I,J).build();
|
ConcreteClass C = b.clazz("C").implement(I,J).build();
|
||||||
|
|
||||||
b.test().callSite(C, C, "m", "()I").returns(1).done()
|
b.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -313,9 +306,8 @@ public class BasicTest extends DefMethTest {
|
|||||||
// disabling this test for REFLECTION and INVOKE for now until
|
// disabling this test for REFLECTION and INVOKE for now until
|
||||||
// loader constraint issue associated with those modes has been resolved
|
// loader constraint issue associated with those modes has been resolved
|
||||||
@NotApplicableFor(modes = { REFLECTION, INVOKE_WITH_ARGS, INVOKE_EXACT, INVOKE_GENERIC, INDY })
|
@NotApplicableFor(modes = { REFLECTION, INVOKE_WITH_ARGS, INVOKE_EXACT, INVOKE_GENERIC, INDY })
|
||||||
public void testLoaderConstraint() throws Exception{
|
public void testLoaderConstraint() {
|
||||||
TestBuilder b = factory.getBuilder();
|
TestBuilder b = factory.getBuilder();
|
||||||
|
|
||||||
ConcreteClass A = b.clazz("A").build();
|
ConcreteClass A = b.clazz("A").build();
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
@ -324,10 +316,10 @@ public class BasicTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()LA;").throws_(LinkageError.class).done()
|
b.test().callSite(I, C, "m", "()LA;").throws_(LinkageError.class).done();
|
||||||
.test().callSite(C, C, "m", "()LA;").throws_(LinkageError.class).done()
|
b.test().callSite(C, C, "m", "()LA;").throws_(LinkageError.class).done();
|
||||||
|
|
||||||
.prepare(new TestBuilder.LoaderConstructor() {
|
TestExecutor executor = b.prepare(new TestBuilder.LoaderConstructor() {
|
||||||
@Override
|
@Override
|
||||||
public MemoryClassLoader construct(Map<String, byte[]> classFiles) {
|
public MemoryClassLoader construct(Map<String, byte[]> classFiles) {
|
||||||
final byte[] cfI = classFiles.get("I");
|
final byte[] cfI = classFiles.get("I");
|
||||||
@ -371,6 +363,8 @@ public class BasicTest extends DefMethTest {
|
|||||||
|
|
||||||
return l2;
|
return l2;
|
||||||
}
|
}
|
||||||
}).run();
|
});
|
||||||
|
|
||||||
|
executor.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,15 +21,33 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.ConflictingDefaultsTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
||||||
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +67,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
*/
|
*/
|
||||||
public class ConflictingDefaultsTest extends DefMethTest {
|
public class ConflictingDefaultsTest extends DefMethTest {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new ConflictingDefaultsTest(), args);
|
DefMethTest.runTest(ConflictingDefaultsTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -61,9 +83,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: C c = new C(); c.m() ==> ICCE
|
* TEST: C c = new C(); c.m() ==> ICCE
|
||||||
*/
|
*/
|
||||||
public void testConflict() {
|
public void testConflict(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -76,9 +96,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m","()I")
|
b.test().callSite(C, C, "m","()I")
|
||||||
.throws_(IncompatibleClassChangeError.class)
|
.throws_(IncompatibleClassChangeError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -90,9 +108,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: C c = new C(); c.m() return 2
|
* TEST: C c = new C(); c.m() return 2
|
||||||
*/
|
*/
|
||||||
public void testMaximallySpecificDefault() {
|
public void testMaximallySpecificDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -105,9 +121,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m","()I")
|
b.test().callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -119,9 +133,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: C c = new C(); c.m() ==> AME
|
* TEST: C c = new C(); c.m() ==> AME
|
||||||
*/
|
*/
|
||||||
public void testReabstract() {
|
public void testReabstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -134,9 +146,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m","()I")
|
b.test().callSite(C, C, "m","()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -152,9 +162,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
* TEST: I i = new C(); i.m() ==> AME
|
* TEST: I i = new C(); i.m() ==> AME
|
||||||
* TEST: D d = new D(); d.m() ==> callSuper C.m ==> AME
|
* TEST: D d = new D(); d.m() ==> callSuper C.m ==> AME
|
||||||
*/
|
*/
|
||||||
public void testReabstract2() {
|
public void testReabstract2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -179,9 +187,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(D, D, "m","()I")
|
.test().callSite(D, D, "m","()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -195,9 +201,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: A c = new C(); c.m() ==> AME
|
* TEST: A c = new C(); c.m() ==> AME
|
||||||
*/
|
*/
|
||||||
public void testReabstractConflictingDefaults() {
|
public void testReabstractConflictingDefaults(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -215,9 +219,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(A, C, "m","()I")
|
b.test().callSite(A, C, "m","()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -236,9 +238,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
* TEST: K k = new C(); k.m() ==> AME
|
* TEST: K k = new C(); k.m() ==> AME
|
||||||
* TEST: L l = new D(); l.m() ==> AME
|
* TEST: L l = new D(); l.m() ==> AME
|
||||||
*/
|
*/
|
||||||
public void testReabstractConflictingDefaultsInvokeInterface() {
|
public void testReabstractConflictingDefaultsInvokeInterface(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -266,9 +266,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(L, D, "m","()I")
|
.test().callSite(L, D, "m","()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -286,9 +284,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
* TEST: K k = new C(); CallSuper k.m() ==> AME
|
* TEST: K k = new C(); CallSuper k.m() ==> AME
|
||||||
* TEST: L l = new D(); l.m() ==> AME
|
* TEST: L l = new D(); l.m() ==> AME
|
||||||
*/
|
*/
|
||||||
public void testReabstractConflictingDefaultsSuper() {
|
public void testReabstractConflictingDefaultsSuper(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -315,9 +311,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(L, D, "m","()I")
|
.test().callSite(L, D, "m","()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -345,9 +339,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
||||||
public void testReabstractResolveMethod00705m2() {
|
public void testReabstractResolveMethod00705m2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -394,9 +386,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(A, C, "test_Amethod_ISIMR", "()V")
|
.test().callSite(A, C, "test_Amethod_ISIMR", "()V")
|
||||||
.throws_(expectedError2)
|
.throws_(expectedError2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -408,9 +398,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|C] c = new C(); c.m() == 2;
|
* TEST: [I|J|C] c = new C(); c.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testShadow() {
|
public void testShadow(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -431,9 +419,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -445,9 +431,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|C] c = new C(); c.m() == 2;
|
* TEST: [I|J|C] c = new C(); c.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testDisqualified() {
|
public void testDisqualified(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -469,9 +453,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -485,9 +467,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
* TEST: J j = new C(); j.m() ==> NSME; j.m(0) == 2
|
* TEST: J j = new C(); j.m() ==> NSME; j.m(0) == 2
|
||||||
* TEST: C c = new C(); c.m() == 1; c.m(0) == 2
|
* TEST: C c = new C(); c.m() == 1; c.m(0) == 2
|
||||||
*/
|
*/
|
||||||
public void testMixedArity1() {
|
public void testMixedArity1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -529,9 +509,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.callSite(C, C, "m","(I)I")
|
.callSite(C, C, "m","(I)I")
|
||||||
.params(0)
|
.params(0)
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -545,9 +523,7 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
* TEST: J j = new C(); j.m() ==> ICCE
|
* TEST: J j = new C(); j.m() ==> ICCE
|
||||||
* TEST: C c = new C(); c.m() ==> ICCE; c.m(0) == 3
|
* TEST: C c = new C(); c.m() ==> ICCE; c.m(0) == 3
|
||||||
*/
|
*/
|
||||||
public void testMixedArity2() {
|
public void testMixedArity2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -581,8 +557,6 @@ public class ConflictingDefaultsTest extends DefMethTest {
|
|||||||
.callSite(C, C, "m","(I)I")
|
.callSite(C, C, "m","(I)I")
|
||||||
.params(0)
|
.params(0)
|
||||||
.returns(3)
|
.returns(3)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,16 +21,31 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.DefaultVsAbstractTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import vm.runtime.defmeth.shared.data.method.param.NewInstanceParam;
|
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED;
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests on interaction of default methods with abstract methods
|
* Tests on interaction of default methods with abstract methods
|
||||||
@ -46,7 +61,11 @@ import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.
|
|||||||
public class DefaultVsAbstractTest extends DefMethTest {
|
public class DefaultVsAbstractTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new DefaultVsAbstractTest(), args);
|
DefMethTest.runTest(DefaultVsAbstractTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -55,9 +74,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: new C() throws InstantiationError
|
* TEST: new C() throws InstantiationError
|
||||||
*/
|
*/
|
||||||
public void test0() {
|
public void test0(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -69,8 +86,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
b.test()
|
b.test()
|
||||||
.callSite(I, C, "m", "()I")
|
.callSite(I, C, "m", "()I")
|
||||||
.throws_(InstantiationError.class)
|
.throws_(InstantiationError.class)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -86,9 +102,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: C c = new D(); c.m() ==> AME
|
* TEST: C c = new D(); c.m() ==> AME
|
||||||
* TEST: D d = new D(); d.m() ==> AME
|
* TEST: D d = new D(); d.m() ==> AME
|
||||||
*/
|
*/
|
||||||
public void test1() {
|
public void test1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -110,8 +124,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(D, D, "m", "()I")
|
.callSite(D, D, "m", "()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -127,9 +140,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: C o = new D(); o.m()I throws AME
|
* TEST: C o = new D(); o.m()I throws AME
|
||||||
* TEST: D o = new D(); o.m()I throws AME
|
* TEST: D o = new D(); o.m()I throws AME
|
||||||
*/
|
*/
|
||||||
public void test2() {
|
public void test2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -151,8 +162,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(D, D, "m", "()I")
|
.callSite(D, D, "m", "()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -170,9 +180,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: C o = new D(); o.m()I == 2
|
* TEST: C o = new D(); o.m()I == 2
|
||||||
* TEST: D o = new D(); o.m()I == 2
|
* TEST: D o = new D(); o.m()I == 2
|
||||||
*/
|
*/
|
||||||
public void test3() {
|
public void test3(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -194,8 +202,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test() // D d = new C(); ...
|
.test() // D d = new C(); ...
|
||||||
.callSite(D, D, "m", "()I").returns(2)
|
.callSite(D, D, "m", "()I").returns(2)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -213,9 +220,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: D o = new C(); o.m()I throws AME
|
* TEST: D o = new C(); o.m()I throws AME
|
||||||
* TEST: C o = new C(); o.m()I throws AME
|
* TEST: C o = new C(); o.m()I throws AME
|
||||||
*/
|
*/
|
||||||
public void test4() {
|
public void test4(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -243,8 +248,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.test() // C c = new C(); ...
|
.test() // C c = new C(); ...
|
||||||
.callSite(C, C, "m", "()I")
|
.callSite(C, C, "m", "()I")
|
||||||
.throws_(AbstractMethodError.class)
|
.throws_(AbstractMethodError.class)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -264,9 +268,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: I o = new C(); o.m()I == 2
|
* TEST: I o = new C(); o.m()I == 2
|
||||||
* TEST: I o = new C(); o.m()I == 2
|
* TEST: I o = new C(); o.m()I == 2
|
||||||
*/
|
*/
|
||||||
public void test5() {
|
public void test5(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -296,8 +298,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.test() // C c = new C(); ...
|
.test() // C c = new C(); ...
|
||||||
.callSite(I, C, "m", "()I")
|
.callSite(I, C, "m", "()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -321,9 +322,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* TEST: D o = new C(); o.m()I == 3
|
* TEST: D o = new C(); o.m()I == 3
|
||||||
* TEST: J o = new C(); o.m()I == 3
|
* TEST: J o = new C(); o.m()I == 3
|
||||||
*/
|
*/
|
||||||
public void test6() {
|
public void test6(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -357,8 +356,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test() // C c = new C(); ...
|
.test() // C c = new C(); ...
|
||||||
.callSite(J, C, "m", "()I").returns(3)
|
.callSite(J, C, "m", "()I").returns(3)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -378,9 +376,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
* returns 1 for REFLECTION and INVOKE_WITH_ARGS
|
* returns 1 for REFLECTION and INVOKE_WITH_ARGS
|
||||||
* ICCE for other modes
|
* ICCE for other modes
|
||||||
*/
|
*/
|
||||||
public void testInvokeInterfaceClassDefaultMethod() {
|
public void testInvokeInterfaceClassDefaultMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -409,16 +405,14 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
if (exeMode.equals("REFLECTION") ||
|
if (exeMode.equals("REFLECTION") ||
|
||||||
exeMode.equals("INVOKE_WITH_ARGS")) {
|
exeMode.equals("INVOKE_WITH_ARGS")) {
|
||||||
b.test().interfaceCallSite(A, B, "m", "()I")
|
b.test().interfaceCallSite(A, B, "m", "()I")
|
||||||
.returns(1).done()
|
.returns(1).done();
|
||||||
.run();
|
|
||||||
} else {
|
} else {
|
||||||
// ICCE in other modes due to
|
// ICCE in other modes due to
|
||||||
// JVMS-5.4.3.4. Interface Method Resolution
|
// JVMS-5.4.3.4. Interface Method Resolution
|
||||||
// When resolving an interface method reference:
|
// When resolving an interface method reference:
|
||||||
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
||||||
b.test().interfaceCallSite(A, B, "m", "()I")
|
b.test().interfaceCallSite(A, B, "m", "()I")
|
||||||
.throws_(IncompatibleClassChangeError.class).done()
|
.throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,9 +431,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: A o = new B(); o.m()I throws ICCE
|
* TEST: A o = new B(); o.m()I throws ICCE
|
||||||
*/
|
*/
|
||||||
public void testInvokeInterfaceClassAbstractMethod() {
|
public void testInvokeInterfaceClassAbstractMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -456,9 +448,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
// When resolving an interface method reference:
|
// When resolving an interface method reference:
|
||||||
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
||||||
b.test().interfaceCallSite(A, B, "m", "()I")
|
b.test().interfaceCallSite(A, B, "m", "()I")
|
||||||
.throws_(IncompatibleClassChangeError.class).done()
|
.throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -476,9 +466,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: A o = new B(); o.m()I throws ICCE
|
* TEST: A o = new B(); o.m()I throws ICCE
|
||||||
*/
|
*/
|
||||||
public void testInvokeInterfaceMultipleDefinedClassDefaultMethod() {
|
public void testInvokeInterfaceMultipleDefinedClassDefaultMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -495,8 +483,7 @@ public class DefaultVsAbstractTest extends DefMethTest {
|
|||||||
// When resolving an interface method reference:
|
// When resolving an interface method reference:
|
||||||
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
// If C is not an interface, interface method resolution throws an IncompatibleClassChangeError.
|
||||||
b.test().interfaceCallSite(A, B, "m", "()I")
|
b.test().interfaceCallSite(A, B, "m", "()I")
|
||||||
.throws_(IncompatibleClassChangeError.class).done()
|
.throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,14 +21,31 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.MethodResolutionTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import vm.runtime.defmeth.shared.data.method.param.*;
|
import vm.runtime.defmeth.shared.data.method.param.*;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,7 +85,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
public class MethodResolutionTest extends DefMethTest {
|
public class MethodResolutionTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new MethodResolutionTest(), args);
|
DefMethTest.runTest(MethodResolutionTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -80,9 +101,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == 1;
|
* TEST: C c = new C(); c.m() == 1;
|
||||||
* TEST: I i = new C(); i.m() == 1;
|
* TEST: I i = new C(); i.m() == 1;
|
||||||
*/
|
*/
|
||||||
public void testBasic() {
|
public void testBasic(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I =
|
Interface I =
|
||||||
b.intf("I")
|
b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
@ -100,8 +119,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m", "()I")
|
.callSite(C, C, "m", "()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -113,9 +131,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == 1;
|
* TEST: C c = new C(); c.m() == 1;
|
||||||
* TEST: I i = new C(); i.m() == 1;
|
* TEST: I i = new C(); i.m() == 1;
|
||||||
*/
|
*/
|
||||||
public void testBasicDefault() {
|
public void testBasicDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I =
|
Interface I =
|
||||||
b.intf("I")
|
b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1)
|
.defaultMethod("m", "()I").returns(1)
|
||||||
@ -132,9 +148,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(C, C, "m", "()I")
|
.test().callSite(C, C, "m", "()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -147,9 +161,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|K|C] i = new C(); i.m() == 1;
|
* TEST: [I|J|K|C] i = new C(); i.m() == 1;
|
||||||
*/
|
*/
|
||||||
public void testFarDefault() {
|
public void testFarDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I =
|
Interface I =
|
||||||
b.intf("I")
|
b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1)
|
.defaultMethod("m", "()I").returns(1)
|
||||||
@ -175,9 +187,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.done()
|
.done()
|
||||||
.test().callSite(C, C, "m", "()I")
|
.test().callSite(C, C, "m", "()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -191,9 +201,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == 1;
|
* TEST: C c = new C(); c.m() == 1;
|
||||||
* TEST: K k = new C(); k.m() == 1;
|
* TEST: K k = new C(); k.m() == 1;
|
||||||
*/
|
*/
|
||||||
public void testOverrideAbstract() {
|
public void testOverrideAbstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -221,9 +229,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m", "()I")
|
.callSite(C, C, "m", "()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -234,9 +240,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [C|I] c = new C(); c.m() == 2;
|
* TEST: [C|I] c = new C(); c.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testDefaultVsConcrete() {
|
public void testDefaultVsConcrete(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -252,9 +256,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m", "()I")
|
.callSite(C, C, "m", "()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -266,9 +268,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|B|C] v = new C(); v.m() == 1;
|
* TEST: [I|B|C] v = new C(); v.m() == 1;
|
||||||
*/
|
*/
|
||||||
public void testInheritedDefault() {
|
public void testInheritedDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -287,9 +287,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -301,9 +299,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testExistingInherited() {
|
public void testExistingInherited(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -325,9 +321,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -339,9 +333,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|B|D] v = new C(); v.m() == 3;
|
* TEST: [I|B|D] v = new C(); v.m() == 3;
|
||||||
*/
|
*/
|
||||||
public void testExistingInheritedOverride() {
|
public void testExistingInheritedOverride(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -365,9 +357,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(3)
|
.returns(3)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -381,9 +371,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|C|D|J] v = new E(); v.m() == 22;
|
* TEST: [I|J|C|D|J] v = new E(); v.m() == 22;
|
||||||
*/
|
*/
|
||||||
public void testExistingInheritedPlusDefault() {
|
public void testExistingInheritedPlusDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(11).build()
|
.defaultMethod("m", "()I").returns(11).build()
|
||||||
.build();
|
.build();
|
||||||
@ -422,9 +410,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(E, E, "m","()I")
|
.callSite(E, E, "m","()I")
|
||||||
.returns(22)
|
.returns(22)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -436,9 +422,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testInheritedWithConcrete() {
|
public void testInheritedWithConcrete(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -460,9 +444,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -474,9 +456,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
* TEST: [I|B|C] v = new C(); v.m() == 2;
|
||||||
*/
|
*/
|
||||||
public void testInheritedWithConcreteAndImpl() {
|
public void testInheritedWithConcreteAndImpl(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -498,9 +478,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -513,9 +491,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|K|C] c = new C(); c.m() == 99
|
* TEST: [I|J|K|C] c = new C(); c.m() == 99
|
||||||
*/
|
*/
|
||||||
public void testDiamond() {
|
public void testDiamond(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -541,9 +517,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -558,9 +532,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: [I|J|K|L|M|C] c = new C(); c.m() == 1
|
* TEST: [I|J|K|L|M|C] c = new C(); c.m() == 1
|
||||||
*/
|
*/
|
||||||
public void testExpandedDiamond() {
|
public void testExpandedDiamond(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -596,9 +568,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.test()
|
.test()
|
||||||
.callSite(C, C, "m","()I")
|
.callSite(C, C, "m","()I")
|
||||||
.returns(1)
|
.returns(1)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -614,9 +584,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m((Object)null) == 2;
|
* TEST: C c = new C(); c.m((Object)null) == 2;
|
||||||
* TEST: C c = new C(); c.m((C)null) == 2;
|
* TEST: C c = new C(); c.m((C)null) == 2;
|
||||||
*/
|
*/
|
||||||
public void testSelfFillWithExplicitBridge() {
|
public void testSelfFillWithExplicitBridge(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
/* interface I<T> { ... */
|
/* interface I<T> { ... */
|
||||||
Interface I = b.intf("I").sig("<T:Ljava/lang/Object;>Ljava/lang/Object;")
|
Interface I = b.intf("I").sig("<T:Ljava/lang/Object;>Ljava/lang/Object;")
|
||||||
/* default int m(T t) { return 1; } */
|
/* default int m(T t) { return 1; } */
|
||||||
@ -656,9 +624,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
.callSite(C, C, "m", "(LC;)I")
|
.callSite(C, C, "m", "(LC;)I")
|
||||||
.params(new NullParam())
|
.params(new NullParam())
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -689,8 +655,6 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -702,9 +666,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: J j = new C(); j.m() ==> NSME; j.m(0) == 2
|
* TEST: J j = new C(); j.m() ==> NSME; j.m(0) == 2
|
||||||
* TEST: C c = new C(); c.m() == 1; c.m(0) == 2
|
* TEST: C c = new C(); c.m() == 1; c.m(0) == 2
|
||||||
*/
|
*/
|
||||||
public void testConflictingDefaultMixedArity1() {
|
public void testConflictingDefaultMixedArity1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1)
|
.defaultMethod("m", "()I").returns(1)
|
||||||
.build()
|
.build()
|
||||||
@ -741,8 +703,6 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
||||||
.returns(2)
|
.returns(2)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -756,9 +716,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* TEST: J j = new C(); j.m(0) ==> ICCE
|
* TEST: J j = new C(); j.m(0) ==> ICCE
|
||||||
* TEST: C c = new C(); c.m() ==> ICCE; c.m(0) == 3
|
* TEST: C c = new C(); c.m() ==> ICCE; c.m(0) == 3
|
||||||
*/
|
*/
|
||||||
public void testConflictingDefaultMixedArity2() {
|
public void testConflictingDefaultMixedArity2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1)
|
.defaultMethod("m", "()I").returns(1)
|
||||||
.build()
|
.build()
|
||||||
@ -797,8 +755,6 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
b.test().callSite(C, C, "m", "(I)I").params(ICONST_0)
|
||||||
.returns(3)
|
.returns(3)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In package1:
|
/* In package1:
|
||||||
@ -813,11 +769,9 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* A myA = new A;
|
* A myA = new A;
|
||||||
* myA.m(); // should return 10 except for reflect mode,
|
* myA.m(); // should return 10 except for reflect mode,
|
||||||
* // throw IllegalAccessException with reflect mode
|
* // throw IllegalAccessException with reflect mode
|
||||||
* B myB = new B; // not related
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void testMethodResolvedInDifferentPackage() {
|
public void testMethodResolvedInDifferentPackage(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
Interface I = b.intf("p1.I").flags(~ACC_PUBLIC & ACC_PUBLIC) // make it package private
|
Interface I = b.intf("p1.I").flags(~ACC_PUBLIC & ACC_PUBLIC) // make it package private
|
||||||
.defaultMethod("m", "()I").returns(10)
|
.defaultMethod("m", "()I").returns(10)
|
||||||
.build()
|
.build()
|
||||||
@ -832,18 +786,14 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
b.test()
|
b.test()
|
||||||
.callSite(myA, myA, "m", "()I")
|
.callSite(myA, myA, "m", "()I")
|
||||||
.returns(10)
|
.returns(10)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
} else {
|
||||||
// -mode reflect will fail with IAE as expected
|
// -mode reflect will fail with IAE as expected
|
||||||
} else {
|
|
||||||
b.test()
|
b.test()
|
||||||
.callSite(myA, myA, "m", "()I")
|
.callSite(myA, myA, "m", "()I")
|
||||||
.throws_(IllegalAccessException.class)
|
.throws_(IllegalAccessException.class)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ConcreteClass myB = b.clazz("p2.B").build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In package p1:
|
/* In package p1:
|
||||||
@ -867,8 +817,7 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
* myA.m(); // should return 13, not throw IllegalAccessError
|
* myA.m(); // should return 13, not throw IllegalAccessError
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void testMethodResolvedInLocalFirst() {
|
public void testMethodResolvedInLocalFirst(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
Interface I = b.intf("p1.I")
|
Interface I = b.intf("p1.I")
|
||||||
.defaultMethod("m", "()I").returns(12)
|
.defaultMethod("m", "()I").returns(12)
|
||||||
.build()
|
.build()
|
||||||
@ -889,7 +838,6 @@ public class MethodResolutionTest extends DefMethTest {
|
|||||||
b.test()
|
b.test()
|
||||||
.callSite(myB, myB, "m", "()I")
|
.callSite(myB, myB, "m", "()I")
|
||||||
.returns(13)
|
.returns(13)
|
||||||
.done()
|
.done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -21,30 +21,49 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.ObjectMethodOverridesTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import nsk.share.TestFailure;
|
import nsk.share.TestFailure;
|
||||||
import nsk.share.test.TestBase;
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
|
||||||
import vm.runtime.defmeth.shared.data.method.body.*;
|
import vm.runtime.defmeth.shared.data.method.body.*;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
|
|
||||||
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that default methods don't override methods inherited from Object class.
|
* Test that default methods don't override methods inherited from Object class.
|
||||||
*/
|
*/
|
||||||
public class ObjectMethodOverridesTest extends DefMethTest {
|
public class ObjectMethodOverridesTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new ObjectMethodOverridesTest(), args);
|
DefMethTest.runTest(ObjectMethodOverridesTest.class,
|
||||||
|
/* majorVer */ Set.of(MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* protected Object clone() */
|
/* protected Object clone() */
|
||||||
public void testClone() throws Exception {
|
public void testClone(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("clone", "()Ljava/lang/Object;")
|
.defaultMethod("clone", "()Ljava/lang/Object;")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -62,15 +81,11 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m", "()V")
|
b.test().callSite(C, C, "m", "()V")
|
||||||
.throws_(CloneNotSupportedException.class)
|
.throws_(CloneNotSupportedException.class)
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* boolean equals(Object obj) */
|
/* boolean equals(Object obj) */
|
||||||
public void testEquals() throws Exception {
|
public void testEquals(TestBuilder b) throws ReflectiveOperationException {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("equals", "(Ljava/lang/Object;)Z")
|
.defaultMethod("equals", "(Ljava/lang/Object;)Z")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -79,16 +94,16 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
ClassLoader cl = b.build();
|
b.test().callSite(I, C, "equals", "(Ljava/lang/Object;)Z")
|
||||||
Object c = cl.loadClass("C").newInstance();
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
c.equals(this);
|
b.test().callSite(C, C, "equals", "(Ljava/lang/Object;)Z")
|
||||||
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void finalize() */
|
/* void finalize() */
|
||||||
public void testFinalize() throws Exception {
|
public void testFinalize(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("finalize", "()V")
|
.defaultMethod("finalize", "()V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -105,15 +120,11 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "m", "()V")
|
b.test().callSite(C, C, "m", "()V")
|
||||||
.ignoreResult()
|
.ignoreResult()
|
||||||
.done()
|
.done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* final Class<?> getClass() */
|
/* final Class<?> getClass() */
|
||||||
public void testGetClass() throws Exception {
|
public void testGetClass(TestBuilder b) throws Exception {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("getClass", "()Ljava/lang/Class;")
|
.defaultMethod("getClass", "()Ljava/lang/Class;")
|
||||||
.sig("()Ljava/lang/Class<*>;")
|
.sig("()Ljava/lang/Class<*>;")
|
||||||
@ -123,14 +134,12 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* int hashCode() */
|
/* int hashCode() */
|
||||||
public void testHashCode() throws Exception {
|
public void testHashCode(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("hashCode", "()I")
|
.defaultMethod("hashCode", "()I")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -139,17 +148,17 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
ClassLoader cl = b.build();
|
b.test().callSite(I, C, "hashCode", "()I")
|
||||||
Object c = cl.loadClass("C").newInstance();
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
c.hashCode();
|
b.test().callSite(C, C, "hashCode", "()I")
|
||||||
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* final void notify() */
|
/* final void notify() */
|
||||||
public void testNotify() throws Exception {
|
public void testNotify(TestBuilder b) throws Exception {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("notify", "()V")
|
.defaultMethod("notify", "()V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -158,14 +167,12 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void notifyAll() */
|
/* void notifyAll() */
|
||||||
public void testNotifyAll() throws Exception {
|
public void testNotifyAll(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("notifyAll", "()V")
|
.defaultMethod("notifyAll", "()V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -174,14 +181,12 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* String toString() */
|
/* String toString() */
|
||||||
public void testToString() throws Exception {
|
public void testToString(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("toString()", "()Ljava/lang/String;")
|
.defaultMethod("toString()", "()Ljava/lang/String;")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -190,16 +195,23 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
ClassLoader cl = b.build();
|
if (factory.getExecutionMode() == "REFLECTION") {
|
||||||
Object c = cl.loadClass("C").newInstance();
|
// Class.get*Method() don't find any implicitly declared method from Object on interfaces.
|
||||||
|
b.test().callSite(I, C, "toString", "()Ljava/lang/String;")
|
||||||
c.toString();
|
.throws_(NoSuchMethodException.class)
|
||||||
|
.done();
|
||||||
|
} else {
|
||||||
|
b.test().callSite(I, C, "toString", "()Ljava/lang/String;")
|
||||||
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
|
}
|
||||||
|
b.test().callSite(C, C, "toString", "()Ljava/lang/String;")
|
||||||
|
.ignoreResult()
|
||||||
|
.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* final void wait() */
|
/* final void wait() */
|
||||||
public void testWait() throws Exception {
|
public void testWait(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("wait", "()V")
|
.defaultMethod("wait", "()V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -208,14 +220,12 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* final void wait(long timeout) */
|
/* final void wait(long timeout) */
|
||||||
public void testTimedWait() throws Exception {
|
public void testTimedWait(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("wait", "(J)V")
|
.defaultMethod("wait", "(J)V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -224,14 +234,12 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* final void wait(long timeout, int nanos) */
|
/* final void wait(long timeout, int nanos) */
|
||||||
public void testTimedWait1() throws Exception {
|
public void testTimedWait1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("wait", "(JI)V")
|
.defaultMethod("wait", "(JI)V")
|
||||||
.throw_(TestFailure.class)
|
.throw_(TestFailure.class)
|
||||||
@ -240,7 +248,7 @@ public class ObjectMethodOverridesTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done()
|
b.test().loadClass(I).throws_(IncompatibleClassChangeError.class).done();
|
||||||
.run();
|
b.test().loadClass(C).throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,15 +21,33 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.PrivateMethodsTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
||||||
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,7 +56,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
public class PrivateMethodsTest extends DefMethTest {
|
public class PrivateMethodsTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new PrivateMethodsTest(), args);
|
DefMethTest.runTest(PrivateMethodsTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// invokevirtual & invokeinterface from same/subintf
|
// invokevirtual & invokeinterface from same/subintf
|
||||||
@ -72,9 +94,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: C o = new C(); o.m()I throws VerifyError
|
* TEST: C o = new C(); o.m()I throws VerifyError
|
||||||
*/
|
*/
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
||||||
public void testPrivateInvokeVirtual() {
|
public void testPrivateInvokeVirtual(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -87,9 +107,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(VerifyError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(VerifyError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(VerifyError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(VerifyError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -104,9 +122,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: I o = new C(); o.m()I returns 1
|
* TEST: I o = new C(); o.m()I returns 1
|
||||||
* TEST: C o = new C(); o.m()I returns 1
|
* TEST: C o = new C(); o.m()I returns 1
|
||||||
*/
|
*/
|
||||||
public void testPrivateInvokeIntf() {
|
public void testPrivateInvokeIntf(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -117,9 +133,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done()
|
.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -134,9 +148,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: I o = new C(); o.m()I throws IncompatibleClassChangeError
|
* TEST: I o = new C(); o.m()I throws IncompatibleClassChangeError
|
||||||
* TEST: C o = new C(); o.m()I throws IncompatibleClassChangeError
|
* TEST: C o = new C(); o.m()I throws IncompatibleClassChangeError
|
||||||
*/
|
*/
|
||||||
public void testPrivateInvokeStatic() {
|
public void testPrivateInvokeStatic(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -147,9 +159,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// call from another default method in the same interface
|
// call from another default method in the same interface
|
||||||
@ -165,9 +175,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { I o = new C(); o.m()I == 1; }
|
* TEST: { I o = new C(); o.m()I == 1; }
|
||||||
* TEST: { C o = new C(); o.m()I == 1; }
|
* TEST: { C o = new C(); o.m()I == 1; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateCallSameClass() {
|
public void testPrivateCallSameClass(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -178,9 +186,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done()
|
.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -213,9 +219,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { E o = new E(); o.m()I throws VerifyError; }
|
* TEST: { E o = new E(); o.m()I throws VerifyError; }
|
||||||
*/
|
*/
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
||||||
public void testPrivateCallSubIntf() {
|
public void testPrivateCallSubIntf(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -250,9 +254,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
.test().callSite(D, D, "m", "()I").throws_(NoSuchMethodError.class).done()
|
.test().callSite(D, D, "m", "()I").throws_(NoSuchMethodError.class).done()
|
||||||
|
|
||||||
.test().callSite(L, E, "m", "()I").throws_(VerifyError.class).done()
|
.test().callSite(L, E, "m", "()I").throws_(VerifyError.class).done()
|
||||||
.test().callSite(E, E, "m", "()I").throws_(VerifyError.class).done()
|
.test().callSite(E, E, "m", "()I").throws_(VerifyError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -276,9 +278,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { E o = new E(); o.m()I throws NoSuchMethodError (or VerifyError); }
|
* TEST: { E o = new E(); o.m()I throws NoSuchMethodError (or VerifyError); }
|
||||||
*/
|
*/
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
||||||
public void testPrivateCallImplClass() {
|
public void testPrivateCallImplClass(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("privateM", "()I")
|
.defaultMethod("privateM", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -313,9 +313,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
}
|
}
|
||||||
b.test().callSite(C, C, "m", "()I").throws_(ccExpectedClass).done()
|
b.test().callSite(C, C, "m", "()I").throws_(ccExpectedClass).done()
|
||||||
.test().callSite(D, D, "m", "()I").throws_(VerifyError.class).done()
|
.test().callSite(D, D, "m", "()I").throws_(VerifyError.class).done()
|
||||||
.test().callSite(E, E, "m", "()I").throws_(eeExpectedClass).done()
|
.test().callSite(E, E, "m", "()I").throws_(eeExpectedClass).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// doesn't participate in default method analysis
|
// doesn't participate in default method analysis
|
||||||
@ -332,9 +330,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { I o = new C(); o.m()I throws IllegalAccessError; }
|
* TEST: { I o = new C(); o.m()I throws IllegalAccessError; }
|
||||||
* TEST: { C o = new C(); o.m()I throws NoSuchMethodError; }
|
* TEST: { C o = new C(); o.m()I throws NoSuchMethodError; }
|
||||||
*/
|
*/
|
||||||
public void testPrivate() {
|
public void testPrivate(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -343,9 +339,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(C, C, "m", "()I").throws_(NoSuchMethodError.class).done()
|
.test(). callSite(C, C, "m", "()I").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -361,9 +355,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { I o = new C(); o.m()I == IllegalAccessError; }
|
* TEST: { I o = new C(); o.m()I == IllegalAccessError; }
|
||||||
* TEST: { C o = new C(); o.m()I == 2; }
|
* TEST: { C o = new C(); o.m()I == 2; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateVsConcrete() {
|
public void testPrivateVsConcrete(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -374,9 +366,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(C, C, "m", "()I").returns(2).done()
|
.test(). callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -394,9 +384,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { J o = new C(); o.m()I == 2; }
|
* TEST: { J o = new C(); o.m()I == 2; }
|
||||||
* TEST: { C o = new C(); o.m()I == 2; }
|
* TEST: { C o = new C(); o.m()I == 2; }
|
||||||
*/
|
*/
|
||||||
public void testPublicOverridePrivate() {
|
public void testPublicOverridePrivate(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -411,9 +399,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(J, C, "m", "()I").returns(2).done()
|
.test(). callSite(J, C, "m", "()I").returns(2).done()
|
||||||
.test(). callSite(C, C, "m", "()I").returns(2).done()
|
.test(). callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -431,9 +417,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { J o = new C(); o.m()I == IllegalAccessError; } II J.m priv
|
* TEST: { J o = new C(); o.m()I == IllegalAccessError; } II J.m priv
|
||||||
* TEST: { C o = new C(); o.m()I == 1; }
|
* TEST: { C o = new C(); o.m()I == 1; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateOverrideDefault() {
|
public void testPrivateOverrideDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.returns(1).build()
|
.returns(1).build()
|
||||||
@ -448,9 +432,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().privateCallSite(J, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
.test().privateCallSite(J, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done()
|
.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -468,9 +450,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { J o = new C(); o.m()I throws java/lang/AbstractMethodError; }
|
* TEST: { J o = new C(); o.m()I throws java/lang/AbstractMethodError; }
|
||||||
* TEST: { C o = new C(); o.m()I throws java/lang/AbstractMethodError; }
|
* TEST: { C o = new C(); o.m()I throws java/lang/AbstractMethodError; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateReabstract() {
|
public void testPrivateReabstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -484,9 +464,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
.test(). callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
||||||
.test(). callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
.test(). callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -504,9 +482,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { J o = new C(); o.m()I throws IllegalAccessError }
|
* TEST: { J o = new C(); o.m()I throws IllegalAccessError }
|
||||||
* TEST: { C o = new C(); o.m()I throws AbstractMethodError }
|
* TEST: { C o = new C(); o.m()I throws AbstractMethodError }
|
||||||
*/
|
*/
|
||||||
public void testPrivateOverrideAbstract() {
|
public void testPrivateOverrideAbstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -520,8 +496,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
||||||
.test().privateCallSite(J, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
.test().privateCallSite(J, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -537,9 +512,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { B o = new C(); o.m()I throws NoSuchMethodError }
|
* TEST: { B o = new C(); o.m()I throws NoSuchMethodError }
|
||||||
* TEST: { C o = new C(); o.m()I throws NoSuchMethodError }
|
* TEST: { C o = new C(); o.m()I throws NoSuchMethodError }
|
||||||
*/
|
*/
|
||||||
public void testPrivateInherited() {
|
public void testPrivateInherited(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -550,10 +523,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().privateCallSite(I, C, "m","()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m","()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(B, C, "m","()I").throws_(NoSuchMethodError.class).done()
|
.test(). callSite(B, C, "m","()I").throws_(NoSuchMethodError.class).done()
|
||||||
.test(). callSite(C, C, "m","()I").throws_(NoSuchMethodError.class).done()
|
.test(). callSite(C, C, "m","()I").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -571,9 +541,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { B o = new C(); o.m()I == 2; }
|
* TEST: { B o = new C(); o.m()I == 2; }
|
||||||
* TEST: { C o = new C(); o.m()I == 2; }
|
* TEST: { C o = new C(); o.m()I == 2; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateVsConcreteInherited() {
|
public void testPrivateVsConcreteInherited(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.private_().returns(1).build()
|
.private_().returns(1).build()
|
||||||
@ -587,9 +555,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().privateCallSite(I, C, "m","()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m","()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(B, C, "m","()I").returns(2).done()
|
.test(). callSite(B, C, "m","()I").returns(2).done()
|
||||||
.test(). callSite(C, C, "m","()I").returns(2).done()
|
.test(). callSite(C, C, "m","()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -609,9 +575,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
* TEST: { J o = new C(); o.m()I == 2; }
|
* TEST: { J o = new C(); o.m()I == 2; }
|
||||||
* TEST: { C o = new C(); o.m()I == 2; }
|
* TEST: { C o = new C(); o.m()I == 2; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateConflict() {
|
public void testPrivateConflict(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").private_().returns(1).build()
|
.defaultMethod("m", "()I").private_().returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -624,9 +588,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(I, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
||||||
.test(). callSite(J, C, "m", "()I").returns(2).done()
|
.test(). callSite(J, C, "m", "()I").returns(2).done()
|
||||||
.test(). callSite(C, C, "m", "()I").returns(2).done()
|
.test(). callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* testPrivateSuperClassMethodNoDefaultMethod
|
* testPrivateSuperClassMethodNoDefaultMethod
|
||||||
@ -647,9 +609,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateSuperClassMethodNoDefaultMethod() {
|
public void testPrivateSuperClassMethodNoDefaultMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
ConcreteClass A = b.clazz("A")
|
ConcreteClass A = b.clazz("A")
|
||||||
.concreteMethod("m", "()I").private_().returns(1).build()
|
.concreteMethod("m", "()I").private_().returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -664,9 +624,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
.concreteMethod("m", "()I").public_().returns(2).build()
|
.concreteMethod("m", "()I").public_().returns(2).build()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done();
|
||||||
.run();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -688,9 +646,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateSuperClassMethodDefaultMethod() {
|
public void testPrivateSuperClassMethodDefaultMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
ConcreteClass A = b.clazz("A")
|
ConcreteClass A = b.clazz("A")
|
||||||
.concreteMethod("m", "()I").private_().returns(1).build()
|
.concreteMethod("m", "()I").private_().returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -705,8 +661,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
.concreteMethod("m", "()I").public_().returns(2).build()
|
.concreteMethod("m", "()I").public_().returns(2).build()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -726,9 +681,7 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
* TEST: { B b = new C(); b.m()I throws IllegalAccessError; }
|
||||||
*/
|
*/
|
||||||
public void testPrivateSuperClassMethodDefaultMethodNoOverride() {
|
public void testPrivateSuperClassMethodDefaultMethodNoOverride(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
ConcreteClass A = b.clazz("A")
|
ConcreteClass A = b.clazz("A")
|
||||||
.concreteMethod("m", "()I").private_().returns(1).build()
|
.concreteMethod("m", "()I").private_().returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -741,8 +694,6 @@ public class PrivateMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").extend(B).build();
|
ConcreteClass C = b.clazz("C").extend(B).build();
|
||||||
|
|
||||||
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done()
|
b.test().privateCallSite(B, C, "m", "()I").throws_(IllegalAccessError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
This code is free software; you can redistribute it and/or modify it
|
||||||
@ -121,37 +121,25 @@ OVERVIEW
|
|||||||
- StressTest
|
- StressTest
|
||||||
- SuperCallTest
|
- SuperCallTest
|
||||||
|
|
||||||
Each test group can be executed in different modes. For each mode there's a
|
Additionally, each test enumerates test configurations and run every test case with them.
|
||||||
corresponding scenario in src/vm/runtime/defmeth/scenarios.
|
Test configuration consists of 4 parameters:
|
||||||
|
|
||||||
Scenarios are organized in the following manner:
|
|
||||||
|
|
||||||
.../scenarios/[test_group]_[majorVer]_[methodFlags]_[invocationType]_[shouldRedefine]
|
|
||||||
|
|
||||||
where
|
|
||||||
|
|
||||||
majorVer - major version of class files for generated concrete classes
|
majorVer - major version of class files for generated concrete classes
|
||||||
values: ver49, ver52
|
values: MIN_MAJOR_VER (49) ... MAX_MAJOR_VER (61)
|
||||||
|
|
||||||
methodFlags - additional access flags for methods in generated classes
|
methodFlags - additional access flags for methods in generated classes
|
||||||
values:
|
values: no additional flags, ACC_SYNCHRONIZED
|
||||||
none == no additional flags
|
|
||||||
sync == ACC_SYNCHRONIZED
|
|
||||||
strict == ACC_STRICT
|
|
||||||
syncstrict == ACC_SYNCHRONIZED | ACC_STRICT
|
|
||||||
|
|
||||||
invocationType - how methods in test hiearchies are invoked during testing
|
invocationType - how methods in test hiearchies are invoked during testing
|
||||||
values:
|
DIRECT - invoke* bytecodes
|
||||||
direct - using invoke* bytecodes
|
REFLECTION - Reflection API
|
||||||
reflect - using Reflection API
|
INDY - invokedynamic bytecode
|
||||||
invoke - using invokedynamic & java.lang.invoke API (MethodHandles/JSR292)
|
INVOKE_EXACT - MethodHandle.invokeExact()
|
||||||
|
INVOKE_GENERIC - MethodHandle.invoke()
|
||||||
|
INVOKE_WITH_ARGS - MethodHandle.invokeWithArguments()
|
||||||
|
|
||||||
redefine - whether to preload and redefine classes before running individual tests
|
redefine - whether to preload and redefine classes before running individual tests
|
||||||
values: redefine, noredefine
|
values: false, true
|
||||||
|
|
||||||
testGroup - name of test group being used
|
|
||||||
values: BasicTests/BridgeMethod/etc
|
|
||||||
|
|
||||||
|
|
||||||
STRESS TESTING
|
STRESS TESTING
|
||||||
|
|
||||||
|
@ -21,14 +21,29 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.RedefineTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import nsk.share.Pair;
|
import nsk.share.Pair;
|
||||||
import nsk.share.TestFailure;
|
|
||||||
import nsk.share.test.TestBase;
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.DefMethTestFailure;
|
import vm.runtime.defmeth.shared.DefMethTestFailure;
|
||||||
import vm.runtime.defmeth.shared.MemoryClassLoader;
|
import vm.runtime.defmeth.shared.MemoryClassLoader;
|
||||||
@ -39,6 +54,8 @@ import vm.runtime.defmeth.shared.data.Clazz;
|
|||||||
import vm.runtime.defmeth.shared.data.ConcreteClass;
|
import vm.runtime.defmeth.shared.data.ConcreteClass;
|
||||||
import vm.runtime.defmeth.shared.data.Interface;
|
import vm.runtime.defmeth.shared.data.Interface;
|
||||||
import vm.runtime.defmeth.shared.data.Tester;
|
import vm.runtime.defmeth.shared.data.Tester;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -47,7 +64,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
public class RedefineTest extends DefMethTest {
|
public class RedefineTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new RedefineTest(), args);
|
DefMethTest.runTest(RedefineTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(true),
|
||||||
|
/* execMode */ Set.of(DIRECT, INVOKE_EXACT, INVOKE_GENERIC, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,8 +77,7 @@ public class RedefineTest extends DefMethTest {
|
|||||||
// so scenarios on class redefinition don't work
|
// so scenarios on class redefinition don't work
|
||||||
String mode = factory.getExecutionMode();
|
String mode = factory.getExecutionMode();
|
||||||
if ("REFLECTION".equals(mode) || "INVOKE_WITH_ARGS".equals(mode)) {
|
if ("REFLECTION".equals(mode) || "INVOKE_WITH_ARGS".equals(mode)) {
|
||||||
throw new TestFailure("RedefineTest isn't applicable to reflection-based execution scenario " +
|
getLog().warn("RedefineTest isn't applicable to reflection-based execution scenario (REDEFINE & INVOKE_WITH_ARGS).");
|
||||||
"(REDEFINE & INVOKE_WITH_ARGS).");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,17 +21,31 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.StaticMethodsTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.builder.TesterBuilder;
|
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
||||||
|
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PRIVATE;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC;
|
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.Invoke.*;
|
||||||
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
import static vm.runtime.defmeth.shared.data.method.body.CallMethod.IndexbyteOp.*;
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
@ -42,7 +56,11 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
public class StaticMethodsTest extends DefMethTest {
|
public class StaticMethodsTest extends DefMethTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestBase.runTest(new StaticMethodsTest(), args);
|
DefMethTest.runTest(StaticMethodsTest.class,
|
||||||
|
/* majorVer */ Set.of(MIN_MAJOR_VER, MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// static method in interface
|
// static method in interface
|
||||||
@ -55,9 +73,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testStaticMethod() {
|
public void testStaticMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -65,9 +81,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "m", "()I").returns(1).done()
|
b.test().staticCallSite(I, "m", "()I").returns(1).done();
|
||||||
|
b.test().staticCallSite(C, "m", "()I").throws_(NoSuchMethodError.class).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// invoke[virtual|interface|special] from same/subintf
|
// invoke[virtual|interface|special] from same/subintf
|
||||||
@ -81,9 +96,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testInvokeVirtual() {
|
public void testInvokeVirtual(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("staticM", "()I")
|
.defaultMethod("staticM", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -95,12 +108,10 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "staticM", "()I").returns(1).done()
|
b.test().staticCallSite(I, "staticM", "()I").returns(1).done();
|
||||||
|
|
||||||
.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -113,9 +124,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testInvokeIntf() {
|
public void testInvokeIntf(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("staticM", "()I")
|
.defaultMethod("staticM", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -126,12 +135,10 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "staticM", "()I").returns(1).done()
|
b.test().staticCallSite(I, "staticM", "()I").returns(1).done();
|
||||||
|
|
||||||
.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -144,9 +151,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testInvokeSpecial() {
|
public void testInvokeSpecial(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("staticM", "()I")
|
.defaultMethod("staticM", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -157,12 +162,10 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "staticM", "()I").returns(1).done()
|
b.test().staticCallSite(I, "staticM", "()I").returns(1).done();
|
||||||
|
|
||||||
.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -175,9 +178,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testStaticVsDefault() {
|
public void testStaticVsDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -187,16 +188,14 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I).build();
|
ConcreteClass C = b.clazz("C").implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "m", "()I").throws_(ClassFormatError.class).done()
|
b.test().staticCallSite(I, "m", "()I").throws_(ClassFormatError.class).done();
|
||||||
|
|
||||||
// FIXME: throws exception during an attempt to lookup Test2.test() method
|
// FIXME: throws exception during an attempt to lookup Test2.test() method
|
||||||
|
|
||||||
// Invalid test. ClassFormatError is thrown at verification time, rather
|
// Invalid test. ClassFormatError is thrown at verification time, rather
|
||||||
// than execution time.
|
// than execution time.
|
||||||
// .test().callSite(I, C, "m", "()I").throws_(ClassFormatError.class).done()
|
// .test().callSite(I, C, "m", "()I").throws_(ClassFormatError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(ClassFormatError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(ClassFormatError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// call static method from default method
|
// call static method from default method
|
||||||
@ -212,9 +211,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testInvokeFromDefaultMethod() throws Exception {
|
public void testInvokeFromDefaultMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("staticPublicM", "()I")
|
.defaultMethod("staticPublicM", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -240,9 +237,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
// call private static method from default method
|
// call private static method from default method
|
||||||
.test().callSite(I, C, "invokePrivate", "()I").returns(1).done()
|
.test().callSite(I, C, "invokePrivate", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "invokePrivate", "()I").returns(1).done()
|
.test().callSite(C, C, "invokePrivate", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// call static method from implementing subclass
|
// call static method from implementing subclass
|
||||||
@ -264,11 +259,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* C c = new C(); c.invokePrivate() ==> IAE or if -ver < 52, IAE or VerifyError
|
* C c = new C(); c.invokePrivate() ==> IAE or if -ver < 52, IAE or VerifyError
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets error during loading
|
||||||
public void testInvokeFromSubclass() throws Exception {
|
public void testInvokeFromSubclass(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("staticPublicM", "()I")
|
.defaultMethod("staticPublicM", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -297,7 +289,6 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
b.test().callSite(C, C, "invokePublic", "()I").throws_(VerifyError.class).done()
|
b.test().callSite(C, C, "invokePublic", "()I").throws_(VerifyError.class).done()
|
||||||
.test().callSite(C, C, "invokePrivate", "()I").throws_(VerifyError.class).done();
|
.test().callSite(C, C, "invokePrivate", "()I").throws_(VerifyError.class).done();
|
||||||
}
|
}
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static method doesn't participate in default method analysis:
|
// static method doesn't participate in default method analysis:
|
||||||
@ -311,9 +302,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* class C implements I {}
|
* class C implements I {}
|
||||||
*/
|
*/
|
||||||
public void testNotInherited() {
|
public void testNotInherited(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -331,7 +320,6 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
// invokeinterface to static method ==> ICCE
|
// invokeinterface to static method ==> ICCE
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -347,9 +335,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* TEST: I o = new C(); o.m()I throws ICCE
|
* TEST: I o = new C(); o.m()I throws ICCE
|
||||||
* TEST: C o = new C(); o.m()I == 2
|
* TEST: C o = new C(); o.m()I == 2
|
||||||
*/
|
*/
|
||||||
public void testDefaultVsConcrete() {
|
public void testDefaultVsConcrete(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -367,8 +353,6 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.test().callSite(C, C, "m", "()I").returns(2).done();
|
b.test().callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -385,9 +369,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* class C implements J {
|
* class C implements J {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
public void testOverrideStatic() {
|
public void testOverrideStatic(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -400,18 +382,16 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(J).build();
|
ConcreteClass C = b.clazz("C").implement(J).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "m", "()I").returns(1).done()
|
b.test().staticCallSite(I, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.test().callSite(J, C, "m", "()I").returns(2).done()
|
b.test().callSite(J, C, "m", "()I").returns(2).done();
|
||||||
.test().callSite(C, C, "m", "()I").returns(2).done();
|
b.test().callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done();
|
b.test().callSite(I, C, "m", "()I").returns(1).done();
|
||||||
} else {
|
} else {
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -431,9 +411,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* TEST: J o = new C(); o.m()I == ICCE
|
* TEST: J o = new C(); o.m()I == ICCE
|
||||||
* TEST: C o = new C(); o.m()I == 1
|
* TEST: C o = new C(); o.m()I == 1
|
||||||
*/
|
*/
|
||||||
public void testOverrideDefault() {
|
public void testOverrideDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.returns(1).build()
|
.returns(1).build()
|
||||||
@ -446,8 +424,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(J).build();
|
ConcreteClass C = b.clazz("C").implement(J).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done();
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done();
|
b.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
// Reflection correctly finds the static method defined in J and
|
// Reflection correctly finds the static method defined in J and
|
||||||
@ -456,8 +434,6 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
} else {
|
} else {
|
||||||
b.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -478,9 +454,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* TEST: J o = new C(); o.m()I throws AME
|
* TEST: J o = new C(); o.m()I throws AME
|
||||||
* TEST: C o = new C(); o.m()I throws AME
|
* TEST: C o = new C(); o.m()I throws AME
|
||||||
*/
|
*/
|
||||||
public void testReabstract() {
|
public void testReabstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -498,10 +472,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.test().callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
b.test().callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
b.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -522,9 +494,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* -mode reflect returns 1
|
* -mode reflect returns 1
|
||||||
* TEST: C o = new C(); o.m()I throws AME
|
* TEST: C o = new C(); o.m()I throws AME
|
||||||
*/
|
*/
|
||||||
public void testOverrideAbstract() {
|
public void testOverrideAbstract(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -536,16 +506,14 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(J).build();
|
ConcreteClass C = b.clazz("C").implement(J).build();
|
||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
b.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
b.test().callSite(J, C, "m", "()I").returns(1).done();
|
b.test().callSite(J, C, "m", "()I").returns(1).done();
|
||||||
} else {
|
} else {
|
||||||
b.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -564,9 +532,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* TEST: B o = new C(); o.m()I throws NoSuchMethodError
|
* TEST: B o = new C(); o.m()I throws NoSuchMethodError
|
||||||
* TEST: C o = new C(); o.m()I throws NoSuchMethodError
|
* TEST: C o = new C(); o.m()I throws NoSuchMethodError
|
||||||
*/
|
*/
|
||||||
public void testInheritedDefault() {
|
public void testInheritedDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -575,16 +541,14 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
ConcreteClass B = b.clazz("B").implement(I).build();
|
ConcreteClass B = b.clazz("B").implement(I).build();
|
||||||
ConcreteClass C = b.clazz("C").extend(B).build();
|
ConcreteClass C = b.clazz("C").extend(B).build();
|
||||||
|
|
||||||
b.test().callSite(B, C, "m","()I").throws_(NoSuchMethodError.class).done()
|
b.test().callSite(B, C, "m","()I").throws_(NoSuchMethodError.class).done();
|
||||||
.test().callSite(C, C, "m","()I").throws_(NoSuchMethodError.class).done();
|
b.test().callSite(C, C, "m","()I").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
b.test().callSite(I, C, "m","()I").returns(1).done();
|
b.test().callSite(I, C, "m","()I").returns(1).done();
|
||||||
} else {
|
} else {
|
||||||
b.test().callSite(I, C, "m","()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m","()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -601,9 +565,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* class C extends B implements I {}
|
* class C extends B implements I {}
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void testDefaultVsConcreteInherited() {
|
public void testDefaultVsConcreteInherited(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -615,18 +577,16 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").extend(B).implement(I).build();
|
ConcreteClass C = b.clazz("C").extend(B).implement(I).build();
|
||||||
|
|
||||||
b.test().staticCallSite(I, "m","()I").returns(1).done()
|
b.test().staticCallSite(I, "m","()I").returns(1).done();
|
||||||
|
|
||||||
.test().callSite(B, C, "m","()I").returns(2).done()
|
b.test().callSite(B, C, "m","()I").returns(2).done();
|
||||||
.test().callSite(C, C, "m","()I").returns(2).done();
|
b.test().callSite(C, C, "m","()I").returns(2).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
b.test().callSite(I, C, "m","()I").returns(1).done();
|
b.test().callSite(I, C, "m","()I").returns(1).done();
|
||||||
} else {
|
} else {
|
||||||
b.test().callSite(I, C, "m","()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m","()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -647,9 +607,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* TEST: J o = new C(); o.m()I == 2
|
* TEST: J o = new C(); o.m()I == 2
|
||||||
* TEST: C o = new C(); o.m()I == 2
|
* TEST: C o = new C(); o.m()I == 2
|
||||||
*/
|
*/
|
||||||
public void testDefaultVsStaticConflict() {
|
public void testDefaultVsStaticConflict(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.static_().public_().returns(1).build()
|
.static_().public_().returns(1).build()
|
||||||
@ -661,16 +619,14 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(I,J).build();
|
ConcreteClass C = b.clazz("C").implement(I,J).build();
|
||||||
|
|
||||||
b.test().callSite(J, C, "m", "()I").returns(2).done()
|
b.test().callSite(J, C, "m", "()I").returns(2).done();
|
||||||
.test().callSite(C, C, "m", "()I").returns(2).done();
|
b.test().callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
if (factory.getExecutionMode().equals("REFLECTION")) {
|
if (factory.getExecutionMode().equals("REFLECTION")) {
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done();
|
b.test().callSite(I, C, "m", "()I").returns(1).done();
|
||||||
} else {
|
} else {
|
||||||
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -690,9 +646,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* -mode reflect returns 2
|
* -mode reflect returns 2
|
||||||
* TEST: I o = new C(); o.m()I == 1
|
* TEST: I o = new C(); o.m()I == 1
|
||||||
*/
|
*/
|
||||||
public void testStaticSuperClassVsDefaultSuperInterface() {
|
public void testStaticSuperClassVsDefaultSuperInterface(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.public_().returns(1).build()
|
.public_().returns(1).build()
|
||||||
@ -712,9 +666,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
} else {
|
} else {
|
||||||
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* testStaticLocalVsDefaultSuperInterface
|
* testStaticLocalVsDefaultSuperInterface
|
||||||
*
|
*
|
||||||
@ -732,9 +685,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
* -mode reflect returns 2
|
* -mode reflect returns 2
|
||||||
* TEST: I o = new A(); o.m()I == 1
|
* TEST: I o = new A(); o.m()I == 1
|
||||||
*/
|
*/
|
||||||
public void testStaticLocalVsDefaultSuperInterface() {
|
public void testStaticLocalVsDefaultSuperInterface(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.public_().returns(1).build()
|
.public_().returns(1).build()
|
||||||
@ -757,9 +708,8 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
b.test().callSite(A, A, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
b.test().callSite(A, A, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
}
|
}
|
||||||
|
|
||||||
b.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* testConflictingDefaultsandStaticMethod
|
* testConflictingDefaultsandStaticMethod
|
||||||
* @bug 8033150
|
* @bug 8033150
|
||||||
@ -780,9 +730,7 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: C.m(); should call A.m, return value = 3
|
* TEST: C.m(); should call A.m, return value = 3
|
||||||
*/
|
*/
|
||||||
public void testConflictingDefaultsandStaticMethod() {
|
public void testConflictingDefaultsandStaticMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I")
|
.defaultMethod("m", "()I")
|
||||||
.public_().returns(1).build()
|
.public_().returns(1).build()
|
||||||
@ -800,7 +748,6 @@ public class StaticMethodsTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").extend(A).build();
|
ConcreteClass C = b.clazz("C").extend(A).build();
|
||||||
|
|
||||||
b.test().staticCallSite(C, "m", "()I").returns(3).done()
|
b.test().staticCallSite(C, "m", "()I").returns(3).done();
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,24 +21,43 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
*
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.StressTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import nsk.share.TestFailure;
|
import nsk.share.TestFailure;
|
||||||
import nsk.share.test.StressOptions;
|
import nsk.share.test.StressOptions;
|
||||||
import nsk.share.test.Stresser;
|
import nsk.share.test.Stresser;
|
||||||
import vm.runtime.defmeth.shared.Constants;
|
import vm.runtime.defmeth.shared.Constants;
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.ExecutionMode;
|
import vm.runtime.defmeth.shared.ExecutionMode;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
|
||||||
import vm.share.options.Option;
|
import vm.share.options.Option;
|
||||||
import vm.share.options.OptionSupport;
|
import vm.share.options.OptionSupport;
|
||||||
import vm.share.options.Options;
|
import vm.share.options.Options;
|
||||||
import jdk.test.lib.Utils;
|
import jdk.test.lib.Utils;
|
||||||
|
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
|
import static vm.runtime.defmeth.shared.DefMethTest.MAX_MAJOR_VER;
|
||||||
|
import static vm.runtime.defmeth.shared.DefMethTest.MIN_MAJOR_VER;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stress test for default methods implementation.
|
* Stress test for default methods implementation.
|
||||||
@ -57,11 +76,8 @@ public class StressTest implements Runnable {
|
|||||||
@Option(name="seed", default_value="0", description="force deterministic behavior")
|
@Option(name="seed", default_value="0", description="force deterministic behavior")
|
||||||
private long seed;
|
private long seed;
|
||||||
|
|
||||||
@Option(name="redefine", default_value="false", description="use scenarios w/ class redefinition")
|
@Option(name="noredefine", default_value="false", description="skip scenarios w/ class redefinition")
|
||||||
private boolean doRedefine;
|
private boolean noRedefine;
|
||||||
|
|
||||||
@Option(name="ver", default_value="49", description="minimum class file version to be used in the tests")
|
|
||||||
private int minMajorVer;
|
|
||||||
|
|
||||||
@Option(name="ignoreTestFailures", default_value="false", description="ignore failures of the executed tests")
|
@Option(name="ignoreTestFailures", default_value="false", description="ignore failures of the executed tests")
|
||||||
private boolean ignoreTestFailures;
|
private boolean ignoreTestFailures;
|
||||||
@ -140,23 +156,18 @@ public class StressTest implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void configureTests() {
|
private void configureTests() {
|
||||||
int[] majorVerValues = new int[52 - minMajorVer + 1];
|
int[] majorVerValues = new int[MAX_MAJOR_VER - MIN_MAJOR_VER + 1];
|
||||||
for (int i = 0; i< majorVerValues.length; i++) {
|
for (int i = 0; i< majorVerValues.length; i++) {
|
||||||
majorVerValues[i] = minMajorVer + i;
|
majorVerValues[i] = MIN_MAJOR_VER + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] flagsValues = new int[] {
|
int[] flagsValues = new int[] {0, ACC_SYNCHRONIZED};
|
||||||
0,
|
|
||||||
ACC_STRICT,
|
|
||||||
ACC_SYNCHRONIZED,
|
|
||||||
ACC_STRICT | ACC_SYNCHRONIZED
|
|
||||||
};
|
|
||||||
|
|
||||||
boolean[] doRedefineValues;
|
boolean[] doRedefineValues;
|
||||||
if (doRedefine) {
|
if (noRedefine) {
|
||||||
doRedefineValues = new boolean[] { true, false};
|
|
||||||
} else {
|
|
||||||
doRedefineValues = new boolean[] { false };
|
doRedefineValues = new boolean[] { false };
|
||||||
|
} else {
|
||||||
|
doRedefineValues = new boolean[] { false, true };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upper limit for test count
|
// Upper limit for test count
|
||||||
@ -188,7 +199,7 @@ public class StressTest implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DefMethTest test = testClass.newInstance();
|
DefMethTest test = testClass.getDeclaredConstructor().newInstance();
|
||||||
|
|
||||||
OptionSupport.setup(test, new String[] {
|
OptionSupport.setup(test, new String[] {
|
||||||
"-execMode", mode.toString(),
|
"-execMode", mode.toString(),
|
||||||
@ -199,7 +210,7 @@ public class StressTest implements Runnable {
|
|||||||
"-failfast"});
|
"-failfast"});
|
||||||
|
|
||||||
testlist.add(test);
|
testlist.add(test);
|
||||||
} catch (InstantiationException | IllegalAccessException ex) {
|
} catch (ReflectiveOperationException ex) {
|
||||||
throw new TestFailure(ex);
|
throw new TestFailure(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,31 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
*
|
||||||
|
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
||||||
|
* @library /vmTestbase /test/lib
|
||||||
|
*
|
||||||
|
* @comment build retransform.jar in current dir
|
||||||
|
* @run driver vm.runtime.defmeth.shared.BuildJar
|
||||||
|
*
|
||||||
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
|
* @run main/othervm/native
|
||||||
|
* -agentlib:redefineClasses
|
||||||
|
* -javaagent:retransform.jar
|
||||||
|
* vm.runtime.defmeth.SuperCallTest
|
||||||
|
*/
|
||||||
package vm.runtime.defmeth;
|
package vm.runtime.defmeth;
|
||||||
|
|
||||||
import nsk.share.test.TestBase;
|
import java.util.Set;
|
||||||
|
|
||||||
import vm.runtime.defmeth.shared.DefMethTest;
|
import vm.runtime.defmeth.shared.DefMethTest;
|
||||||
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
import vm.runtime.defmeth.shared.annotation.NotApplicableFor;
|
||||||
import vm.runtime.defmeth.shared.data.*;
|
import vm.runtime.defmeth.shared.data.*;
|
||||||
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
import vm.runtime.defmeth.shared.builder.TestBuilder;
|
||||||
|
|
||||||
|
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED;
|
||||||
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -43,7 +61,6 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
* where the interface is a direct supertype of the current class (the current class
|
* where the interface is a direct supertype of the current class (the current class
|
||||||
* must directly implement <interface-name>).
|
* must directly implement <interface-name>).
|
||||||
*
|
*
|
||||||
* 0.6.3 JVMS draft for JDK8 updated.
|
|
||||||
* Invokespecial on any superinterface method will run interface method
|
* Invokespecial on any superinterface method will run interface method
|
||||||
* resolution, and then the selected method will be set to the resolved method.
|
* resolution, and then the selected method will be set to the resolved method.
|
||||||
* super defaults no longer check for lack of shadowing, other languages
|
* super defaults no longer check for lack of shadowing, other languages
|
||||||
@ -51,22 +68,26 @@ import static vm.runtime.defmeth.shared.ExecutionMode.*;
|
|||||||
*/
|
*/
|
||||||
public class SuperCallTest extends DefMethTest {
|
public class SuperCallTest extends DefMethTest {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
DefMethTest.runTest(SuperCallTest.class,
|
||||||
|
/* majorVer */ Set.of(MAX_MAJOR_VER),
|
||||||
|
/* flags */ Set.of(0, ACC_SYNCHRONIZED),
|
||||||
|
/* redefine */ Set.of(false, true),
|
||||||
|
/* execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
// Since invoke-super-default relies on new semantics of invokespecial,
|
// Since invoke-super-default relies on new semantics of invokespecial,
|
||||||
// the tests are applicable only to class files of 52 version.
|
// the tests are applicable only to class files of 52 version.
|
||||||
if (factory.getVer() != 52) {
|
if (factory.getVer() < 52) {
|
||||||
getLog().warn("WARN: SuperCallTest is applicable only for class files w/ version 52.");
|
getLog().warn("WARN: SuperCallTest is applicable only for class files w/ version >=52.");
|
||||||
getLog().warn("WARN: Overriding \"-ver " + factory.getVer() + "\" w/ \"-ver 52\".");
|
getLog().warn("WARN: Overriding \"-ver " + factory.getVer() + "\" w/ \"-ver 52\".");
|
||||||
|
|
||||||
factory.setVer(52);
|
factory.setVer(52);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
TestBase.runTest(new SuperCallTest(), args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Basic case
|
* Basic case
|
||||||
*
|
*
|
||||||
@ -77,9 +98,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == 88;
|
* TEST: C c = new C(); c.m() == 88;
|
||||||
* TEST: I i = new C(); i.m() == 88;
|
* TEST: I i = new C(); i.m() == 88;
|
||||||
*/
|
*/
|
||||||
public void testSuperBasic1() {
|
public void testSuperBasic1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -92,9 +111,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(J, C, "m", "()I").returns(1).done()
|
.test().callSite(J, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done()
|
.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -115,9 +132,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: L l = new D(); l.m() == 1
|
* TEST: L l = new D(); l.m() == 1
|
||||||
* TEST: D d = new D(); d.m() == 1
|
* TEST: D d = new D(); d.m() == 1
|
||||||
*/
|
*/
|
||||||
public void testSuperConflictResolution() {
|
public void testSuperConflictResolution(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface K = b.intf("K")
|
Interface K = b.intf("K")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -144,9 +159,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
.test().callSite(K, D, "m", "()I").returns(1).done()
|
.test().callSite(K, D, "m", "()I").returns(1).done()
|
||||||
.test().callSite(L, D, "m", "()I").returns(1).done()
|
.test().callSite(L, D, "m", "()I").returns(1).done()
|
||||||
.test().callSite(D, D, "m", "()I").returns(1).done()
|
.test().callSite(D, D, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -181,9 +194,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: D o = new D(); o.k()I == 1
|
* TEST: D o = new D(); o.k()I == 1
|
||||||
* TEST: D o = new D(); o.l()I == 2
|
* TEST: D o = new D(); o.l()I == 2
|
||||||
*/
|
*/
|
||||||
public void testSuperConflictDiffMethod() {
|
public void testSuperConflictDiffMethod(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface K = b.intf("K")
|
Interface K = b.intf("K")
|
||||||
.defaultMethod("m", "(I)I").returns(1).build()
|
.defaultMethod("m", "(I)I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -218,9 +229,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.test().callSite(D, D, "m", "(I)I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(D, D, "m", "(I)I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
|
|
||||||
.test().callSite(D, D, "k", "()I").returns(1).done()
|
.test().callSite(D, D, "k", "()I").returns(1).done()
|
||||||
.test().callSite(D, D, "l", "()I").returns(2).done()
|
.test().callSite(D, D, "l", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -238,9 +247,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: I i = new C(); i.m() ==> ICCE
|
* TEST: I i = new C(); i.m() ==> ICCE
|
||||||
* TEST: C c = new C(); c.m() ==> ICCE
|
* TEST: C c = new C(); c.m() ==> ICCE
|
||||||
*/
|
*/
|
||||||
public void testSuperConflict() {
|
public void testSuperConflict(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface K = b.intf("K")
|
Interface K = b.intf("K")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -261,9 +268,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.test().callSite(L, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(L, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(J, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(I, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -276,9 +281,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() ==> 1
|
* TEST: C c = new C(); c.m() ==> 1
|
||||||
* TEST: J j = new C(); j.m() ==> 1
|
* TEST: J j = new C(); j.m() ==> 1
|
||||||
*/
|
*/
|
||||||
public void testSuperDisqual() {
|
public void testSuperDisqual(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -293,9 +296,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
b.test().callSite(I, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(J, C, "m", "()I").returns(1).done()
|
.test().callSite(J, C, "m", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(1).done()
|
.test().callSite(C, C, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -312,9 +313,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() ==> AME
|
* TEST: C c = new C(); c.m() ==> AME
|
||||||
* TEST: K k = new D(); k.m() ==> NSME
|
* TEST: K k = new D(); k.m() ==> NSME
|
||||||
*/
|
*/
|
||||||
public void testSuperNull() {
|
public void testSuperNull(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -333,9 +332,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
b.test().callSite(I, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
||||||
.test().callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
.test().callSite(J, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(AbstractMethodError.class).done()
|
||||||
.test().callSite(K, D, "m", "()I").throws_(NoSuchMethodError.class).done()
|
.test().callSite(K, D, "m", "()I").throws_(NoSuchMethodError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -351,9 +348,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m(new Object()) == 1;
|
* TEST: C c = new C(); c.m(new Object()) == 1;
|
||||||
* TEST: C c = new C(); c.m("") == 1;
|
* TEST: C c = new C(); c.m("") == 1;
|
||||||
*/
|
*/
|
||||||
public void testSuperGeneric() {
|
public void testSuperGeneric(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
// interface I<T> {
|
// interface I<T> {
|
||||||
// default int m(T t) { return 1; }
|
// default int m(T t) { return 1; }
|
||||||
// }
|
// }
|
||||||
@ -378,9 +373,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.test().callSite(J, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
.test().callSite(J, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
||||||
|
|
||||||
.test().callSite(C, C, "m", "(Ljava/lang/Object;)I").returns(1).done()
|
.test().callSite(C, C, "m", "(Ljava/lang/Object;)I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
.test().callSite(C, C, "m", "(Ljava/lang/String;)I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -392,9 +385,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
*
|
*
|
||||||
* TEST: C c = new C(); c.m("string") == 1
|
* TEST: C c = new C(); c.m("string") == 1
|
||||||
*/
|
*/
|
||||||
public void testSuperGenericDisqual() {
|
public void testSuperGenericDisqual(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I").sig("<T:Ljava/lang/Object;>Ljava/lang/Object;")
|
Interface I = b.intf("I").sig("<T:Ljava/lang/Object;>Ljava/lang/Object;")
|
||||||
.defaultMethod("m", "(Ljava/lang/Object;)I").sig("(TT;)I").returns(1).build()
|
.defaultMethod("m", "(Ljava/lang/Object;)I").sig("(TT;)I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -415,9 +406,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.test().callSite(J, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
.test().callSite(J, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
||||||
|
|
||||||
.test().callSite(C, C, "m", "(Ljava/lang/Object;)I").returns(1).done()
|
.test().callSite(C, C, "m", "(Ljava/lang/Object;)I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "(Ljava/lang/String;)I").returns(1).done()
|
.test().callSite(C, C, "m", "(Ljava/lang/String;)I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -429,9 +418,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C d = new D(); d.m() == 1
|
* TEST: C d = new D(); d.m() == 1
|
||||||
* TEST: D d = new D(); d.m() == 1
|
* TEST: D d = new D(); d.m() == 1
|
||||||
*/
|
*/
|
||||||
public void testSuperNonDefault() {
|
public void testSuperNonDefault(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
ConcreteClass C = b.clazz("C")
|
ConcreteClass C = b.clazz("C")
|
||||||
.concreteMethod("m", "()I").returns(1).build()
|
.concreteMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -441,9 +428,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().callSite(C, D, "m", "()I").returns(1).done()
|
b.test().callSite(C, D, "m", "()I").returns(1).done()
|
||||||
.test().callSite(D, D, "m", "()I").returns(1).done()
|
.test().callSite(D, D, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -461,9 +446,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C e = new E(); e.m() == 1
|
* TEST: C e = new E(); e.m() == 1
|
||||||
* TEST: E e = new E(); e.m() == 1
|
* TEST: E e = new E(); e.m() == 1
|
||||||
*/
|
*/
|
||||||
public void testSuperNonDefault1() {
|
public void testSuperNonDefault1(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.abstractMethod("m", "()I").build()
|
.abstractMethod("m", "()I").build()
|
||||||
.build();
|
.build();
|
||||||
@ -486,9 +469,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
.test().callSite(I, E, "m", "()I").returns(1).done()
|
.test().callSite(I, E, "m", "()I").returns(1).done()
|
||||||
.test().callSite(C, E, "m", "()I").returns(1).done()
|
.test().callSite(C, E, "m", "()I").returns(1).done()
|
||||||
.test().callSite(E, E, "m", "()I").returns(1).done()
|
.test().callSite(E, E, "m", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -507,9 +488,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C e = new E(); e.m() == 2
|
* TEST: C e = new E(); e.m() == 2
|
||||||
* TEST: E e = new E(); e.m() == 2
|
* TEST: E e = new E(); e.m() == 2
|
||||||
*/
|
*/
|
||||||
public void testSuperNonDefault2() {
|
public void testSuperNonDefault2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -532,9 +511,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
.test().callSite(I, E, "m", "()I").returns(2).done()
|
.test().callSite(I, E, "m", "()I").returns(2).done()
|
||||||
.test().callSite(C, E, "m", "()I").returns(2).done()
|
.test().callSite(C, E, "m", "()I").returns(2).done()
|
||||||
.test().callSite(E, E, "m", "()I").returns(2).done()
|
.test().callSite(E, E, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -549,9 +526,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.q() == 1;
|
* TEST: C c = new C(); c.q() == 1;
|
||||||
* TEST: C c = new C(); c.r() == 2;
|
* TEST: C c = new C(); c.r() == 2;
|
||||||
*/
|
*/
|
||||||
public void testDisambig() {
|
public void testDisambig(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -567,9 +542,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "r", "()I").returns(2).done()
|
.test().callSite(C, C, "r", "()I").returns(2).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -586,9 +559,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.q() == 1;
|
* TEST: C c = new C(); c.q() == 1;
|
||||||
* TEST: C c = new C(); c.r() == 2;
|
* TEST: C c = new C(); c.r() == 2;
|
||||||
*/
|
*/
|
||||||
public void testDisambig2() {
|
public void testDisambig2(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -608,9 +579,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "r", "()I").returns(2).done()
|
.test().callSite(C, C, "r", "()I").returns(2).done()
|
||||||
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -624,9 +593,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == 2
|
* TEST: C c = new C(); c.m() == 2
|
||||||
* TEST: C c = new C(); c.q() == 1
|
* TEST: C c = new C(); c.q() == 1
|
||||||
*/
|
*/
|
||||||
public void testResolvedShadowed() {
|
public void testResolvedShadowed(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -643,9 +610,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().callSite(C, C, "m", "()I").returns(2).done()
|
b.test().callSite(C, C, "m", "()I").returns(2).done()
|
||||||
.test().callSite(C, C, "q", "()I").returns(1).done()
|
.test().callSite(C, C, "q", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -659,9 +624,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.q() == 1
|
* TEST: C c = new C(); c.q() == 1
|
||||||
* TEST: C c = new C(); c.m() == 2
|
* TEST: C c = new C(); c.m() == 2
|
||||||
*/
|
*/
|
||||||
public void testResolvedButSuperClass() {
|
public void testResolvedButSuperClass(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -678,9 +641,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
b.test().callSite(C, C, "q", "()I").returns(1).done()
|
||||||
.test().callSite(C, C, "m", "()I").returns(2).done()
|
.test().callSite(C, C, "m", "()I").returns(2).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -695,9 +656,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: C c = new C(); c.m() == ICCE
|
* TEST: C c = new C(); c.m() == ICCE
|
||||||
* TEST: C c = new C(); c.q() == 1
|
* TEST: C c = new C(); c.q() == 1
|
||||||
*/
|
*/
|
||||||
public void testResolved1Caller2NotShadowed() {
|
public void testResolved1Caller2NotShadowed(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -716,16 +675,14 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
b.test().callSite(C, C, "m", "()I").throws_(IncompatibleClassChangeError.class).done()
|
||||||
.test().callSite(C, C, "q", "()I").returns(1).done()
|
.test().callSite(C, C, "q", "()I").returns(1).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test validity of invokespecial on indirect superinterface's method,
|
* Test validity of invokespecial on indirect superinterface's method,
|
||||||
* this test should receive a verification error.
|
* this test should receive a verification error.
|
||||||
*
|
*
|
||||||
* (JVMS draft 0.7.0) JVMS 4.9.2 Structural Constraints
|
* JVMS-4.9.2 Structural Constraints
|
||||||
* Each invokespecial instruction must name an instance initialization
|
* Each invokespecial instruction must name an instance initialization
|
||||||
* method (2.9), or must reference a method in the current class or interface,
|
* method (2.9), or must reference a method in the current class or interface,
|
||||||
* a method in a superclass of the current class or interface, or a method
|
* a method in a superclass of the current class or interface, or a method
|
||||||
@ -746,9 +703,7 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
* TEST: K k = new C(); k.m() == VerifyError
|
* TEST: K k = new C(); k.m() == VerifyError
|
||||||
*/
|
*/
|
||||||
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets VerifyError
|
@NotApplicableFor(modes = { REDEFINITION }) // Can't redefine a class that gets VerifyError
|
||||||
public void testSuperInvalidIndirectInterfaceMethodInvokeSpecial() {
|
public void testSuperInvalidIndirectInterfaceMethodInvokeSpecial(TestBuilder b) {
|
||||||
TestBuilder b = factory.getBuilder();
|
|
||||||
|
|
||||||
Interface I = b.intf("I")
|
Interface I = b.intf("I")
|
||||||
.defaultMethod("m", "()I").returns(1).build()
|
.defaultMethod("m", "()I").returns(1).build()
|
||||||
.build();
|
.build();
|
||||||
@ -761,8 +716,6 @@ public class SuperCallTest extends DefMethTest {
|
|||||||
|
|
||||||
ConcreteClass C = b.clazz("C").implement(K).build();
|
ConcreteClass C = b.clazz("C").implement(K).build();
|
||||||
|
|
||||||
b.test().callSite(K, C, "m", "()I").throws_(VerifyError.class).done()
|
b.test().callSite(K, C, "m", "()I").throws_(VerifyError.class).done();
|
||||||
|
|
||||||
.run();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_none_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_strict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_sync_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/AccessibilityFlags_v52_syncstrict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.AccessibilityFlagsTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_none_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_strict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_sync_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v49_syncstrict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_none_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_strict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_sync_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/Basic_v52_syncstrict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.BasicTest
|
|
||||||
* -ver 52
|
|
||||||
* -flags 2080
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_none_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 0
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_reflect_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_strict_reflect_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 2048
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode reflect
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_sync_direct_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_sync_direct_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode direct
|
|
||||||
*/
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_sync_invoke_noredefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
* @run main/othervm
|
|
||||||
* -XX:+IgnoreUnrecognizedVMOptions
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017, 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @test
|
|
||||||
* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.org.objectweb.asm.util:+open
|
|
||||||
*
|
|
||||||
* @summary converted from VM Testbase vm/runtime/defmeth/scenarios/ConflictingDefaults_v49_sync_invoke_redefine.
|
|
||||||
* VM Testbase keywords: [defmeth, jdk8, jdk_instrument, quick]
|
|
||||||
*
|
|
||||||
* @library /vmTestbase /test/lib
|
|
||||||
*
|
|
||||||
* @comment build retransform.jar in current dir
|
|
||||||
* @run driver vm.runtime.defmeth.shared.BuildJar
|
|
||||||
*
|
|
||||||
* @run main/othervm/native
|
|
||||||
* -agentlib:redefineClasses
|
|
||||||
* -javaagent:retransform.jar
|
|
||||||
* vm.runtime.defmeth.ConflictingDefaultsTest
|
|
||||||
* -ver 49
|
|
||||||
* -flags 32
|
|
||||||
* -redefine
|
|
||||||
* -retransform
|
|
||||||
* -mode invoke
|
|
||||||
*/
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user