--- a/common/autoconf/generated-configure.sh Thu Feb 09 23:23:58 2017 +0100
+++ b/common/autoconf/generated-configure.sh Fri Feb 10 15:14:26 2017 +0100
@@ -5170,7 +5170,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1486678910
+DATE_WHEN_GENERATED=1486736061
###############################################################################
#
--- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java Thu Feb 09 23:23:58 2017 +0100
+++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java Fri Feb 10 15:14:26 2017 +0100
@@ -199,6 +199,10 @@
throws Throwable {
List<String> finalOptions = new ArrayList<>();
finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+ String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+ if (extraFlagForEmulated != null) {
+ finalOptions.add(extraFlagForEmulated);
+ }
Collections.addAll(finalOptions, options);
CommandLineOptionTest.verifyJVMStartup(expectedMessages,
@@ -390,6 +394,10 @@
String... additionalVMOpts) throws Throwable {
List<String> finalOptions = new ArrayList<>();
finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+ String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+ if (extraFlagForEmulated != null) {
+ finalOptions.add(extraFlagForEmulated);
+ }
Collections.addAll(finalOptions, additionalVMOpts);
CommandLineOptionTest.verifyOptionValue(optionName, expectedValue,
@@ -497,6 +505,18 @@
throw new RuntimeException("Unknown VM mode.");
}
+ /**
+ * @return addtional VMoptions(Emulated related) required to start a new VM with the same type as current.
+ */
+ private static String getVMTypeOptionForEmulated() {
+ if (Platform.isServer() && !Platform.isEmulatedClient()) {
+ return "-XX:-NeverActAsServerClassMachine";
+ } else if (Platform.isEmulatedClient()) {
+ return "-XX:+NeverActAsServerClassMachine";
+ }
+ return null;
+ }
+
private final BooleanSupplier predicate;
/**