test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 57653 06eed83ab4cd
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     1
/*
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 47216
diff changeset
     2
 * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     4
 *
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     8
 *
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    13
 * accompanied this code).
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    14
 *
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    18
 *
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    21
 * questions.
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    22
 */
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    23
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 47216
diff changeset
    24
package gc.arguments;
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 47216
diff changeset
    25
57653
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    26
import jdk.test.lib.Platform;
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    27
import jdk.test.lib.process.ExitCode;
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    28
import jdk.test.lib.cli.CommandLineOptionTest;
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    29
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    30
/**
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    31
 * @test
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    32
 * @bug 8031323
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    33
 * @summary Verify SurvivorAlignmentInBytes option processing.
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    34
 * @library /test/lib
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    35
 * @requires vm.opt.SurvivorAlignmentInBytes == null
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    36
 *           & vm.opt.ObjectAlignmentInBytes == null
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    37
 *           & vm.opt.UnlockExperimentalVMOptions == null
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    38
 *           & (vm.opt.IgnoreUnrecognizedVMOptions == null
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    39
 *              | vm.opt.IgnoreUnrecognizedVMOptions == "false")
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 31371
diff changeset
    40
 * @modules java.base/jdk.internal.misc
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28204
diff changeset
    41
 *          java.management
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 47216
diff changeset
    42
 * @run main gc.arguments.TestSurvivorAlignmentInBytesOption
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    43
 */
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    44
public class TestSurvivorAlignmentInBytesOption {
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    45
    public static void main(String args[]) throws Throwable {
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    46
        String optionName = "SurvivorAlignmentInBytes";
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    47
        String unlockExperimentalVMOpts = "UnlockExperimentalVMOptions";
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    48
        String optionIsExperimental
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    49
                = CommandLineOptionTest.getExperimentalOptionErrorMessage(
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    50
                optionName);
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents: 30604
diff changeset
    51
        String valueIsTooSmall= ".*SurvivorAlignmentInBytes.*must be greater"
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents: 30604
diff changeset
    52
                + " than or equal to ObjectAlignmentInBytes.*";
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents: 30604
diff changeset
    53
        String mustBePowerOf2 = ".*SurvivorAlignmentInBytes.*must be "
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    54
                + "power of 2.*";
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    55
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    56
        // Verify that without -XX:+UnlockExperimentalVMOptions usage of
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    57
        // SurvivorAlignmentInBytes option will cause JVM startup failure
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    58
        // with the warning message saying that that option is experimental.
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    59
        String shouldFailMessage = String.format("JVM option '%s' is "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    60
                + "experimental.%nJVM startup should fail without "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    61
                + "-XX:+UnlockExperimentalVMOptions option", optionName);
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    62
        CommandLineOptionTest.verifyJVMStartup(
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    63
                new String[]{optionIsExperimental}, null,
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    64
                shouldFailMessage, shouldFailMessage,
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    65
                ExitCode.FAIL, false,
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    66
                "-XX:-UnlockExperimentalVMOptions",
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    67
                CommandLineOptionTest.prepareBooleanFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    68
                        unlockExperimentalVMOpts, false),
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    69
                CommandLineOptionTest.prepareNumericFlag(optionName, 64));
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    70
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    71
        // Verify that with -XX:+UnlockExperimentalVMOptions passed to JVM
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    72
        // usage of SurvivorAlignmentInBytes option won't cause JVM startup
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    73
        // failure.
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    74
        String shouldPassMessage = String.format("JVM option '%s' is "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    75
                + "experimental.%nJVM startup should pass with "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    76
                + "-XX:+UnlockExperimentalVMOptions option", optionName);
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    77
        String noWarningMessage = "There should be no warnings when use "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    78
                + "with -XX:+UnlockExperimentalVMOptions option";
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    79
        CommandLineOptionTest.verifyJVMStartup(
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    80
                null, new String[]{optionIsExperimental},
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    81
                shouldPassMessage, noWarningMessage,
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    82
                ExitCode.OK, false,
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    83
                CommandLineOptionTest.prepareBooleanFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    84
                        unlockExperimentalVMOpts, true),
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
    85
                CommandLineOptionTest.prepareNumericFlag(optionName, 64));
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    86
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
    87
        // Verify that if specified SurvivorAlignmentInBytes is lower than
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    88
        // ObjectAlignmentInBytes, then the JVM startup will fail with
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
    89
        // appropriate error message.
57653
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    90
        if (Platform.is64bit()) {
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    91
            shouldFailMessage = String.format("JVM startup should fail with "
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    92
                    + "'%s' option value lower than ObjectAlignmentInBytes", optionName);
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    93
            CommandLineOptionTest.verifyJVMStartup(
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    94
                    new String[]{valueIsTooSmall}, null,
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    95
                    shouldFailMessage, shouldFailMessage,
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    96
                    ExitCode.FAIL, false,
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    97
                    CommandLineOptionTest.prepareBooleanFlag(
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    98
                            unlockExperimentalVMOpts, true),
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
    99
                    CommandLineOptionTest.prepareNumericFlag(optionName, 8),
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
   100
                    CommandLineOptionTest.prepareNumericFlag("ObjectAlignmentInBytes", 16));
06eed83ab4cd 8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
shade
parents: 57609
diff changeset
   101
        }
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   102
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   103
        // Verify that if specified SurvivorAlignmentInBytes value is not
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   104
        // a power of 2 then the JVM startup will fail with appropriate error
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   105
        // message.
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   106
        shouldFailMessage = String.format("JVM startup should fail with "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   107
                + "'%s' option value is not a power of 2", optionName);
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   108
        CommandLineOptionTest.verifyJVMStartup(
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   109
                new String[]{mustBePowerOf2}, null,
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   110
                shouldFailMessage, shouldFailMessage,
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   111
                ExitCode.FAIL, false,
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   112
                CommandLineOptionTest.prepareBooleanFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   113
                        unlockExperimentalVMOpts, true),
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   114
                CommandLineOptionTest.prepareNumericFlag(optionName, 127));
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   115
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   116
        // Verify that if SurvivorAlignmentInBytes has correct value, then
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   117
        // the JVM will be started without errors.
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   118
        shouldPassMessage = String.format("JVM startup should pass with "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   119
                + "correct '%s' option value", optionName);
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   120
        noWarningMessage = String.format("There should be no warnings when use "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   121
                + "correct '%s' option value", optionName);
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   122
        CommandLineOptionTest.verifyJVMStartup(
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   123
                null, new String[]{".*SurvivorAlignmentInBytes.*"},
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   124
                shouldPassMessage, noWarningMessage,
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   125
                ExitCode.OK, false,
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   126
                CommandLineOptionTest.prepareBooleanFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   127
                        unlockExperimentalVMOpts, true),
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   128
                CommandLineOptionTest.prepareNumericFlag(optionName, 128));
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   129
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   130
        // Verify that we can setup different SurvivorAlignmentInBytes values.
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   131
        for (int alignment = 32; alignment <= 128; alignment *= 2) {
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   132
            shouldPassMessage = String.format("JVM startup should pass with "
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   133
                    + "'%s' = %d", optionName, alignment);
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   134
            CommandLineOptionTest.verifyOptionValue(optionName,
28204
344d97fad05b 8067985: merging hs-comp to hs blocked by some tests not updated in 8054892
kvn
parents: 28182
diff changeset
   135
                    Integer.toString(alignment), shouldPassMessage,
28182
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   136
                    CommandLineOptionTest.prepareBooleanFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   137
                            unlockExperimentalVMOpts, true),
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   138
                    CommandLineOptionTest.prepareNumericFlag(
8a51e754d3d8 8066143: [TESTBUG] New tests in gc/survivorAlignment/ fails
fzhinkin
parents: 27890
diff changeset
   139
                            optionName, alignment));
27890
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   140
        }
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   141
    }
9c0e6a049e1f 8037968: Add tests on alignment of objects copied to survivor space
fzhinkin
parents:
diff changeset
   142
}