diff --git a/test/jdk/com/sun/jdi/ClassUnloadEventTest.java b/test/jdk/com/sun/jdi/ClassUnloadEventTest.java index 0948f2cc994..297046ee6bb 100644 --- a/test/jdk/com/sun/jdi/ClassUnloadEventTest.java +++ b/test/jdk/com/sun/jdi/ClassUnloadEventTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2026, 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 @@ -202,7 +202,8 @@ public class ClassUnloadEventTest { LaunchingConnector launchingConnector = Bootstrap.virtualMachineManager().defaultConnector(); Map arguments = launchingConnector.defaultArguments(); arguments.get("main").setValue(ClassUnloadEventTest.class.getName()); - arguments.get("options").setValue("-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xlog:class+unload=info -Xlog:gc"); + String testOpts = System.getProperty("test.vm.opts", "") + " " + System.getProperty("test.java.opts", ""); + arguments.get("options").setValue(testOpts + " -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xlog:class+unload=info -Xlog:gc"); return launchingConnector.launch(arguments); } } diff --git a/test/jdk/com/sun/jdi/JdbOptions.java b/test/jdk/com/sun/jdi/JdbOptions.java index 4a6c8550fc6..33a8a87333d 100644 --- a/test/jdk/com/sun/jdi/JdbOptions.java +++ b/test/jdk/com/sun/jdi/JdbOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2026, 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 8234808 * + * @requires vm.flagless * @library /test/lib * @run main/othervm JdbOptions */ diff --git a/test/jdk/com/sun/jdi/OomDebugTest.java b/test/jdk/com/sun/jdi/OomDebugTest.java index 4f824b71612..7be0047e889 100644 --- a/test/jdk/com/sun/jdi/OomDebugTest.java +++ b/test/jdk/com/sun/jdi/OomDebugTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2016 Red Hat Inc. + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,6 +31,7 @@ * @author Severin Gehwolf * * @requires vm.gc != "Z" + * @requires vm.flagless * @library .. * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -g OomDebugTest.java diff --git a/test/jdk/com/sun/jdi/SunBootClassPathEmptyTest.java b/test/jdk/com/sun/jdi/SunBootClassPathEmptyTest.java index b1eacad1e90..f54ed54a752 100644 --- a/test/jdk/com/sun/jdi/SunBootClassPathEmptyTest.java +++ b/test/jdk/com/sun/jdi/SunBootClassPathEmptyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, 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 @@ -61,6 +61,12 @@ public class SunBootClassPathEmptyTest { } PathSearchingVirtualMachine launchVm(String cmdLine, String options) throws Exception { + String testOpts = System.getProperty("test.vm.opts", "") + " " + System.getProperty("test.java.opts", ""); + if (options != null) { + options = testOpts + " " + options; + } else { + options = testOpts; + } Map vmArgs = lc.defaultArguments(); vmArgs.get("main").setValue(cmdLine); if (options != null) { diff --git a/test/jdk/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java b/test/jdk/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java index a9928bc57ee..d702e627b54 100644 --- a/test/jdk/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java +++ b/test/jdk/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2026, 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 @@ * * This tests launches a debuggee using a custom LaunchingConnector. * + * @requires vm.flagless * @modules jdk.jdi/com.sun.tools.jdi * @build DebugUsingCustomConnector SimpleLaunchingConnector Foo NullTransportService * @run main/othervm DebugUsingCustomConnector