diff options
author | Andrew Lu <andrewlu@openjdk.org> | 2024-02-22 02:55:27 +0000 |
---|---|---|
committer | Vitaly Provodin <vitaly.provodin@jetbrains.com> | 2024-04-19 15:36:00 +0700 |
commit | 3f921c41251c936e5cb0d62e2d11128c7ebbac1c (patch) | |
tree | ad047cf077f1bde8b6dc169c52a085649b4bf3f1 | |
parent | ceaaf2c04d31647800ce96ebfd60d582c98babd1 (diff) | |
download | JetBrainsRuntime-3f921c41251c936e5cb0d62e2d11128c7ebbac1c.tar.gz |
8314830: runtime/ErrorHandling/ tests ignore external VM flags
Reviewed-by: mbaesken
Backport-of: b685ee00b273f029aa2ed5015e64cf409b0b0408
19 files changed, 39 insertions, 18 deletions
diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/BadNativeStackInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/BadNativeStackInErrorHandlingTest.java index 64faeada1eb..a51a891b031 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/BadNativeStackInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/BadNativeStackInErrorHandlingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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 @@ -35,6 +35,7 @@ import jdk.test.lib.process.ProcessTools; * @bug 8194652 * @summary Printing native stack shows an "error occurred during error reporting". * @modules java.base/jdk.internal.misc + * @requires vm.flagless * @requires vm.debug * @requires vm.flavor != "zero" * @library /test/lib diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileOverwriteTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileOverwriteTest.java index c9b9e433e18..ea8e944aebb 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileOverwriteTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileOverwriteTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, SAP. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,6 +30,7 @@ * in the error file name) * @library /test/lib * @modules java.base/jdk.internal.misc + * @requires vm.flagless * @requires (vm.debug == true) * @run driver ErrorFileOverwriteTest */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileRedirectTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileRedirectTest.java index 154d5cf0e12..3c32c6f8141 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileRedirectTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/ErrorFileRedirectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, SAP. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,6 +29,7 @@ * @summary Test ErrorFileToStderr and ErrorFileToStdout * @library /test/lib * @modules java.base/jdk.internal.misc + * @requires vm.flagless * @requires (vm.debug == true) * @run driver ErrorFileRedirectTest */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java index 0095c835d2d..1e91c2529f5 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 8272586 + * @requires vm.flagless * @requires vm.compiler2.enabled * @summary Test that abstract machine code is dumped for the top frames in a hs-err log * @library /test/lib diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java index d21c8a04ab6..c897de4fa45 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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 @@ -33,6 +33,7 @@ import jdk.test.lib.process.ProcessTools; /* * @test + * @requires vm.flagless * @requires (vm.debug == true) * @bug 8167108 * @summary Nested ThreadsListHandle info should be in error handling output. diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java index 0f0b48bedec..dc54b09156c 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -30,6 +30,7 @@ * java.compiler * java.management * jdk.internal.jvmstat/sun.jvmstat.monitor + * @requires vm.flagless * @run driver ProblematicFrameTest */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java index 8f3419d88e8..241d41878fe 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -36,6 +36,7 @@ import jdk.test.lib.process.ProcessTools; * @summary SafeFetch32 and SafeFetchN do not work in error handling * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @requires vm.debug * @requires vm.flavor != "zero" * @author Thomas Stuefe (SAP) diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java index 7790d069ac3..8fa7fd5c6be 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -27,6 +27,7 @@ * @bug 8065896 * @summary Synchronous signals during error reporting may terminate or hang VM process * @library /test/lib + * @requires vm.flagless * @requires vm.debug * @requires os.family != "windows" * @author Thomas Stuefe (SAP) diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/ShowRegistersOnAssertTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/ShowRegistersOnAssertTest.java index f0e44564a0e..098818e6676 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/ShowRegistersOnAssertTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/ShowRegistersOnAssertTest.java @@ -27,6 +27,7 @@ * @bug 8191101 * @summary Show Registers on assert/guarantee * @library /test/lib + * @requires vm.flagless * @requires (vm.debug == true) & (os.family == "linux") * @author Thomas Stuefe (SAP) * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java index 3ef7c868462..2b33f4ffb53 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java @@ -26,6 +26,7 @@ * @summary Test using -XX:+CrashOnOutOfMemoryError * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @run driver TestCrashOnOutOfMemoryError * @bug 8138745 */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java index 2159442c08c..e56ed4a1b03 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -26,6 +26,7 @@ * @summary Test using -XX:ExitOnOutOfMemoryError * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @run driver TestExitOnOutOfMemoryError * @bug 8138745 */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestGZippedHeapDumpOnOutOfMemoryError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestGZippedHeapDumpOnOutOfMemoryError.java index 40f6a6e4705..a2a0154f0b3 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestGZippedHeapDumpOnOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestGZippedHeapDumpOnOutOfMemoryError.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 SAP SE. All rights reserved. + * Copyright (c) 2023, 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 @@ -32,6 +33,7 @@ * @test * @summary Test verifies that -XX:HeapDumpGzipLevel=1 works * @library /test/lib + * @requires vm.flagless * @run driver/timeout=240 TestGZippedHeapDumpOnOutOfMemoryError run 1 */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java index d5293cde704..9324adbb2e0 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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 @@ -25,6 +25,7 @@ * @test TestHeapDumpOnOutOfMemoryError * @summary Test verifies that -XX:HeapDumpOnOutOfMemoryError dumps heap when OutOfMemory is thrown in heap * @library /test/lib + * @requires vm.flagless * @run driver TestHeapDumpOnOutOfMemoryError run heap */ @@ -32,6 +33,7 @@ * @test TestHeapDumpOnOutOfMemoryError * @summary Test verifies that -XX:HeapDumpOnOutOfMemoryError dumps heap when OutOfMemory is thrown in metaspace. * @library /test/lib + * @requires vm.flagless * @run driver/timeout=240 TestHeapDumpOnOutOfMemoryError run metaspace */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpPath.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpPath.java index b1c4dc0c357..0cc6dbc765f 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpPath.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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 @@ -25,6 +25,7 @@ * @test TestHeapDumpPath * @summary Test verifies that -XX:HeapDumpPath= supports directory as a parameter. * @library /test/lib + * @requires vm.flagless * @run driver TestHeapDumpPath */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java index 776d1c9dfe7..00475f8bdd7 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -27,6 +27,7 @@ * @summary Test using -XX:OnError=<cmd> * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @requires vm.debug * @run driver TestOnError */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestOnOutOfMemoryError.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestOnOutOfMemoryError.java index 6d72bd59b6d..fe3c5c34f80 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestOnOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestOnOutOfMemoryError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ -26,6 +26,7 @@ * @summary Test using single and multiple -XX:OnOutOfMemoryError=<cmd> * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @run driver TestOnOutOfMemoryError * @bug 8078470 8177522 */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java index 5ab7ad6c1b4..968337984e1 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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 @@ -38,6 +38,7 @@ import jdk.test.lib.process.ProcessTools; * @summary ThreadsListHandle info should be in error handling output. * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @run driver ThreadsListHandleInErrorHandlingTest */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TimeoutInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/TimeoutInErrorHandlingTest.java index 3aba36e1880..5111a229dbc 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TimeoutInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TimeoutInErrorHandlingTest.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2023, Red Hat, Inc. and/or its affiliates. - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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 @@ -41,6 +41,7 @@ import jdk.test.lib.process.ProcessTools; * @summary Hanging Error Reporting steps may lead to torn error logs * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @requires (vm.debug == true) & (os.family != "windows") * @run driver TimeoutInErrorHandlingTest * @author Thomas Stuefe (SAP) @@ -52,6 +53,7 @@ import jdk.test.lib.process.ProcessTools; * @summary Error handling step timeouts should never be blocked by OnError etc. * @modules java.base/jdk.internal.misc * @library /test/lib + * @requires vm.flagless * @requires (vm.debug == true) & (os.family != "windows") * @run driver TimeoutInErrorHandlingTest with-on-error */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java index 09b5c045684..4395775c872 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, SAP. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,6 +29,7 @@ * @summary No hs-err file if fatal error is raised during dynamic initialization. * @library /test/lib * @modules java.base/jdk.internal.misc + * @requires vm.flagless * @requires (vm.debug == true) * @requires os.family == "linux" * @run driver VeryEarlyAssertTest @@ -49,8 +50,7 @@ public class VeryEarlyAssertTest { public static void main(String[] args) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-version"); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-version"); Map<String, String> env = pb.environment(); env.put("HOTSPOT_FATAL_ERROR_DURING_DYNAMIC_INITIALIZATION", "1"); |