8196657: [Testbug] TestOptionsWithRanges will fail for newly obsoleted flags that have not yet been removed

Reviewed-by: kbarrett, tschatzl
This commit is contained in:
David Holmes 2018-02-05 06:42:42 -05:00
parent a4630a5b3b
commit b7c0ee5812

View File

@ -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 @@ public abstract class JVMOption {
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;