changeset 7625:f9763ce154d8

Introduce serialize-inject-only mode into static mangler; extend mangling to bootclasspath tests; suppress more serialization-hostile tests
author briangoetz
date Wed, 13 Mar 2013 14:32:07 -0400
parents b383ff65a209
children 5a128a6aa03e
files test-ng/agent/conf/serialize.list test-ng/agent/src/com/oracle/lambda/Agent.java test-ng/agent/src/com/oracle/lambda/Main.java test-ng/agent/src/com/oracle/lambda/SerializationInjector.java test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java test-ng/boottests/java/util/stream/DoubleNodeTest.java test-ng/boottests/java/util/stream/IntNodeTest.java test-ng/boottests/java/util/stream/LongNodeTest.java test-ng/boottests/java/util/stream/NodeBuilderTest.java test-ng/boottests/java/util/stream/NodeTest.java test-ng/boottests/java/util/stream/SpinedBufferTest.java test-ng/build.xml
diffstat 12 files changed, 76 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/test-ng/agent/conf/serialize.list	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/agent/conf/serialize.list	Wed Mar 13 14:32:07 2013 -0400
@@ -5,6 +5,8 @@
 java/util/OptionalInt
 java/util/Spliterator
 java/util/ArrayList\$SubList
+java/util/SubList
+java/util/RandomAccessSubList
 java/util/HashMap\$.*Spliterator
 java/util/TreeMap\$.*Spliterator
 java/util/function/Function\$\$Lambda.*
@@ -19,6 +21,7 @@
 java/util/stream/AbstractPipeline\$.*
 java/util/stream/IntermediateOp
 java/util/stream/.*StreamTestData\$.*
+java/util/stream/.*NodeTest
 org/openjdk/tests/java/util/stream/OpTestCase\$TestData
 org/openjdk/tests/java/util/stream/OpTestCase\$ExerciseDataStreamBuilder
 org/openjdk/tests/java/util/stream/OpTestCase\$ExerciseDataTerminalBuilder
--- a/test-ng/agent/src/com/oracle/lambda/Agent.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/agent/src/com/oracle/lambda/Agent.java	Wed Mar 13 14:32:07 2013 -0400
@@ -29,6 +29,7 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.ProtectionDomain;
+import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.TreeSet;
 
@@ -43,7 +44,7 @@
                 public byte[] transform(final ClassLoader cl, String string,
                                         Class<?> type, ProtectionDomain pd,
                                         byte[] bytes) throws IllegalClassFormatException {
-                    return si.transformClass(cl, bytes, false);
+                    return si.transformClass(cl, bytes, EnumSet.noneOf(SerializationInjector.Options.class));
                 }
             });
         }
--- a/test-ng/agent/src/com/oracle/lambda/Main.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/agent/src/com/oracle/lambda/Main.java	Wed Mar 13 14:32:07 2013 -0400
@@ -33,16 +33,13 @@
 import java.nio.file.DirectoryStream;
 import java.nio.file.FileSystem;
 import java.nio.file.FileSystems;
-import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.SimpleFileVisitor;
-import java.nio.file.attribute.BasicFileAttributes;
 import java.nio.file.attribute.FileAttribute;
 import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.attribute.PosixFilePermissions;
-import java.util.Arrays;
 import java.util.Collections;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -63,7 +60,7 @@
     static void usage() {
         System.out.println("usage: -o output_dir -f path_to_list path_to/SomeClass.class");
         System.out.println("usage: -o output_dir -f path_to_list path_to_classes");
-        System.out.println("usage: -o output_dir (-f path_to_list | -c className) path_to_jar");
+        System.out.println("usage: -o output_dir -s -f path_to_list path_to_jar");
         System.exit(1);
     }
 
@@ -81,7 +78,7 @@
         File outDir = null;
         File inFile = null;
         File confFile = null;
-        String className = null;
+        boolean serializeOnly = false;
         for (int i = 0 ; i < args.length ; i++) {
             switch (args[i]) {
                 case "-o":
@@ -92,17 +89,13 @@
                     i++;
                     confFile = new File(args[i]);
                     break;
-                case "-c":
-                    i++;
-                    className = args[i];
+                case "-s":
+                    serializeOnly = true;
                     break;
                 default:
                     inFile = new File(args[i]);
             }
         }
-        if (!"-o".equals(args[0])) {
-            usage();
-        }
         if (inFile.isDirectory()) {
             if (outDir.exists()) {
                 outDir.mkdirs();
@@ -112,7 +105,7 @@
             try (DirectoryStream<Path> paths =
                     Files.newDirectoryStream(inFile.toPath(), "*")) {
                 for (Path p : paths) {
-                    doFile(inFile, outDir, p.toFile(), cl, false);
+                    doFile(inFile, outDir, p.toFile(), cl);
                 }
             }
         } else if (inFile.getName().endsWith(".jar")) {
@@ -121,13 +114,15 @@
             }
             URL[] urls = {inFile.toURI().toURL()};
             ClassLoader cl = new URLClassLoader(urls, ClassLoader.getSystemClassLoader());
-            Pattern pattern = Pattern.compile(className != null ? Pattern.quote("className" + ".class") : ".*");
-            doJar(confFile, inFile, outDir, cl, pattern, className != null);
+            Pattern pattern = Pattern.compile(".*");
+            EnumSet<SerializationInjector.Options> options
+                    = serializeOnly ? EnumSet.of(SerializationInjector.Options.SERIALIZE_ONLY) : EnumSet.noneOf(SerializationInjector.Options.class);
+            doJar(confFile, inFile, outDir, cl, pattern, options);
         } else {
             outDir.mkdirs();
             URL[] urls = {inFile.getParentFile().toURI().toURL()};
             ClassLoader cl = new URLClassLoader(urls, ClassLoader.getSystemClassLoader());
-            doFile(null, outDir, inFile, cl, className != null);
+            doFile(null, outDir, inFile, cl);
         }
     }
     static void copyStream(InputStream in, OutputStream out) throws IOException {
@@ -145,7 +140,8 @@
         return baos.toByteArray();
     }
 
-    static void doJar(File confFile, File inFile, File outDir, ClassLoader cl, Pattern pattern, boolean forceSerialize) throws IOException {
+    static void doJar(File confFile, File inFile, File outDir, ClassLoader cl, Pattern pattern,
+                      EnumSet<SerializationInjector.Options> options) throws IOException {
         JarFile jf = new JarFile(inFile);
         byte[] buffer;
         SerializationInjector si = new SerializationInjector(confFile.getAbsolutePath());
@@ -170,7 +166,7 @@
             if (pattern.matcher(fname).matches()) {
                 buffer = readFully(jf.getInputStream(je));
                 if (fname.endsWith(".class"))
-                    buffer = si.transformClass(cl, buffer, forceSerialize);
+                    buffer = si.transformClass(cl, buffer, options);
                 Path opath = jarOut ? fs.getPath(fname) : fs.getPath(outDir.getAbsolutePath(), fname);
                 Files.createDirectories(opath.getParent(), attr);
                 Files.write(opath, buffer, CREATE, TRUNCATE_EXISTING);
@@ -186,7 +182,7 @@
         return fname.substring(bname.length() + 1);
     }
 
-    static void doFile(File inDir, File outDir, File iFile, ClassLoader cl, boolean forceSerialize) throws Exception {
+    static void doFile(File inDir, File outDir, File iFile, ClassLoader cl) throws Exception {
         if (!iFile.getName().endsWith(".class")) {
             Path p = new File(getRelativePath(inDir, iFile)).toPath();
             Files.copy(iFile.toPath(), p, COPY_ATTRIBUTES, REPLACE_EXISTING);
@@ -200,6 +196,6 @@
         System.err.println(" to: " + oFile.getAbsolutePath());
         oFile.getParentFile().mkdirs();
         Files.write(oFile.toPath(),
-                si.transformClass(cl, classBuffer, forceSerialize), CREATE, TRUNCATE_EXISTING);
+                si.transformClass(cl, classBuffer, EnumSet.noneOf(SerializationInjector.Options.class)), CREATE, TRUNCATE_EXISTING);
     }
 }
--- a/test-ng/agent/src/com/oracle/lambda/SerializationInjector.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/agent/src/com/oracle/lambda/SerializationInjector.java	Wed Mar 13 14:32:07 2013 -0400
@@ -33,6 +33,7 @@
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -54,7 +55,7 @@
 
 public class SerializationInjector {
     static final String PREFIX = "com.oracle.lambda";
-    static final String INCLUDES = "org.openjdk.tests.java.*"; // also should include java.util...
+    static final String INCLUDES = "java.util.*|org.openjdk.tests.java.*"; // also should include java.util...
     static final String SERIALIZE = "";
     static PrintStream outputStream;
     static boolean shouldClose = false;
@@ -66,6 +67,8 @@
     final Pattern serializePattern;
     final boolean serializeOnly;
 
+    public enum Options { SERIALIZE_ONLY, FORCE_SERIALIZE }
+
     public SerializationInjector() {
         includePattern = Pattern.compile(INCLUDES);
         serializePattern = Pattern.compile(SERIALIZE);
@@ -162,15 +165,15 @@
         return Pattern.compile(regStr);
     }
 
-    byte[] transformClass(ClassLoader cl, byte[] classBuffer, boolean forceSerialize) {
+    byte[] transformClass(ClassLoader cl, byte[] classBuffer, EnumSet<Options> options) {
         byte[] xBuffer = classBuffer;
         ClassReader classReader = new ClassReader(xBuffer);
         String cname = classReader.getClassName();
-        if (forceSerialize || serializePattern.matcher(cname).matches()) {
+        if (options.contains(Options.FORCE_SERIALIZE) || serializePattern.matcher(cname).matches()) {
             debug.println("Implementing Serialization: " + cname);
             xBuffer = injectSerialization(xBuffer, cl);
         }
-        if (serializeOnly) {
+        if (serializeOnly || options.contains(Options.SERIALIZE_ONLY)) {
             return xBuffer;
         }
         if (!includePattern.matcher(cname).matches()) {
--- a/test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java	Wed Mar 13 14:32:07 2013 -0400
@@ -141,7 +141,7 @@
                 }
                 return lambdaObj;
             }
-            catch (IOException e) {
+            catch (RuntimeException|IOException|Error e) {
                 serCounters.failed.incrementAndGet();
                 String cname = lambdaObj.getClass().getName();
                 SerializableStatus s = serializableButFailedClasses.get(cname);
--- a/test-ng/boottests/java/util/stream/DoubleNodeTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/DoubleNodeTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -138,7 +138,7 @@
         assertEquals(copy, array);
     }
 
-    @Test(dataProvider = "nodes")
+    @Test(dataProvider = "nodes", groups = { "serialization-hostile" })
     public void testForEach(double[] array, Node.OfDouble n) {
         List<Double> l = new ArrayList<>((int) n.count());
         n.forEach((double e) -> {
--- a/test-ng/boottests/java/util/stream/IntNodeTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/IntNodeTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -138,7 +138,7 @@
         assertEquals(copy, array);
     }
 
-    @Test(dataProvider = "nodes")
+    @Test(dataProvider = "nodes", groups = { "serialization-hostile" })
     public void testForEach(int[] array, Node.OfInt n) {
         List<Integer> l = new ArrayList<>((int) n.count());
         n.forEach((int e) -> {
--- a/test-ng/boottests/java/util/stream/LongNodeTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/LongNodeTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -138,7 +138,7 @@
         assertEquals(copy, array);
     }
 
-    @Test(dataProvider = "nodes")
+    @Test(dataProvider = "nodes", groups = { "serialization-hostile" })
     public void testForEach(long[] array, Node.OfLong n) {
         List<Long> l = new ArrayList<>((int) n.count());
         n.forEach((long e) -> {
--- a/test-ng/boottests/java/util/stream/NodeBuilderTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/NodeBuilderTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -70,7 +70,7 @@
         return params;
     }
 
-    @Test(dataProvider = "Node.Builder")
+    @Test(dataProvider = "Node.Builder", groups = { "serialization-hostile" })
     public void testIteration(List<Integer> l, Function<Integer, Node.Builder<Integer>> m) {
         Node.Builder<Integer> nb = m.apply(l.size());
         nb.begin(l.size());
@@ -115,7 +115,7 @@
         return params;
     }
 
-    @Test(dataProvider = "Node.Builder<Integer>")
+    @Test(dataProvider = "Node.Builder<Integer>", groups = { "serialization-hostile" })
     public void testIntIteration(List<Integer> l, Function<Integer, Node.Builder.OfInt> m) {
         Node.Builder.OfInt nb = m.apply(l.size());
         nb.begin(l.size());
--- a/test-ng/boottests/java/util/stream/NodeTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/NodeTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -116,7 +116,7 @@
         assertEquals(copy, array);
     }
 
-    @Test(dataProvider = "nodes")
+    @Test(dataProvider = "nodes", groups = { "serialization-hostile" })
     public void testForEach(Integer[] array, Node<Integer> n) {
         List<Integer> l = new ArrayList<>((int) n.count());
         n.forEach(e -> l.add(e));
--- a/test-ng/boottests/java/util/stream/SpinedBufferTest.java	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/boottests/java/util/stream/SpinedBufferTest.java	Wed Mar 13 14:32:07 2013 -0400
@@ -98,7 +98,7 @@
         SpliteratorTestHelper.testSpliterator(sb::spliterator);
     }
 
-    @Test(dataProvider = "SpinedBuffer")
+    @Test(dataProvider = "SpinedBuffer", groups = { "serialization-hostile" })
     public void testLastSplit(int[] array, SpinedBuffer<Integer> sb) {
         Spliterator<Integer> spliterator = sb.spliterator();
         Spliterator<Integer> split = spliterator.trySplit();
@@ -120,6 +120,7 @@
         assertEquals(contentOfLastSplit, end);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testSpinedBuffer() {
         List<Integer> list1 = new ArrayList<>();
         List<Integer> list2 = new ArrayList<>();
@@ -172,7 +173,7 @@
         SpliteratorTestHelper.testIntSpliterator(sb::spliterator);
     }
 
-    @Test(dataProvider = "IntSpinedBuffer")
+    @Test(dataProvider = "IntSpinedBuffer", groups = { "serialization-hostile" })
     public void testIntLastSplit(int[] array, SpinedBuffer.OfInt sb) {
         Spliterator.OfInt spliterator = sb.spliterator();
         Spliterator.OfInt split = spliterator.trySplit();
@@ -194,6 +195,7 @@
         assertEquals(contentOfLastSplit, end);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testIntSpinedBuffer() {
         List<Integer> list1 = new ArrayList<>();
         List<Integer> list2 = new ArrayList<>();
@@ -246,7 +248,7 @@
         SpliteratorTestHelper.testLongSpliterator(sb::spliterator);
     }
 
-    @Test(dataProvider = "LongSpinedBuffer")
+    @Test(dataProvider = "LongSpinedBuffer", groups = { "serialization-hostile" })
     public void testLongLastSplit(long[] array, SpinedBuffer.OfLong sb) {
         Spliterator.OfLong spliterator = sb.spliterator();
         Spliterator.OfLong split = spliterator.trySplit();
@@ -268,6 +270,7 @@
         assertEquals(contentOfLastSplit, end);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testLongSpinedBuffer() {
         List<Long> list1 = new ArrayList<>();
         List<Long> list2 = new ArrayList<>();
@@ -321,7 +324,7 @@
         SpliteratorTestHelper.testDoubleSpliterator(sb::spliterator);
     }
 
-    @Test(dataProvider = "DoubleSpinedBuffer")
+    @Test(dataProvider = "DoubleSpinedBuffer", groups = { "serialization-hostile" })
     public void testLongLastSplit(double[] array, SpinedBuffer.OfDouble sb) {
         Spliterator.OfDouble spliterator = sb.spliterator();
         Spliterator.OfDouble split = spliterator.trySplit();
@@ -343,6 +346,7 @@
         assertEquals(contentOfLastSplit, end);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testDoubleSpinedBuffer() {
         List<Double> list1 = new ArrayList<>();
         List<Double> list2 = new ArrayList<>();
--- a/test-ng/build.xml	Wed Mar 13 14:19:18 2013 +0100
+++ b/test-ng/build.xml	Wed Mar 13 14:32:07 2013 -0400
@@ -29,8 +29,10 @@
 
     <property name="build.dir" value="../../build/test-ng" />
     <property name="tests.classes.dir" value="${build.dir}/test-classes"/>
-    <property name="mangled.bootdir" value="${build.dir}/mangled-bootclasses"/>
-    <property name="mangled.testdir" value="${build.dir}/mangled-testclasses"/>
+    <property name="mangled.jdk.dir" value="${build.dir}/mangled-jdk"/>
+    <property name="mangled.bootlib.dir" value="${build.dir}/mangled-bootlib"/>
+    <property name="mangled.boottests.dir" value="${build.dir}/mangled-boottests"/>
+    <property name="mangled.tests.dir" value="${build.dir}/mangled-testclasses"/>
     <property name="boottests.classes.dir" value="${build.dir}/boottest-classes"/>
     <property name="bootlib.classes.dir" value="${build.dir}/test-bootlib"/>
     <property name="test.reports.dir" value="${build.dir}/test-reports"/>
@@ -63,7 +65,7 @@
     </path>
 
     <path id="mangled.class.path">
-        <pathelement location="${mangled.testdir}" />
+        <pathelement location="${mangled.tests.dir}" />
         <pathelement location="${lib.testng.jar}"/>
         <pathelement location="${lib.tools.jar}"/>
     </path>
@@ -72,7 +74,7 @@
 
     <target name="prepare">
         <mkdir dir="${build.dir}"/>
-        <mkdir dir="${mangled.bootdir}"/>
+        <mkdir dir="${mangled.jdk.dir}"/>
         <mkdir dir="${tests.classes.dir}"/>
         <mkdir dir="${boottests.classes.dir}"/>
         <mkdir dir="${bootlib.classes.dir}"/>
@@ -145,41 +147,47 @@
     </target>
 
     <target name="premangle" depends="build-mangler, test-compile">
-        <delete dir="${mangled.bootdir}" />
-        <mkdir dir="${mangled.bootdir}" />
-        <delete dir="${mangled.testdir}" />
-        <mkdir dir="${mangled.testdir}" />
-        <!-- Mangle JDK to mangled.bootdir -->
+        <!-- Mangle JDK to mangled.jdk.dir (serialization injection only, no SAND) -->
+        <delete dir="${mangled.jdk.dir}" />
+        <mkdir dir="${mangled.jdk.dir}" />
         <java jar="${agent.jar}" fork="true" >
+            <arg value="-s"/>
             <arg value="-o"/>
-            <arg value="${mangled.bootdir}" />
+            <arg value="${mangled.jdk.dir}" />
             <arg value="-f"/>
             <arg value="${agent.conf.file}"/>
             <arg value="${agent.rt.jar}"/>
         </java>
-        <!-- Mangle boot test classes to mangled.bootdir -->
+        <!-- Mangle boot test classes to mangled.boottests.dir -->
+        <delete dir="${mangled.boottests.dir}" />
+        <mkdir dir="${mangled.boottests.dir}" />
         <jar destfile="${build.dir}/tmpA.jar" basedir="${boottests.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
             <arg value="-o"/>
-            <arg value="${mangled.bootdir}" />
+            <arg value="${mangled.boottests.dir}" />
             <arg value="-f"/>
             <arg value="${agent.conf.file}"/>
             <arg value="${build.dir}/tmpA.jar"/>
         </java>
-        <!-- Mangle boot lib classes to mangled.bootdir -->
+        <!-- Mangle boot test classes to mangled.bootlib.dir (serialization injection only, no SAND) -->
+        <delete dir="${mangled.bootlib.dir}" />
+        <mkdir dir="${mangled.bootlib.dir}" />
         <jar destfile="${build.dir}/tmpB.jar" basedir="${bootlib.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
+            <arg value="-s"/>
             <arg value="-o"/>
-            <arg value="${mangled.bootdir}" />
+            <arg value="${mangled.bootlib.dir}" />
             <arg value="-f"/>
             <arg value="${agent.conf.file}"/>
             <arg value="${build.dir}/tmpB.jar"/>
         </java>
         <!-- Mangle test classes to mangled.testdir -->
+        <delete dir="${mangled.tests.dir}" />
+        <mkdir dir="${mangled.tests.dir}" />
         <jar destfile="${build.dir}/tmpC.jar" basedir="${tests.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
             <arg value="-o"/>
-            <arg value="${mangled.testdir}" />
+            <arg value="${mangled.tests.dir}" />
             <arg value="-f"/>
             <arg value="${agent.conf.file}"/>
             <arg value="${build.dir}/tmpC.jar"/>
@@ -195,11 +203,13 @@
     <target name="test-mangled" depends="test-compile, build-mangler" >
         <testng classpathref="mangled.class.path" outputdir="${test.reports.dir}"
                 excludedgroups="serialization-hostile">
-            <classfileset dir="${mangled.testdir}" includes="org/openjdk/tests/java/**/*.class"
+            <classfileset dir="${mangled.tests.dir}" includes="org/openjdk/tests/java/**/*.class"
                           excludes="**/SerializedLambdaTest.class"/>
-            <classfileset dir="${mangled.bootdir}" includes="java/util/stream/**/*.class"/>
+            <classfileset dir="${mangled.boottests.dir}" includes="**/*.class"/>
             <jvmarg value="-Xbootclasspath/p:${agent.jar}"/>
-            <jvmarg value="-Xbootclasspath/p:${mangled.bootdir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.jdk.dir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.bootlib.dir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.boottests.dir}"/>
             <jvmarg value="-Xbootclasspath/p:${lib.testng.jar}"/>
             <!--<jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" />-->
             <jvmarg value="-ea" />
@@ -213,10 +223,12 @@
     <target name="test-mangledp" depends="test-compile, build-mangler" >
         <testng classpathref="mangled.class.path" outputdir="${test.reports.dir}"
                 excludedgroups="serialization-hostile">
-            <classfileset dir="${mangled.testdir}" includes="**/${test.pattern}.class"/>
-            <classfileset dir="${mangled.bootdir}" includes="java/util/stream/**/${test.pattern}.class"/>
+            <classfileset dir="${mangled.tests.dir}" includes="**/${test.pattern}.class"/>
+            <classfileset dir="${mangled.boottests.dir}" includes="**/${test.pattern}.class"/>
             <jvmarg value="-Xbootclasspath/p:${agent.jar}"/>
-            <jvmarg value="-Xbootclasspath/p:${mangled.bootdir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.jdk.dir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.bootlib.dir}"/>
+            <jvmarg value="-Xbootclasspath/p:${mangled.boottests.dir}"/>
             <jvmarg value="-Xbootclasspath/p:${lib.testng.jar}"/>
             <!--<jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" />-->
             <jvmarg value="-ea" />