< prev index next >

test/runtime/SharedArchiveFile/SharedStrings.java

Print this page
rev 13329 : 8185436: jtreg: introduce @requires property to disable cds tests
Summary: Fix CompressedClassPointers test to succeed also if cds is not available.


   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test

  26  * @summary Check to make sure that shared strings in the bootstrap CDS archive
  27  *          are actually shared
  28  * Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
  29  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  30  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  31  * @requires vm.gc.G1
  32  * @library /test/lib
  33  * @modules java.base/jdk.internal.misc
  34  *          java.management
  35  * @build SharedStringsWb sun.hotspot.WhiteBox
  36  * @run main ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
  37  * @run main SharedStrings
  38  */
  39 
  40 import jdk.test.lib.cds.CDSTestUtils;
  41 import jdk.test.lib.process.ProcessTools;
  42 import jdk.test.lib.process.OutputAnalyzer;
  43 
  44 public class SharedStrings {
  45     public static void main(String[] args) throws Exception {




   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @requires vm.cds
  27  * @summary Check to make sure that shared strings in the bootstrap CDS archive
  28  *          are actually shared
  29  * Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
  30  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  31  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  32  * @requires vm.gc.G1
  33  * @library /test/lib
  34  * @modules java.base/jdk.internal.misc
  35  *          java.management
  36  * @build SharedStringsWb sun.hotspot.WhiteBox
  37  * @run main ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
  38  * @run main SharedStrings
  39  */
  40 
  41 import jdk.test.lib.cds.CDSTestUtils;
  42 import jdk.test.lib.process.ProcessTools;
  43 import jdk.test.lib.process.OutputAnalyzer;
  44 
  45 public class SharedStrings {
  46     public static void main(String[] args) throws Exception {


< prev index next >