author | coleenp |
Wed, 10 May 2017 14:03:33 +0000 | |
changeset 46450 | 7a361ede7817 |
parent 42607 | acd91f1875d4 |
child 44836 | 45196b7066e3 |
permissions | -rw-r--r-- |
41687
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
1 |
/* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
4 |
* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
8 |
* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
13 |
* accompanied this code). |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
14 |
* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
18 |
* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
21 |
* questions. |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
22 |
*/ |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
23 |
|
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
24 |
/* |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
25 |
* @test TestBasicLogOutput |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
26 |
* @summary Ensure -XX:-JVMCIPrintProperties can be enabled and successfully prints expected output to stdout. |
42607
acd91f1875d4
8170227: use vm.jvmci property in compiler/jvmci tests
iignatyev
parents:
42026
diff
changeset
|
27 |
* @requires vm.jvmci |
41687
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
28 |
* @library /test/lib |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
29 |
*/ |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
30 |
|
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
31 |
import jdk.test.lib.process.ProcessTools; |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
32 |
import jdk.test.lib.process.OutputAnalyzer; |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
33 |
|
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
34 |
public class TestJVMCIPrintProperties { |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
35 |
|
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
36 |
public static void main(String[] args) throws Exception { |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
37 |
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
38 |
"-XX:+UnlockExperimentalVMOptions", |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
39 |
"-XX:+EnableJVMCI", |
42026
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
40 |
"-XX:+JVMCIPrintProperties"); |
41687
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
41 |
OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
42 |
output.shouldContain("[JVMCI properties]"); // expected message |
42026
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
43 |
output.shouldContain("jvmci.Compiler = null"); // expected message |
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
44 |
output.shouldContain("jvmci.InitTimer = false"); // expected message |
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
45 |
output.shouldContain("jvmci.PrintConfig = false"); // expected message |
b909beeb863f
8168295: [JVMCI] -XX:+JVMCIPrintProperties should exit after printing
dnsimon
parents:
41687
diff
changeset
|
46 |
output.shouldContain("jvmci.TraceMethodDataFilter = null"); // expected message |
41687
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
47 |
output.shouldHaveExitValue(0); |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
48 |
} |
6b97c4598667
8167194: [JVMCI] no reliable mechanism for querying JVMCI system properties
dnsimon
parents:
diff
changeset
|
49 |
} |