From 28bf9176b8d460242bb7cedfb3bde5c6294c56fb Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Fri, 17 Oct 2025 16:03:24 +0000 Subject: [PATCH] 8348844: Remove remaining JVMTI tests from ProblemList-Virtual, use requires instead Reviewed-by: dholmes, alanb, syan, sspitsyn --- test/hotspot/jtreg/ProblemList-Virtual.txt | 16 -------------- .../arguments/TestNewSizeThreadIncrease.java | 3 ++- .../gc/g1/TestSkipRebuildRemsetPhase.java | 3 ++- .../MachCodeFramesInErrorFile.java | 3 ++- .../Thread/AsyncExceptionOnMonitorEnter.java | 1 + .../jtreg/runtime/Thread/StopAtExit.java | 3 ++- .../handshake/HandshakeWalkStackTest.java | 3 ++- .../curthrcputime001/TestDescription.java | 3 ++- .../thrcputime001/TestDescription.java | 3 ++- test/jdk/ProblemList-Virtual.txt | 21 ------------------- .../java/lang/StackWalker/CallerFromMain.java | 5 +++-- .../java/lang/StackWalker/DumpStackTest.java | 3 ++- .../java/lang/StackWalker/StackWalkTest.java | 3 ++- test/jdk/java/lang/Thread/MainThreadTest.java | 3 ++- .../lang/Thread/UncaughtExceptionsTest.java | 3 ++- .../java/lang/ref/OOMEInReferenceHandler.java | 3 ++- .../util/concurrent/locks/Lock/OOMEInAQS.java | 3 ++- .../jdk/internal/vm/Continuation/Scoped.java | 3 ++- 18 files changed, 32 insertions(+), 53 deletions(-) diff --git a/test/hotspot/jtreg/ProblemList-Virtual.txt b/test/hotspot/jtreg/ProblemList-Virtual.txt index 3c74d7bf816..31684662194 100644 --- a/test/hotspot/jtreg/ProblemList-Virtual.txt +++ b/test/hotspot/jtreg/ProblemList-Virtual.txt @@ -33,11 +33,6 @@ vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manyDiff_a/TestDescription.java vmTestbase/nsk/jvmti/CompiledMethodUnload/compmethunload001/TestDescription.java 8300711 generic-all -#### -## Tests for functionality which currently is not supported for virtual threads - -vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java 8348844 generic-all -vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java 8348844 generic-all #### ## Test fails because it expects to find vthreads in GetAllThreads @@ -82,14 +77,3 @@ vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemor # to make progress when all other threads are currently suspended. vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.java 8338713 generic-all -########## -## Tests incompatible with with virtual test thread factory. -## There is no goal to run all test with virtual test thread factory. -## So any test migth be added as incompatible, the bug is not required. - -gc/arguments/TestNewSizeThreadIncrease.java 0000000 generic-all -gc/g1/TestSkipRebuildRemsetPhase.java 0000000 generic-all -runtime/ErrorHandling/MachCodeFramesInErrorFile.java 0000000 generic-all -runtime/Thread/AsyncExceptionOnMonitorEnter.java 0000000 generic-all -runtime/Thread/StopAtExit.java 0000000 generic-all -runtime/handshake/HandshakeWalkStackTest.java 0000000 generic-all diff --git a/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java b/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java index efe703f9295..f885ef7e462 100644 --- a/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java +++ b/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ package gc.arguments; * @library /test/lib * @library / * @requires vm.gc.Serial + * @requires test.thread.factory == null * @modules java.base/jdk.internal.misc * java.management * @run driver gc.arguments.TestNewSizeThreadIncrease diff --git a/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java b/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java index d973e897fe1..28524869edb 100644 --- a/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java +++ b/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, 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 @@ -29,6 +29,7 @@ package gc.g1; * Fill up a region to above the set G1MixedGCLiveThresholdPercent. * @requires vm.gc.G1 * @library /test/lib + * @requires test.thread.factory == null * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run driver gc.g1.TestSkipRebuildRemsetPhase diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java index 5717a576e65..74cedae5f1a 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, 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 @@ * @bug 8272586 * @requires vm.flagless * @requires vm.compiler2.enabled + * @requires test.thread.factory == null * @summary Test that abstract machine code is dumped for the top frames in a hs-err log * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java b/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java index 8446ffb20fe..a4aa0fe3797 100644 --- a/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java +++ b/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java @@ -25,6 +25,7 @@ * @test * @bug 8283044 * @summary Stress delivery of asynchronous exceptions while target is at monitorenter + * @requires test.thread.factory == null * @library /test/hotspot/jtreg/testlibrary * @run main/othervm/native AsyncExceptionOnMonitorEnter 0 * @run main/othervm/native -agentlib:AsyncExceptionOnMonitorEnter AsyncExceptionOnMonitorEnter 1 diff --git a/test/hotspot/jtreg/runtime/Thread/StopAtExit.java b/test/hotspot/jtreg/runtime/Thread/StopAtExit.java index 3ceb955609b..68523c2c189 100644 --- a/test/hotspot/jtreg/runtime/Thread/StopAtExit.java +++ b/test/hotspot/jtreg/runtime/Thread/StopAtExit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, 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 * @bug 8167108 8266130 8283467 8284632 8286830 * @summary Stress test JVM/TI StopThread() at thread exit. + * @requires test.thread.factory == null * @requires vm.jvmti * @run main/othervm/native -agentlib:StopAtExit StopAtExit */ diff --git a/test/hotspot/jtreg/runtime/handshake/HandshakeWalkStackTest.java b/test/hotspot/jtreg/runtime/handshake/HandshakeWalkStackTest.java index 701e1ec6ec1..6644d14dbc8 100644 --- a/test/hotspot/jtreg/runtime/handshake/HandshakeWalkStackTest.java +++ b/test/hotspot/jtreg/runtime/handshake/HandshakeWalkStackTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, 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 HandshakeWalkStackTest + * @requires test.thread.factory == null * @library /testlibrary /test/lib * @build HandshakeWalkStackTest * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java index 0b7e1d2a89e..ba09ff735d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, 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 @@ -71,6 +71,7 @@ * COMMENTS * Fixed the 4968019, 5006885 bugs. * + * @requires test.thread.factory == null * @library /vmTestbase * /test/lib * @build nsk.jvmti.GetCurrentThreadCpuTime.curthrcputime001 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java index cf0fe3e5d2d..b935639e183 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, 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 @@ -71,6 +71,7 @@ * COMMENTS * Fixed the 4968019, 5006885 bugs. * + * @requires test.thread.factory == null * @library /vmTestbase * /test/lib * @build nsk.jvmti.GetThreadCpuTime.thrcputime001 diff --git a/test/jdk/ProblemList-Virtual.txt b/test/jdk/ProblemList-Virtual.txt index dcd4dbac310..dffbd4a952e 100644 --- a/test/jdk/ProblemList-Virtual.txt +++ b/test/jdk/ProblemList-Virtual.txt @@ -38,24 +38,3 @@ javax/management/remote/mandatory/connection/DeadLockTest.java 8309069 windows-x javax/management/remote/mandatory/connection/ConnectionTest.java 8308352 windows-x64 -########## -## Tests incompatible with virtual test thread factory. -## There is no goal to run all test with virtual test thread factory. -## So any test might be added as incompatible, the bug id is not required. - -# Incorrect stack/threadgroup/exception expectations for main thread -java/lang/StackWalker/DumpStackTest.java 0000000 generic-all -java/lang/StackWalker/StackWalkTest.java 0000000 generic-all -java/lang/StackWalker/CallerFromMain.java 0000000 generic-all -java/lang/Thread/MainThreadTest.java 0000000 generic-all -java/lang/Thread/UncaughtExceptionsTest.java 0000000 generic-all -java/lang/invoke/condy/CondyNestedResolutionTest.java 0000000 generic-all -java/lang/ref/OOMEInReferenceHandler.java 0000000 generic-all -java/util/concurrent/locks/Lock/OOMEInAQS.java 0000000 generic-all -jdk/internal/vm/Continuation/Scoped.java 0000000 generic-all - -# The problems with permissions -jdk/jfr/startupargs/TestDumpOnExit.java 0000000 generic-all -java/util/Properties/StoreReproducibilityTest.java 0000000 generic-all -javax/management/ImplementationVersion/ImplVersionTest.java 0000000 generic-all -javax/management/remote/mandatory/version/ImplVersionTest.java 0000000 generic-all diff --git a/test/jdk/java/lang/StackWalker/CallerFromMain.java b/test/jdk/java/lang/StackWalker/CallerFromMain.java index 86e7cfb7043..81456b02c36 100644 --- a/test/jdk/java/lang/StackWalker/CallerFromMain.java +++ b/test/jdk/java/lang/StackWalker/CallerFromMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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,8 +24,9 @@ /* * @test * @bug 8140450 - * @library /test/lib * @summary Test if the getCallerClass method returns empty optional + * @requires test.thread.factory == null + * @library /test/lib * @run main CallerFromMain exec */ diff --git a/test/jdk/java/lang/StackWalker/DumpStackTest.java b/test/jdk/java/lang/StackWalker/DumpStackTest.java index c196b1c4ad3..1365e39ccfa 100644 --- a/test/jdk/java/lang/StackWalker/DumpStackTest.java +++ b/test/jdk/java/lang/StackWalker/DumpStackTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 Verify outputs of Thread.dumpStack() and Throwable.printStackTrace(). * This test should also been run against jdk9 successfully except of * VM option MemberNameInStackFrame. + * @requires test.thread.factory == null * @run main/othervm DumpStackTest */ diff --git a/test/jdk/java/lang/StackWalker/StackWalkTest.java b/test/jdk/java/lang/StackWalker/StackWalkTest.java index 80e934d477c..8848f323cab 100644 --- a/test/jdk/java/lang/StackWalker/StackWalkTest.java +++ b/test/jdk/java/lang/StackWalker/StackWalkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -37,6 +37,7 @@ import jdk.test.lib.RandomFactory; * @test * @bug 8140450 * @summary Stack Walk Test (use -Dseed=X to set PRNG seed) + * @requires test.thread.factory == null * @library /test/lib * @build jdk.test.lib.RandomFactory * @compile StackRecorderUtil.java diff --git a/test/jdk/java/lang/Thread/MainThreadTest.java b/test/jdk/java/lang/Thread/MainThreadTest.java index 2482a8aa6d2..7129170ad4e 100644 --- a/test/jdk/java/lang/Thread/MainThreadTest.java +++ b/test/jdk/java/lang/Thread/MainThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 * @bug 4533087 * @summary Test to see if the main thread is in its thread group + * @requires test.thread.factory == null */ public class MainThreadTest { diff --git a/test/jdk/java/lang/Thread/UncaughtExceptionsTest.java b/test/jdk/java/lang/Thread/UncaughtExceptionsTest.java index 915d1cb6b76..1bb810d372f 100644 --- a/test/jdk/java/lang/Thread/UncaughtExceptionsTest.java +++ b/test/jdk/java/lang/Thread/UncaughtExceptionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, 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 org.junit.jupiter.params.provider.MethodSource; * @bug 4833089 4992454 * @summary Check for proper handling of uncaught exceptions * @author Martin Buchholz + * @requires test.thread.factory == null * @library /test/lib * @build jdk.test.lib.process.* * @run junit UncaughtExceptionsTest diff --git a/test/jdk/java/lang/ref/OOMEInReferenceHandler.java b/test/jdk/java/lang/ref/OOMEInReferenceHandler.java index 2f80fa6178a..9f0a4ea378e 100644 --- a/test/jdk/java/lang/ref/OOMEInReferenceHandler.java +++ b/test/jdk/java/lang/ref/OOMEInReferenceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, 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 * @bug 7038914 8016341 * @summary Verify that the reference handler does not die after an OOME allocating the InterruptedException object + * @requires test.thread.factory == null * @run main/othervm -XX:-UseGCOverheadLimit -Xmx24M -XX:-UseTLAB OOMEInReferenceHandler * @author peter.levart@gmail.com * @key intermittent diff --git a/test/jdk/java/util/concurrent/locks/Lock/OOMEInAQS.java b/test/jdk/java/util/concurrent/locks/Lock/OOMEInAQS.java index aee6c3617c8..0ed76f4b885 100644 --- a/test/jdk/java/util/concurrent/locks/Lock/OOMEInAQS.java +++ b/test/jdk/java/util/concurrent/locks/Lock/OOMEInAQS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, 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 @@ -39,6 +39,7 @@ import java.util.stream.Stream; * @bug 8066859 * @summary Check that AQS-based locks, conditions, and CountDownLatches do not fail when encountering OOME * @requires vm.gc.G1 + * @requires test.thread.factory == null * @requires !(vm.graal.enabled & vm.compMode == "Xcomp") * @run main/othervm -XX:+UseG1GC -XX:-UseGCOverheadLimit -Xmx48M -XX:-UseTLAB OOMEInAQS */ diff --git a/test/jdk/jdk/internal/vm/Continuation/Scoped.java b/test/jdk/jdk/internal/vm/Continuation/Scoped.java index 908267792b8..448c2ab71a5 100644 --- a/test/jdk/jdk/internal/vm/Continuation/Scoped.java +++ b/test/jdk/jdk/internal/vm/Continuation/Scoped.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, 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 * @summary Nested continuations test * @requires vm.continuations + * @requires test.thread.factory == null * @modules java.base/jdk.internal.vm * @build java.base/java.lang.StackWalkerHelper * @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -Xint Scoped