32 * @library /test/lib |
32 * @library /test/lib |
33 * @modules java.base/jdk.internal.misc |
33 * @modules java.base/jdk.internal.misc |
34 * java.compiler |
34 * java.compiler |
35 * java.management |
35 * java.management |
36 * jdk.internal.jvmstat/sun.jvmstat.monitor |
36 * jdk.internal.jvmstat/sun.jvmstat.monitor |
37 * @run testng/othervm -Xmx129m -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right -XX:-TieredCompilation FlagsTest |
37 * @run testng/othervm -Xmx129m -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right FlagsTest |
38 */ |
38 */ |
39 public class FlagsTest { |
39 public class FlagsTest { |
40 public void run(CommandExecutor executor) { |
40 public void run(CommandExecutor executor) { |
41 OutputAnalyzer output = executor.execute("VM.flags"); |
41 OutputAnalyzer output = executor.execute("VM.flags"); |
42 |
42 |
43 /* The following are interpreted by the JVM as actual "flags" */ |
43 /* The following are interpreted by the JVM as actual "flags" */ |
44 output.shouldContain("-XX:+UnlockDiagnosticVMOptions"); |
44 output.shouldContain("-XX:+UnlockDiagnosticVMOptions"); |
45 output.shouldContain("-XX:+IgnoreUnrecognizedVMOptions"); |
45 output.shouldContain("-XX:+IgnoreUnrecognizedVMOptions"); |
46 output.shouldContain("-XX:-TieredCompilation"); |
|
47 |
46 |
48 /* The following are not */ |
47 /* The following are not */ |
49 output.shouldNotContain("-Xmx129m"); |
48 output.shouldNotContain("-Xmx129m"); |
50 output.shouldNotContain("-XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right"); |
49 output.shouldNotContain("-XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right"); |
51 } |
50 } |