test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
400 exitCode = out.getExitValue(); |
400 exitCode = out.getExitValue(); |
401 |
401 |
402 if (out.getOutput().contains("A fatal error has been detected by the Java Runtime Environment")) { |
402 if (out.getOutput().contains("A fatal error has been detected by the Java Runtime Environment")) { |
403 /* Always consider "fatal error" in output as fail */ |
403 /* Always consider "fatal error" in output as fail */ |
404 errorMessage = "JVM output reports a fatal error. JVM exited with code " + exitCode + "!"; |
404 errorMessage = "JVM output reports a fatal error. JVM exited with code " + exitCode + "!"; |
|
405 } else if (out.getStderr().contains("Ignoring option " + name)) { |
|
406 // Watch for newly obsoleted, but not yet removed, flags |
|
407 System.out.println("SKIPPED: Ignoring test result for obsolete flag " + name); |
405 } else if (valid == true) { |
408 } else if (valid == true) { |
406 if (!allowedExitCodes.contains(exitCode)) { |
409 if (!allowedExitCodes.contains(exitCode)) { |
407 errorMessage = "JVM exited with unexpected error code = " + exitCode; |
410 errorMessage = "JVM exited with unexpected error code = " + exitCode; |
408 } else if ((exitCode != 0) && (out.getOutput().isEmpty() == true)) { |
411 } else if ((exitCode != 0) && (out.getOutput().isEmpty() == true)) { |
409 errorMessage = "JVM exited with error(exitcode == " + exitCode + "), but with empty stdout and stderr. " + |
412 errorMessage = "JVM exited with error(exitcode == " + exitCode + "), but with empty stdout and stderr. " + |