test/hotspot/jtreg/compiler/aot/SharedUsageTest.java
changeset 57681 41f2f2829a09
parent 48796 5264a11d3753
equal deleted inserted replaced
57680:cafd691c6c04 57681:41f2f2829a09
     1 /*
     1 /*
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 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.
    29  * @build compiler.aot.SharedUsageTest
    29  * @build compiler.aot.SharedUsageTest
    30  *        compiler.aot.AotCompiler
    30  *        compiler.aot.AotCompiler
    31  * @run driver compiler.aot.AotCompiler -libname libSharedUsageTest.so
    31  * @run driver compiler.aot.AotCompiler -libname libSharedUsageTest.so
    32  *      -class compiler.aot.SharedUsageTest
    32  *      -class compiler.aot.SharedUsageTest
    33  *      -extraopt -XX:-UseCompressedOops
    33  *      -extraopt -XX:-UseCompressedOops
    34  * @run main/othervm -XX:+UseAOT -XX:AOTLibrary=./libSharedUsageTest.so
    34  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseAOT
       
    35  *      -XX:AOTLibrary=./libSharedUsageTest.so
    35  *      -XX:-UseCompressedOops
    36  *      -XX:-UseCompressedOops
    36  *      -Dcompiler.aot.SharedUsageTest.parent=true
    37  *      -Dcompiler.aot.SharedUsageTest.parent=true
    37  *      compiler.aot.SharedUsageTest
    38  *      compiler.aot.SharedUsageTest
    38  * @summary check if .so can be successfully shared with 2 java processes
    39  * @summary check if .so can be successfully shared with 2 java processes
    39  */
    40  */
    60                A respective message is triggered by PrintAOT option. */
    61                A respective message is triggered by PrintAOT option. */
    61             CommandLineOptionTest.verifyJVMStartup(
    62             CommandLineOptionTest.verifyJVMStartup(
    62                     new String[]{"libSharedUsageTest.so  aot library",
    63                     new String[]{"libSharedUsageTest.so  aot library",
    63                         HELLO_MSG}, null, "Unexpected exit code",
    64                         HELLO_MSG}, null, "Unexpected exit code",
    64                     "Unexpected output", ExitCode.OK, ADD_TEST_VM_OPTION,
    65                     "Unexpected output", ExitCode.OK, ADD_TEST_VM_OPTION,
    65                     "-XX:+UseAOT", "-XX:+PrintAOT",
    66                     "-XX:+UnlockExperimentalVMOptions", "-XX:+UseAOT", "-XX:+PrintAOT",
    66                     "-Dtest.jdk=" + Utils.TEST_JDK,
    67                     "-Dtest.jdk=" + Utils.TEST_JDK,
    67                     "-XX:AOTLibrary=./libSharedUsageTest.so",
    68                     "-XX:AOTLibrary=./libSharedUsageTest.so",
    68                     SharedUsageTest.class.getName());
    69                     SharedUsageTest.class.getName());
    69             Asserts.assertFalse(shouldBeFalseInParent, "A static member got "
    70             Asserts.assertFalse(shouldBeFalseInParent, "A static member got "
    70                     + "unexpectedly changed");
    71                     + "unexpectedly changed");