--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java 2018-01-26 14:38:47.890948544 -0800 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java 2018-01-26 14:38:47.452907358 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -52,8 +52,8 @@ String appJar = TestCommon.getTestJar("dummyClasses.jar"); OutputAnalyzer dumpOutput = TestCommon.dump( - appJar, classNames, "-Xbootclasspath/a:" + appJar); - + appJar, classNames, "-Xbootclasspath/a:" + appJar, + "--add-modules", "java.activation"); List argsList = new ArrayList(); for (int i = 0; i < classNames.length; i++) { argsList.add(classNames[i].replace('/', '.')); @@ -61,10 +61,8 @@ String[] arguments = new String[argsList.size()]; arguments = argsList.toArray(arguments); OutputAnalyzer execOutput = TestCommon.execCommon( - "-cp", TestCommon.getTestDir("."), "-verbose:class", - "--add-modules", "java.activation", - "-Xbootclasspath/a:" + appJar, "DummyClassHelper", - arguments[0], arguments[1]); + "--add-modules", "java.activation", "-Xbootclasspath/a:" + appJar, + "DummyClassHelper", arguments[0], arguments[1]); for (int i = 0; i < arguments.length; i++) { TestCommon.checkExec(execOutput, "java.lang.NoSuchMethodException: " + arguments[i] + "." + @@ -75,13 +73,20 @@ String whiteBoxJar = TestCommon.getTestJar("WhiteBox.jar"); String bootClassPath = "-Xbootclasspath/a:" + appJar + File.pathSeparator + whiteBoxJar; + dumpOutput = TestCommon.dump( + appJar, classNames, bootClassPath, "--add-modules", "java.activation"); argsList.add("testWithWhiteBox"); arguments = new String[argsList.size()]; arguments = argsList.toArray(arguments); String[] opts = {"-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", - bootClassPath, "-XX:+TraceClassPaths", "DummyClassHelper", - arguments[0], arguments[1], arguments[2]}; - OutputAnalyzer output = TestCommon.execCommon(opts); + "--add-modules", "java.activation", bootClassPath, "-XX:+TraceClassPaths", + "DummyClassHelper", arguments[0], arguments[1], arguments[2]}; + execOutput = TestCommon.execCommon(opts); + for (int i = 0; i < arguments.length - 1; i++) { + TestCommon.checkExec(execOutput, + "java.lang.NoSuchMethodException: " + arguments[i] + "." + + METHOD_NAME); + } } }