Skip to content

Commit

Permalink
8308499: Test vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionF…
Browse files Browse the repository at this point in the history
…ilter/filter001/TestDescription.java failed: VMDisconnectedException

Reviewed-by: lmesnik, kevinw
  • Loading branch information
plummercj committed Jun 15, 2023
1 parent 3e0bbd2 commit 79ff72a
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -74,6 +74,7 @@ public static int run (String argv[], PrintStream out) {

private String classExclName1 = "java";
private String classExclName2 = "sun";
private String classExclName3 = "jdk";
private boolean methodExitReceived = false;

protected void testRun() {
Expand Down Expand Up @@ -103,6 +104,7 @@ protected void testRun() {

eventRequest1.addClassExclusionFilter(classExclName1 + "*");
eventRequest1.addClassExclusionFilter(classExclName2 + "*");
eventRequest1.addClassExclusionFilter(classExclName3 + "*");
eventRequest1.enable();

eventHandler.addListener(
Expand All @@ -111,7 +113,10 @@ public boolean eventReceived(Event event) {
if (event instanceof MethodExitEvent) {
methodExitReceived = true;
String str = ((MethodExitEvent)event).location().declaringType().name();
if (str.indexOf(classExclName1) == 0 || str.indexOf(classExclName2) == 0) {
if (str.indexOf(classExclName1) == 0 ||
str.indexOf(classExclName2) == 0 ||
str.indexOf(classExclName3) == 0)
{
setFailedStatus("Received unexpected MethodExitEvent for excluded class:" + str);
} else {
display("Received expected MethodExitEvent for " + str);
Expand Down

3 comments on commit 79ff72a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@plummercj
Copy link
Contributor 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 79ff72a Jun 20, 2023

Choose a reason for hiding this comment

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

@plummercj the backport was successfully created on the branch plummercj-backport-79ff72a7 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 79ff72a7 from the openjdk/jdk repository.

The commit being backported was authored by Chris Plummer on 15 Jun 2023 and was reviewed by Leonid Mesnik and Kevin Walls.

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 plummercj-backport-79ff72a7:plummercj-backport-79ff72a7
$ git checkout plummercj-backport-79ff72a7
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21.git plummercj-backport-79ff72a7

Please sign in to comment.