From 0bc23856246b0581d0a8d8a000b175b948e4efd5 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Mon, 8 Aug 2022 13:48:28 -0400 Subject: [PATCH] Update testcase to add module jdk.crypto.cryptoki so that it can also work in FIPS mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In FIPS mode, the SecureRandom come from the provider SunPKCS11. So, add the module “jdk.crypto.cryptoki” into the test case, so that the test case can initialize the provider SunPKCS11 and get the SecureRandom from it in FIPS mode. This will make the test case works both in the FIPS and non-FIPS mode. Signed-off-by: Tao Liu --- .../lang/Class/GetPackageBootLoaderChildLayer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/jdk/java/lang/Class/GetPackageBootLoaderChildLayer.java b/test/jdk/java/lang/Class/GetPackageBootLoaderChildLayer.java index 9be52f15bb6..32f285b3b95 100644 --- a/test/jdk/java/lang/Class/GetPackageBootLoaderChildLayer.java +++ b/test/jdk/java/lang/Class/GetPackageBootLoaderChildLayer.java @@ -21,12 +21,18 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved + * =========================================================================== + */ + /** * @test * @requires !vm.graal.enabled * @modules jdk.attach - * @run main/othervm --limit-modules jdk.attach -Djdk.attach.allowAttachSelf - * GetPackageBootLoaderChildLayer + * @run main/othervm --limit-modules jdk.attach,jdk.crypto.cryptoki + * -Djdk.attach.allowAttachSelf GetPackageBootLoaderChildLayer * @summary Exercise Class.getPackage on a class defined to the boot loader * but in a module that is in a child layer rather than the boot layer */