test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java
changeset 55501 c9590e526d19
parent 52400 ca309ee4fd92
equal deleted inserted replaced
55500:80abfee2afaf 55501:c9590e526d19
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    51             "-cp", ".",
    51             "-cp", ".",
    52             "-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
    52             "-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
    53             "-Xshare:dump",
    53             "-Xshare:dump",
    54             "-showversion", "-Xlog:cds,cds+hashtables"));
    54             "-showversion", "-Xlog:cds,cds+hashtables"));
    55 
    55 
    56         TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump"));
    56         boolean continueTest = true;
       
    57         OutputAnalyzer output = TestCommon.executeAndLog(dumpPb, "dump");
       
    58         try {
       
    59             TestCommon.checkDump(output);
       
    60         } catch (java.lang.RuntimeException re) {
       
    61             if (!output.getStdout().contains("UseCompressedOops and UseCompressedClassPointers have been disabled due to")) {
       
    62                 throw re;
       
    63             } else {
       
    64                 System.out.println("Shared archive was not created due to UseCompressedOops and UseCompressedClassPointers have been disabled.");
       
    65                 continueTest = false;
       
    66             }
       
    67         }
       
    68 
       
    69         if (!continueTest) {
       
    70             return;
       
    71         }
    57 
    72 
    58         ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
    73         ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
    59           TestCommon.concat(vmOptionsPrefix,
    74           TestCommon.concat(vmOptionsPrefix,
    60             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
    75             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
    61             "-XX:SharedArchiveFile=./SysDictCrash.jsa",
    76             "-XX:SharedArchiveFile=./SysDictCrash.jsa",