diff options
author | Amos Shi <ashi@openjdk.org> | 2024-04-23 07:13:06 +0000 |
---|---|---|
committer | Amos Shi <ashi@openjdk.org> | 2024-04-23 07:13:06 +0000 |
commit | 358a35a6a93fc28a1a8cf18f2cd890fa598c384e (patch) | |
tree | cf319bedef08ecc584da80d4b0bc522fc22ab57e | |
parent | 7af75fb400a0a450d7ee5e7c89fe4e024e60ede3 (diff) | |
download | jdk11-358a35a6a93fc28a1a8cf18f2cd890fa598c384e.tar.gz |
8326006: Allow TEST_VM_FLAGLESS to set flagless mode
Backport-of: d10f277bd39bb5ac9bd48939c916de607fef8ace
-rw-r--r-- | test/jtreg-ext/requires/VMProps.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/jtreg-ext/requires/VMProps.java b/test/jtreg-ext/requires/VMProps.java index 07879d44ce..c31290ac52 100644 --- a/test/jtreg-ext/requires/VMProps.java +++ b/test/jtreg-ext/requires/VMProps.java @@ -571,14 +571,15 @@ public class VMProps implements Callable<Map<String, String>> { * Checks if we are in <i>almost</i> out-of-box configuration, i.e. the flags * which JVM is started with don't affect its behavior "significantly". * {@code TEST_VM_FLAGLESS} enviroment variable can be used to force this - * method to return true and allow any flags. + * method to return true or false and allow or reject any flags. * * @return true if there are no JVM flags */ private String isFlagless() { boolean result = true; - if (System.getenv("TEST_VM_FLAGLESS") != null) { - return "" + result; + String flagless = System.getenv("TEST_VM_FLAGLESS"); + if (flagless != null) { + return "" + "true".equalsIgnoreCase(flagless); } List<String> allFlags = new ArrayList<String>(); |