8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855
authorshade
Tue, 06 Aug 2019 12:14:41 +0200
changeset 57653 06eed83ab4cd
parent 57652 758da77e4cd2
child 57654 dd0f6703203f
8229134: [TESTBUG] 32-bit build fails gc/arguments/TestSurvivorAlignmentInBytesOption.java after JDK-8228855 Reviewed-by: tschatzl
test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java
--- a/test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java	Tue Aug 06 11:57:42 2019 +0200
+++ b/test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java	Tue Aug 06 12:14:41 2019 +0200
@@ -23,6 +23,7 @@
 
 package gc.arguments;
 
+import jdk.test.lib.Platform;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
@@ -86,16 +87,18 @@
         // Verify that if specified SurvivorAlignmentInBytes is lower than
         // ObjectAlignmentInBytes, then the JVM startup will fail with
         // appropriate error message.
-        shouldFailMessage = String.format("JVM startup should fail with "
-                + "'%s' option value lower than ObjectAlignmentInBytes", optionName);
-        CommandLineOptionTest.verifyJVMStartup(
-                new String[]{valueIsTooSmall}, null,
-                shouldFailMessage, shouldFailMessage,
-                ExitCode.FAIL, false,
-                CommandLineOptionTest.prepareBooleanFlag(
-                        unlockExperimentalVMOpts, true),
-                CommandLineOptionTest.prepareNumericFlag(optionName, 8),
-                CommandLineOptionTest.prepareNumericFlag("ObjectAlignmentInBytes", 16));
+        if (Platform.is64bit()) {
+            shouldFailMessage = String.format("JVM startup should fail with "
+                    + "'%s' option value lower than ObjectAlignmentInBytes", optionName);
+            CommandLineOptionTest.verifyJVMStartup(
+                    new String[]{valueIsTooSmall}, null,
+                    shouldFailMessage, shouldFailMessage,
+                    ExitCode.FAIL, false,
+                    CommandLineOptionTest.prepareBooleanFlag(
+                            unlockExperimentalVMOpts, true),
+                    CommandLineOptionTest.prepareNumericFlag(optionName, 8),
+                    CommandLineOptionTest.prepareNumericFlag("ObjectAlignmentInBytes", 16));
+        }
 
         // Verify that if specified SurvivorAlignmentInBytes value is not
         // a power of 2 then the JVM startup will fail with appropriate error