< prev index next >

test/lib/jdk/test/lib/cds/CDSTestUtils.java

Print this page

        

*** 30,40 **** import java.util.ArrayList; import java.util.Date; import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; ! // This class contains common test utilities for testing CDS public class CDSTestUtils { public interface Checker { public void check(OutputAnalyzer output) throws Exception; --- 30,40 ---- import java.util.ArrayList; import java.util.Date; import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; ! import jtreg.SkippedException; // This class contains common test utilities for testing CDS public class CDSTestUtils { public interface Checker { public void check(OutputAnalyzer output) throws Exception;
*** 221,231 **** // This property is passed to child test processes public static final String TestTimeoutFactor = System.getProperty("test.timeout.factor", "1.0"); public static final String UnableToMapMsg = ! "Unable to map shared archive: test did not complete; assumed PASS"; // Create bootstrap CDS archive, // use extra JVM command line args as a prefix. // For CDS tests specifying prefix makes more sense than specifying suffix, since // normally there are no classes or arguments to classes, just "-version" --- 221,231 ---- // This property is passed to child test processes public static final String TestTimeoutFactor = System.getProperty("test.timeout.factor", "1.0"); public static final String UnableToMapMsg = ! "Unable to map shared archive: test did not complete"; // Create bootstrap CDS archive, // use extra JVM command line args as a prefix. // For CDS tests specifying prefix makes more sense than specifying suffix, since // normally there are no classes or arguments to classes, just "-version"
*** 312,323 **** // Special case -- sometimes Xshare:on fails because it failed to map // at given address. This behavior is platform-specific, machine config-specific // and can be random (see ASLR). if (isUnableToMap(output)) { ! System.out.println(UnableToMapMsg); ! return true; } if (e != null) { throw e; } --- 312,322 ---- // Special case -- sometimes Xshare:on fails because it failed to map // at given address. This behavior is platform-specific, machine config-specific // and can be random (see ASLR). if (isUnableToMap(output)) { ! throw new SkippedException(UnableToMapMsg); } if (e != null) { throw e; }
*** 444,455 **** public static OutputAnalyzer checkExecExpectError(OutputAnalyzer output, int expectedExitValue, String... extraMatches) throws Exception { if (isUnableToMap(output)) { ! System.out.println(UnableToMapMsg); ! return output; } output.shouldHaveExitValue(expectedExitValue); checkMatches(output, extraMatches); return output; --- 443,453 ---- public static OutputAnalyzer checkExecExpectError(OutputAnalyzer output, int expectedExitValue, String... extraMatches) throws Exception { if (isUnableToMap(output)) { ! throw new SkippedException(UnableToMapMsg); } output.shouldHaveExitValue(expectedExitValue); checkMatches(output, extraMatches); return output;
< prev index next >