8316466: 8 com/sun/jdi tests ignore VM flags

Reviewed-by: lmesnik, sspitsyn
This commit is contained in:
Shiv Shah 2026-05-29 18:06:13 +00:00 committed by Leonid Mesnik
parent 05244e8d37
commit 2baa87be25
5 changed files with 16 additions and 5 deletions

View File

@ -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<String, Connector.Argument> 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);
}
}

View File

@ -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
*/

View File

@ -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 <sgehwolf@redhat.com>
*
* @requires vm.gc != "Z"
* @requires vm.flagless
* @library ..
* @run build TestScaffold VMConnection TargetListener TargetAdapter
* @run compile -g OomDebugTest.java

View File

@ -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<String, Connector.Argument> vmArgs = lc.defaultArguments();
vmArgs.get("main").setValue(cmdLine);
if (options != null) {

View File

@ -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