8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java second failure on AIX

Reviewed-by: alanb
Backport-of: 6a63badd8e
(cherry picked from commit 1fc60429a1)
This commit is contained in:
Matthias Baesken
2023-06-21 09:02:06 +00:00
committed by Vitaly Provodin
parent 2851c2edac
commit 9bdd685eb4

View File

@@ -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);
}
}
/**