8244284: Two tests in test/hotspot/jtreg/vmTestbase fail with --illegal-access=deny
Igor Ignatyev
igor.ignatyev at oracle.com
Sat May 2 15:39:24 UTC 2020
Hi Alan,
it looks good, but could you please put @modules tags right before @library? we are trying to follow the recommend order ( http://hg.openjdk.java.net/code-tools/jtreg/raw-file/e235ed803708/src/share/doc/javatest/regtest/tag-spec.html#ORDER <http://hg.openjdk.java.net/code-tools/jtreg/raw-file/e235ed803708/src/share/doc/javatest/regtest/tag-spec.html#ORDER> )
-- Igor
> On May 2, 2020, at 7:58 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20200502/682446e6/attachment.htm>
More information about the serviceability-dev
mailing list