< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/ClassPathAttr.java

Print this page

*** 114,134 **** "CpAttr6") .assertNormalExit(output -> { output.shouldMatch("should be non-existent: .*cpattrX.jar"); }); ! // Now make nonExistPath exist. CDS will fail to load. Files.copy(Paths.get(cp), Paths.get(nonExistPath), StandardCopyOption.REPLACE_EXISTING); TestCommon.run( "-Xlog:class+path", "-cp", cp, "CpAttr6") ! .assertAbnormalExit(output -> { ! output.shouldMatch("should be non-existent: .*cpattrX.jar"); ! output.shouldMatch("file must not exist: .*cpattrX.jar"); }); } private static void buildCpAttr(String jarName, String manifest, String enclosingClassName, String ...testClassNames) throws Exception { String jarClassesDir = System.getProperty("test.classes") + File.separator + jarName + "_classes"; --- 114,133 ---- "CpAttr6") .assertNormalExit(output -> { output.shouldMatch("should be non-existent: .*cpattrX.jar"); }); ! // Now make nonExistPath exist. CDS still loads, but archived non-system classes will not be used. Files.copy(Paths.get(cp), Paths.get(nonExistPath), StandardCopyOption.REPLACE_EXISTING); TestCommon.run( "-Xlog:class+path", "-cp", cp, "CpAttr6") ! .assertNormalExit(output -> { ! output.shouldMatch("Archived non-system classes are disabled because the file .*/cpattrX.jar exists"); }); } private static void buildCpAttr(String jarName, String manifest, String enclosingClassName, String ...testClassNames) throws Exception { String jarClassesDir = System.getProperty("test.classes") + File.separator + jarName + "_classes";
< prev index next >