Skip to content

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, cjplummer
  • Loading branch information
MBaesken committed Jun 19, 2023
1 parent 6473a7d commit 6a63bad
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

3 comments on commit 6a63bad

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk21

@openjdk
Copy link

@openjdk openjdk bot commented on 6a63bad Jun 21, 2023

Choose a reason for hiding this comment

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

@MBaesken the backport was successfully created on the branch MBaesken-backport-6a63badd in my personal fork of openjdk/jdk21. To create a pull request with this backport targeting openjdk/jdk21:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 6a63badd from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 19 Jun 2023 and was reviewed by Alan Bateman and Chris Plummer.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21:

$ git fetch https://github.com/openjdk-bots/jdk21.git MBaesken-backport-6a63badd:MBaesken-backport-6a63badd
$ git checkout MBaesken-backport-6a63badd
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21.git MBaesken-backport-6a63badd

Please sign in to comment.