Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk21 Public archive

Commit

Permalink
8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java se…
Browse files Browse the repository at this point in the history
…cond failure on AIX

Reviewed-by: alanb
Backport-of: 6a63badd8ea3e79cd9fc3cb33aff499fc9a6d3f1
  • Loading branch information
MBaesken committed Jun 21, 2023
1 parent ef0357f commit 1fc6042
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,23 @@ void testLoadOneJvmtiAgent(OnAttachAction loadJvmtiAgent1) throws Exception {
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);
}
}

/**
Expand Down

1 comment on commit 1fc6042

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.