On Fri, 2 Jun 2023 19:27:28 GMT, Alex Menkov <amen...@openjdk.org> wrote:
>> test/jdk/sun/tools/jcmd/TestJcmdNoAgentLoad.java line 42: >> >>> 40: * @library /test/lib >>> 41: * >>> 42: * @run main/othervm -XX:-EnableDynamicAgentLoading TestJcmdNoAgentLoad >> >> The test verifies only one scenario. I think we need to test 3 scenarios: >> - -XX:-EnableDynamicAgentLoading >> - -XX:+EnableDynamicAgentLoading >> - default (no EnableDynamicAgentLoading arg) > > I didn't find tests for EnableDynamicAgentLoading for attach API too (to > ensure this fix doesn't break it) Good suggestions, thanks. Added three modes: default, disabled and enabled. Also, added a real java agent to check if it has been loaded. The jcmd is using the dynamic attach to load the agents, so it has to be tested as well. Alan recently added new tests for this as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14244#discussion_r1218453869