8196657: [Testbug] TestOptionsWithRanges will fail for newly obsoleted flags that have not yet been removed
Reviewed-by: kbarrett, tschatzl
--- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java Mon Feb 05 09:15:32 2018 +0100
+++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java Mon Feb 05 06:42:42 2018 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -402,6 +402,9 @@
if (out.getOutput().contains("A fatal error has been detected by the Java Runtime Environment")) {
/* Always consider "fatal error" in output as fail */
errorMessage = "JVM output reports a fatal error. JVM exited with code " + exitCode + "!";
+ } else if (out.getStderr().contains("Ignoring option " + name)) {
+ // Watch for newly obsoleted, but not yet removed, flags
+ System.out.println("SKIPPED: Ignoring test result for obsolete flag " + name);
} else if (valid == true) {
if (!allowedExitCodes.contains(exitCode)) {
errorMessage = "JVM exited with unexpected error code = " + exitCode;