changeset 47322:aa3ca9702304 mvt

Adjust tests after JDK-8187696 fix
author dsimms
date Wed, 11 Oct 2017 16:14:53 +0200
parents 7985a2ef92c5
children f0d9ab80d457
files test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java test/hotspot/jtreg/runtime/valhalla/valuetypes/VboxUnbox.java
diffstat 2 files changed, 10 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Tue Oct 10 15:41:18 2017 +0100
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Wed Oct 11 16:14:53 2017 +0200
@@ -44,22 +44,22 @@
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -noverify -Xint -XX:+UseSerialGC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xint -XX:+UseSerialGC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops
- * @run main/othervm -noverify -Xint  -XX:+UseG1GC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xint  -XX:+UseG1GC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops 100
- * @run main/othervm -noverify -Xint -XX:+UseParallelGC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xint -XX:+UseParallelGC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops
- * @run main/othervm -noverify -Xcomp -XX:+UseSerialGC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xcomp -XX:+UseSerialGC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops
- * @run main/othervm -noverify -Xcomp -XX:+UseG1GC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xcomp -XX:+UseG1GC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops 100
- * @run main/othervm -noverify -Xcomp -XX:+UseParallelGC -Xmx128m -XX:+EnableValhalla
+ * @run main/othervm -Xcomp -XX:+UseParallelGC -Xmx128m -XX:+EnableValhalla
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   runtime.valhalla.valuetypes.ValueOops
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VboxUnbox.java	Tue Oct 10 15:41:18 2017 +0100
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VboxUnbox.java	Wed Oct 11 16:14:53 2017 +0200
@@ -35,9 +35,10 @@
  * @modules java.base/jdk.experimental.value
  *          jdk.incubator.mvt
  * @library /test/lib
+ * @compile PersonVcc.java
  * @build runtime.valhalla.valuetypes.ValueCapableClass
- * @run main/othervm -Xint -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.VboxUnbox
- * @run main/othervm -Xcomp -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.VboxUnbox
+ * @run main/othervm -Xint -XX:+EnableMVT runtime.valhalla.valuetypes.VboxUnbox
+ * @run main/othervm -Xcomp -XX:+EnableMVT runtime.valhalla.valuetypes.VboxUnbox
  */
 public class VboxUnbox {
 
@@ -82,10 +83,7 @@
         catch (ClassCastException cce) {}
         catch (Throwable t) { fail("Invokation Exception", t); }
 
-        // With -verify, this test will yield a VerifyError
-        // since the constant pool entry at the index is not a
-        // symbolic reference to a direct value class type.
-        MethodHandle unbox = unboxMh(vcc, String.class); // Illegal unbox type
+        MethodHandle unbox = unboxMh(vcc, ValueType.forClass(PersonVcc.class).valueClass()); // Illegal unbox type
         try {
             unbox.invoke(ValueCapableClass.create());
             fail("Expected ClassCastException");