RFR: 8334057: JLinkReproducibleTest.java support receive test.tool.vm.opts
Jaikiran Pai
jpai at openjdk.org
Fri Jul 12 07:08:51 UTC 2024
On Wed, 12 Jun 2024 02:00:41 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
> Currently, the testcase `test/jdk/tools/jlink/JLinkReproducibleTest.java` doesn't receive jvm options from jtreg.
> I think it's necessory to receive jvm options from jtreg.
> Fix solution similar to [JDK-8157850](https://bugs.openjdk.org/browse/JDK-8157850), the change has been verified, only change the testacase, the risk is low.
I'll run this change against our CI instance just to be sure this doesn't cause unexpected issues. I'll approve the PR once those runs complete.
Thank you for updating the JBS issue description. It now states:
> we found that the test case would start a new java process during the test, but the started java child process did not receive the jvm options configured from the parent process, resulting in the failure of the fix verification to continue normally. Therefore, it is necessary to pass in the jvm options configured from the parent process when starting the child java process.
What you propose in this PR looks fine to me and matches some other tests which do a similar thing. Maybe we should do the same thing in some other tests in this directory, to keep them consistent. For now though, I think what you have here is fine and I don't expect you to update these other places.
test/jdk/tools/jlink/JLinkReproducibleTest.java line 41:
> 39: public class JLinkReproducibleTest {
> 40:
> 41: static final String TOOL_VM_OPTIONS = System.getProperty("test.tool.vm.opts", "");
Nit - this can be made `private`
-------------
PR Review: https://git.openjdk.org/jdk/pull/19669#pullrequestreview-2174025942
PR Comment: https://git.openjdk.org/jdk/pull/19669#issuecomment-2224957014
PR Review Comment: https://git.openjdk.org/jdk/pull/19669#discussion_r1675413193
More information about the core-libs-dev
mailing list