diff --git a/test/jdk/jdk/jfr/jvm/TestModularImage.java b/test/jdk/jdk/jfr/jvm/TestModularImage.java index 0f10150af60..7a019365178 100644 --- a/test/jdk/jdk/jfr/jvm/TestModularImage.java +++ b/test/jdk/jdk/jfr/jvm/TestModularImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 @@ -43,7 +43,12 @@ import jdk.test.lib.process.ProcessTools; * as expected * @requires vm.hasJFR * @library /test/lib - * @run driver jdk.jfr.jvm.TestModularImage + * @comment Test is being run in othervm to support JEP 493 enabled + * JDKs which don't allow patched modules. Note that jtreg patches + * module java.base to add java.lang.JTRegModuleHelper. If then a + * jlink run is attempted in-process - using the ToolProvider API - + * on a JEP 493 enabled JDK, the test fails. + * @run main/othervm jdk.jfr.jvm.TestModularImage */ public class TestModularImage { private static final String STARTED_RECORDING = "Started recording"; diff --git a/test/jdk/tools/launcher/SourceMode.java b/test/jdk/tools/launcher/SourceMode.java index 20e88228563..23f0b12e9b4 100644 --- a/test/jdk/tools/launcher/SourceMode.java +++ b/test/jdk/tools/launcher/SourceMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, 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 @@ -26,7 +26,12 @@ * @bug 8192920 8204588 8210275 8286571 * @summary Test source mode * @modules jdk.compiler jdk.jlink - * @run main SourceMode + * @comment Test is being run in othervm to support JEP 493 enabled + * JDKs which don't allow patched modules. Note that jtreg patches + * module java.base to add java.lang.JTRegModuleHelper. If then a + * jlink run is attempted in-process - using the ToolProvider API - + * on a JEP 493 enabled JDK, the test fails. + * @run main/othervm SourceMode */