From 6a63badd8ea3e79cd9fc3cb33aff499fc9a6d3f1 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Mon, 19 Jun 2023 06:39:58 +0000 Subject: [PATCH] 8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java second failure on AIX Reviewed-by: alanb, cjplummer --- .../warnings/DynamicLoadWarningTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java b/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java index 4e341b4e274..970bade3530 100644 --- a/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java +++ b/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java @@ -119,23 +119,23 @@ class DynamicLoadWarningTest { test().whenRunning(loadJvmtiAgent1) .stderrShouldContain(JVMTI_AGENT_WARNING); - // dynamically load loadJvmtiAgent1 twice, should be one warning on platforms - // that can detect if an agent library was previously loaded - if (!Platform.isAix()) { - test().whenRunning(loadJvmtiAgent1) - .whenRunning(loadJvmtiAgent1) - .stderrShouldContain(JVMTI_AGENT_WARNING, 1); - } - // opt-in via command line option to allow dynamic loading of agents test().withOpts("-XX:+EnableDynamicAgentLoading") .whenRunning(loadJvmtiAgent1) .stderrShouldNotContain(JVMTI_AGENT_WARNING); - // start loadJvmtiAgent1 via the command line, then dynamically load loadJvmtiAgent1 - test().withOpts("-agentpath:" + jvmtiAgentPath1) - .whenRunning(loadJvmtiAgent1) - .stderrShouldNotContain(JVMTI_AGENT_WARNING); + // test behavior on platforms that can detect if an agent library was previously loaded + if (!Platform.isAix()) { + // start loadJvmtiAgent1 via the command line, then dynamically load loadJvmtiAgent1 + test().withOpts("-agentpath:" + jvmtiAgentPath1) + .whenRunning(loadJvmtiAgent1) + .stderrShouldNotContain(JVMTI_AGENT_WARNING); + + // dynamically load loadJvmtiAgent1 twice, should be one warning + test().whenRunning(loadJvmtiAgent1) + .whenRunning(loadJvmtiAgent1) + .stderrShouldContain(JVMTI_AGENT_WARNING, 1); + } } /**