8244284: Two tests in test/hotspot/jtreg/vmTestbase fail with --illegal-access=deny

Alan Bateman Alan.Bateman at oracle.com
Sat May 2 14:58:31 UTC 2020


I need a reviewer for an tiny update to two tests in 
test/hotspot/jtreg/vmTestbase/ndk/jdi. Both tests need the non-exported 
package com.sun.tools.jdi to be opened because they instantiate 
ObjectReferenceImpl via its non-public constructor. This change is 
needed in advance of denying illegal access by default.

-Alan


diff --git 
a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java 
b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java
--- 
a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java
+++ 
b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2020, 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
@@ -47,6 +47,7 @@
   * @run driver jdk.test.lib.FileInstaller . .
   * @build nsk.jdi.ClassType.invokeMethod.invokemethod009
   *        nsk.jdi.ClassType.invokeMethod.invokemethod009t
+ * @modules jdk.jdi/com.sun.tools.jdi:open
   * @run main/othervm PropertyResolvingWrapper
   *      nsk.jdi.ClassType.invokeMethod.invokemethod009
   *      -verbose
diff --git 
a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java 
b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java
--- 
a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java
+++ 
b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2020, 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
@@ -48,6 +48,7 @@
   * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod006t
   * @compile -g:lines,source,vars ../invokemethod006t.java
   *
+ * @modules jdk.jdi/com.sun.tools.jdi:open
   * @run main/othervm PropertyResolvingWrapper
   *      nsk.jdi.ObjectReference.invokeMethod.invokemethod006
   *      -verbose


More information about the serviceability-dev mailing list