< prev index next >

test/hotspot/jtreg/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java

Print this page

        

*** 31,59 **** * java.management */ import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.process.OutputAnalyzer; public class SharedSymbolTableBucketSize { public static void main(String[] args) throws Exception { int bucket_size = 8; OutputAnalyzer output = CDSTestUtils.createArchive("-XX:SharedSymbolTableBucketSize=" + Integer.valueOf(bucket_size)); CDSTestUtils.checkDump(output); ! if (!CDSTestUtils.isUnableToMap(output)) { String s = output.firstMatch("Average bucket size : .*"); Float f = Float.parseFloat(s.substring(25)); int size = Math.round(f); if (size != bucket_size) { throw new Exception("FAILED: incorrect bucket size " + size + ", expect " + bucket_size); } - } // Invalid SharedSymbolTableBucketSize input String input[] = {"-XX:SharedSymbolTableBucketSize=-1", "-XX:SharedSymbolTableBucketSize=2.5"}; for (int i = 0; i < input.length; i++) { --- 31,62 ---- * java.management */ import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.process.OutputAnalyzer; + import jtreg.SkippedException; public class SharedSymbolTableBucketSize { public static void main(String[] args) throws Exception { int bucket_size = 8; OutputAnalyzer output = CDSTestUtils.createArchive("-XX:SharedSymbolTableBucketSize=" + Integer.valueOf(bucket_size)); CDSTestUtils.checkDump(output); ! if (CDSTestUtils.isUnableToMap(output)) { ! throw new SkippedException(CDSTestUtils.UnableToMapMsg); ! } ! String s = output.firstMatch("Average bucket size : .*"); Float f = Float.parseFloat(s.substring(25)); int size = Math.round(f); if (size != bucket_size) { throw new Exception("FAILED: incorrect bucket size " + size + ", expect " + bucket_size); } // Invalid SharedSymbolTableBucketSize input String input[] = {"-XX:SharedSymbolTableBucketSize=-1", "-XX:SharedSymbolTableBucketSize=2.5"}; for (int i = 0; i < input.length; i++) {
< prev index next >