changeset 11656:7dd4682b4208

8155214: java/lang/invoke/PermuteArgsTest.java fails due to exhausted code cache Reviewed-by: sundar
author mhaupt
date Wed, 27 Apr 2016 15:34:30 +0200
parents 931c1185bb1b
children c44e755a3dce
files test/java/lang/invoke/PermuteArgsTest.java
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/lang/invoke/PermuteArgsTest.java	Tue Apr 26 20:31:59 2016 +0300
+++ b/test/java/lang/invoke/PermuteArgsTest.java	Wed Apr 27 15:34:30 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, 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
@@ -23,6 +23,7 @@
 
 /* @test
  * @summary unit tests for method handles which permute their arguments
+ * @library /lib/testlibrary/jsr292 /lib/testlibrary
  * @run testng/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -ea -esa -DPermuteArgsTest.MAX_ARITY=8 test.java.lang.invoke.PermuteArgsTest
  */
 /* Examples of manual runs:
@@ -36,6 +37,8 @@
 import org.testng.*;
 import org.testng.annotations.*;
 
+import com.oracle.testlibrary.jsr292.CodeCacheOverflowProcessor;
+
 import java.util.*;
 import java.lang.reflect.*;
 
@@ -122,9 +125,15 @@
         }
         new PermuteArgsTest().test();
     }
+
     static int testCases;
+
     @Test
     public void test() throws Throwable {
+        CodeCacheOverflowProcessor.runMHTest(this::test0);
+    }
+
+    public void test0() throws Throwable {
         testCases = 0;
         Lookup lookup = lookup();
         for (Method m : lookup.lookupClass().getDeclaredMethods()) {