test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java
changeset 54927 1512d88b24c6
parent 52032 2f7a2e7c3221
--- a/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java	Fri May 17 10:48:02 2019 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java	Fri May 17 08:29:55 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,10 +72,22 @@
                 continue;
 
             OutputAnalyzer dumpOutput = TestCommon.dump(appJar, classList, testEntry);
-            TestCommon.checkDump(dumpOutput, "Loading classes to share");
+            if (!TestCommon.isDynamicArchive()) {
+                TestCommon.checkDump(dumpOutput, "Loading classes to share");
+            } else {
+                if (testEntry.contains("ObjectAlignmentInBytes")) {
+                   dumpOutput.shouldHaveExitValue(1)
+                             .shouldMatch("The shared archive file's ObjectAlignmentInBytes of .* does not equal the current ObjectAlignmentInBytes of");
+                } else {
+                   TestCommon.checkDump(dumpOutput, "Loading classes to share");
+                }
+            }
 
-            OutputAnalyzer execOutput = TestCommon.exec(appJar, testEntry, "Hello");
-            TestCommon.checkExec(execOutput, "Hello World");
+            if ((TestCommon.isDynamicArchive() && !testEntry.contains("ObjectAlignmentInBytes")) ||
+                !TestCommon.isDynamicArchive()) {
+                OutputAnalyzer execOutput = TestCommon.exec(appJar, testEntry, "Hello");
+                TestCommon.checkExec(execOutput, "Hello World");
+            }
         }
 
         for (int i=0; i<2; i++) {