test/hotspot/jtreg/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java
author epavlova
Thu, 20 Jun 2019 11:42:33 -0700
changeset 55455 76647c08ce0c
parent 47216 71c04702a3d5
permissions -rw-r--r--
8225684: [AOT] vmTestbase/vm/oom/production/AlwaysOOMProduction tests fail with AOTed java.base Reviewed-by: kvn
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
/*
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
     2
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
33592
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
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    24
import jdk.test.lib.process.ProcessTools;
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    25
import jdk.test.lib.process.OutputAnalyzer;
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    26
import jdk.test.lib.Platform;
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    27
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    28
/*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    29
 * @test
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    30
 * @bug 8129855
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    31
 * @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
    32
 *
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    33
 * @library /test/lib
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 34618
diff changeset
    34
 * @modules java.base/jdk.internal.misc
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    35
 *          java.management
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    36
 * @run main 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
public class IgnoreUnrecognizedVMOptions {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    39
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    40
  private static void runJavaAndCheckExitValue(boolean shouldSucceed, String... args) throws Exception {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    41
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    42
    OutputAnalyzer output = new OutputAnalyzer(pb.start());
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    43
    if (shouldSucceed) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    44
      output.shouldHaveExitValue(0);
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    45
    } else {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    46
      output.shouldHaveExitValue(1);
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
  }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    49
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    50
  public static void main(String[] args) throws Exception {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    51
    boolean product = !Platform.isDebugBuild();
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    52
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    53
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    54
      #1.1 wrong value and non-existing flag:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    55
                                    exists, invalid value           does not exist
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    56
                                    -XX:MinHeapFreeRatio=notnum     -XX:THIS_FLAG_DOESNT_EXIST
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    57
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    58
      +IgnoreUnrecognizedVMOptions               ERR                           OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    59
    */
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(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:THIS_FLAG_DOESNT_EXIST", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    62
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:MinHeapFreeRatio=notnum", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    63
    runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:THIS_FLAG_DOESNT_EXIST", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    64
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    65
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    66
      #1.2 normal flag with ranges:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    67
                                      exists, in range                exists, out of range
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    68
                                      -XX:StackRedPages=1             -XX:StackRedPages=0
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    69
      -IgnoreUnrecognizedVMOptions               OK                            ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    70
      +IgnoreUnrecognizedVMOptions               OK                            ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    71
    */
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
    runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=1", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    75
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=0", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    76
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    77
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    78
      #1.3 develop & notproduct flag on debug VM:
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    79
                                      develop & !product_build        notproduct & !product_build
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    80
                                      -XX:+DeoptimizeALot             -XX:+VerifyCodeCache
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    81
      -IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    82
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    83
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    84
    if (!product) {
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
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    88
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
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
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    91
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    92
      #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
    93
                                    develop & !product_build           notproduct & product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
    94
                                    -XX:+DeoptimizeALot                -XX:+VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    95
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    96
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    97
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    98
    if (product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
    99
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   100
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   101
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   102
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
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
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   106
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   107
      #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
   108
                                  develop & !product_build             notproduct & !product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   109
                                  -XX:DeoptimizeALot                   -XX:VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   110
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   111
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   112
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   113
    if (!product) {
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
      runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   117
      runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
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
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   120
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   121
      #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
   122
                                    develop & !product_build           notproduct & product_build
1c4a01071852 8140539: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
gziemski
parents: 33592
diff changeset
   123
                                    -XX:DeoptimizeALot                 -XX:VerifyCodeCache
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   124
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   125
      +IgnoreUnrecognizedVMOptions               OK                            OK
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   126
    */
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   127
    if (product) {
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   128
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   129
      runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   130
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   131
      runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
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
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   134
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   135
      #1.7 locked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   136
                                      diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   137
                                      -XX:-UnlockDiagnosticVMOptions  -XX:-UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   138
                                      -XX:+PrintInlining              -XX:+AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   139
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   140
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   141
    */
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
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:+PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   145
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:+AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   146
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   147
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   148
      #1.8 malformed locked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   149
                                    diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   150
                                    -XX:-UnlockDiagnosticVMOptions  -XX:-UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   151
                                    -XX:PrintInlining               -XX:AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   152
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   153
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   154
    */
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
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   158
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   159
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   160
    /*
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   161
      #1.9 malformed unlocked flag:
34267
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   162
                                    diagnostic & locked             experimental & locked
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   163
                                    -XX:+UnlockDiagnosticVMOptions  -XX:+UnlockExperimentalVMOptions
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   164
                                    -XX:PrintInlining               -XX:AlwaysSafeConstructors
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   165
      -IgnoreUnrecognizedVMOptions               ERR                           ERR
425c08df6f21 8143836: [TESTBUG] runtime/CommandLine/IgnoreUnrecognizedVMOptions fails in jdk9/dev
dholmes
parents: 33616
diff changeset
   166
      +IgnoreUnrecognizedVMOptions               ERR                           ERR
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   167
    */
34618
445eb59995bb 8144084: [TESTBUG] 1.9 section not unlock flag in runtime/CommandLine/IgnoreUnrecognizedVMOptions test
ddmitriev
parents: 34267
diff changeset
   168
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
445eb59995bb 8144084: [TESTBUG] 1.9 section not unlock flag in runtime/CommandLine/IgnoreUnrecognizedVMOptions test
ddmitriev
parents: 34267
diff changeset
   169
    runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
445eb59995bb 8144084: [TESTBUG] 1.9 section not unlock flag in runtime/CommandLine/IgnoreUnrecognizedVMOptions test
ddmitriev
parents: 34267
diff changeset
   170
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:PrintInlining", "-version");
445eb59995bb 8144084: [TESTBUG] 1.9 section not unlock flag in runtime/CommandLine/IgnoreUnrecognizedVMOptions test
ddmitriev
parents: 34267
diff changeset
   171
    runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+UnlockExperimentalVMOptions", "-XX:AlwaysSafeConstructors", "-version");
33592
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   172
  }
ceda4a796f5d 8129855: "-XX:+IgnoreUnrecognizedVMOptions" hides out of range VM options.
gziemski
parents:
diff changeset
   173
}