hotspot/test/runtime/NMT/AutoshutdownNMT.java
author chegar
Sat, 09 Apr 2016 23:03:39 +0100
changeset 36851 03e2f4d0a421
parent 32823 ca8fef4cd57b
child 40631 ed82623d7831
permissions -rw-r--r--
8153737: Unsupported Module Reviewed-by: alanb, mchung, psandoz
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25952
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     1
/*
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 26147
diff changeset
     2
 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
25952
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     4
 *
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     7
 * published by the Free Software Foundation.
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     8
 *
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    13
 * accompanied this code).
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    14
 *
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    18
 *
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    21
 * questions.
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    22
 */
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    23
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    24
/*
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    25
 * @test
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    26
 * @key nmt
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    27
 * @summary Test for deprecated message if -XX:-AutoShutdownNMT is specified
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    28
 * @library /testlibrary
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 32823
diff changeset
    29
 * @modules java.base/jdk.internal.misc
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 26147
diff changeset
    30
 *          java.management
25952
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    31
 */
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    32
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    33
import jdk.test.lib.*;
25952
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    34
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    35
public class AutoshutdownNMT {
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    36
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    37
    public static void main(String args[]) throws Exception {
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    38
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    39
        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    40
                "-XX:NativeMemoryTracking=detail",
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    41
                "-XX:-AutoShutdownNMT",
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    42
                "-version");
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    43
        OutputAnalyzer output = new OutputAnalyzer(pb.start());
32823
ca8fef4cd57b 8066821: Enhance command line processing to manage deprecating and obsoleting -XX command line arguments
drwhite
parents: 30604
diff changeset
    44
        output.shouldContain("Ignoring option AutoShutdownNMT");
25952
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    45
    }
25c2dca04a31 8054952: [TESTBUG] Add missing NMT2 tests
gtriantafill
parents:
diff changeset
    46
}