TestLinker.java Test Failure
Jorn Vernee
jorn.vernee at oracle.com
Mon Jan 8 11:26:59 UTC 2024
Hello,
I'm not able to reproduce this issue locally, and I think it may be up
to the locale you're running with.
> Since the security manager is deprecated, does the test need to be
updated to remove this security policy option, or is there a different
aspect of security that needs to be tested?
The security manager is deprecated, but until it is actually removed, we
still need to support running with it. The test is making sure that that
works.
I think we can just add the needed permission to the existing policy
file to fix this issue. Could you try that?
Thanks,
Jorn
On 03/01/2024 19:21, Saint Wesonga wrote:
>
> Hello,
>
> I’m seeing a jtreg test failure in java/foreign/TestLinker.java
> <https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestLinker.java>
> (tested on Windows x64 & aarch64, Linux x64):
>
> /test TestLinker.testLinkerOptionsCache(): failure/
>
> /java.util.ServiceConfigurationError: Locale provider adapter
> "CLDR"cannot be instantiated./
>
> / at
> java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:197)/
>
> / at
> java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:285)/
>
> / at
> java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:256)/
>
> / at
> java.base/java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:181)/
>
> /…/
>
> /Caused by: java.security.AccessControlException: access denied
> ("java.lang.RuntimePermission"
> "accessClassInPackage.sun.util.locale.provider")/
>
> / at
> java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:488)/
>
> / at
> java.base/java.security.AccessController.checkPermission(AccessController.java:1085)/
>
> / at
> java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:411)/
>
> / at
> java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1318)/
>
> /…/
>
> /STDERR:/
>
> /WARNING: A command line option has enabled the Security Manager/
>
> /WARNING: The Security Manager is deprecated and will be removed in a
> future release/
>
> /WARNING: A restricted method in java.lang.foreign.AddressLayout has
> been called/
>
> /WARNING: java.lang.foreign.AddressLayout::withTargetLayout has been
> called by NativeTestHelper in an unnamed module/
>
> /WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning
> for callers in this module/
>
> /WARNING: Restricted methods will be blocked in a future release
> unless native access is enabled/
>
> The test passes if the security policy is removed:
>
> --- a/test/jdk/java/foreign/TestLinker.java
>
> +++ b/test/jdk/java/foreign/TestLinker.java
>
> @@ -25,8 +25,7 @@
>
> * @test
>
> * @modules java.base/jdk.internal.foreign
>
> * @run testng TestLinker
>
> - * @run testng/othervm/policy=security.policy
>
> - * -Djava.security.manager=default TestLinker
>
> + * @run testng/othervm TestLinker
>
> */
>
> Since the security manager is deprecated, does the test need to be
> updated to remove this security policy option, or is there a different
> aspect of security that needs to be tested?
>
> Thanks,
>
> -Saint
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240108/a20d646d/attachment-0001.htm>
More information about the panama-dev
mailing list