hotspot/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java
author dholmes
Mon, 23 Nov 2015 21:05:43 -0500
changeset 34267 425c08df6f21
parent 33616 1c4a01071852
child 34618 445eb59995bb
permissions -rw-r--r--
8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev Reviewed-by: coleenp, hseigel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     1
/*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     4
 *
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     8
 *
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    13
 * accompanied this code).
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    14
 *
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    18
 *
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    21
 * questions.
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    22
 */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    23
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    24
import jdk.test.lib.*;
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    25
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    26
/*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    27
 * @test
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    28
 * @bug 8129855
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    29
 * @summary -XX:+IgnoreUnrecognizedVMOptions should work according to the spec from JDK-8129855
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    30
 *
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    31
 * @library /testlibrary
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    32
 * @modules java.base/sun.misc
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    33
 *          java.management
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    34
 * @run main IgnoreUnrecognizedVMOptions
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    35
 */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    36
public class IgnoreUnrecognizedVMOptions {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    37
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    38
  private static void runJavaAndCheckExitValue(boolean shouldSucceed, String... args) throws Exception {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    39
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    40
    OutputAnalyzer output = new OutputAnalyzer(pb.start());
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    41
    if (shouldSucceed) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    42
      output.shouldHaveExitValue(0);
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    43
    } else {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    44
      output.shouldHaveExitValue(1);
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    45
    }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    46
  }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    47
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    48
  public static void main(String[] args) throws Exception {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    49
    boolean product = !Platform.isDebugBuild();
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    50
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    51
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    52
      #1.1 wrong value and non-existing flag:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    53
                                    exists, invalid value           does not exist
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    54
                                    -XX:MinHeapFreeRatio=notnum     -XX:THIS_FLAG_DOESNT_EXIST
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    55
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    56
      +IgnoreUnrecognizedVMOptions               ERR                           OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    57
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    58
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:MinHeapFreeRatio=notnum", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    59
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:THIS_FLAG_DOESNT_EXIST", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    60
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:MinHeapFreeRatio=notnum", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    61
    runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:THIS_FLAG_DOESNT_EXIST", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    62
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    63
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    64
      #1.2 normal flag with ranges:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    65
                                      exists, in range                exists, out of range
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    66
                                      -XX:StackRedPages=1             -XX:StackRedPages=0
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    67
      -IgnoreUnrecognizedVMOptions               OK                            ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    68
      +IgnoreUnrecognizedVMOptions               OK                            ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    69
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    70
    runJavaAndCheckExitValue(true, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=1", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    71
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=0", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    72
    runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=1", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    73
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=0", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    74
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    75
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    76
      #1.3 develop & notproduct flag on debug VM:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    77
                                      develop & !product_build        notproduct & !product_build
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    78
                                      -XX:+DeoptimizeALot             -XX:+VerifyCodeCache
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    79
      -IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    80
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    81
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    82
    if (!product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    83
      runJavaAndCheckExitValue(true, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    84
      runJavaAndCheckExitValue(true, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    85
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    86
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    87
    }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    88
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    89
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    90
      #1.4 develop & notproduct flag on product VM:
33616
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
    91
                                    develop & !product_build           notproduct & product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
    92
                                    -XX:+DeoptimizeALot                -XX:+VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    93
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    94
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    95
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    96
    if (product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    97
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    98
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    99
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   100
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   101
    }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   102
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   103
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   104
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   105
      #1.5 malformed develop & notproduct flag on debug VM:
33616
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   106
                                  develop & !product_build             notproduct & !product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   107
                                  -XX:DeoptimizeALot                   -XX:VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   108
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   109
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   110
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   111
    if (!product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   112
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   113
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   114
      runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   115
      runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   116
    }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   117
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   118
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   119
      #1.6 malformed develop & notproduct flag on product VM:
33616
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   120
                                    develop & !product_build           notproduct & product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   121
                                    -XX:DeoptimizeALot                 -XX:VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   122
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   123
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   124
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   125
    if (product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   126
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   127
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   128
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   129
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   130
    }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   131
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   132
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   133
      #1.7 locked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   134
                                      diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   135
                                      -XX:-UnlockDiagnosticVMOptions  -XX:-UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   136
                                      -XX:+PrintInlining              -XX:+AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   137
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   138
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   139
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   140
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:+PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   141
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:+AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   142
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:+PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   143
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:+AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   144
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   145
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   146
      #1.8 malformed locked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   147
                                    diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   148
                                    -XX:-UnlockDiagnosticVMOptions  -XX:-UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   149
                                    -XX:PrintInlining               -XX:AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   150
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   151
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   152
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   153
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   154
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   155
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   156
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   157
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   158
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   159
      #1.9 malformed unlocked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   160
                                    diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   161
                                    -XX:+UnlockDiagnosticVMOptions  -XX:+UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   162
                                    -XX:PrintInlining               -XX:AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   163
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   164
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   165
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   166
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   167
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   168
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   169
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   170
  }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   171
}