diff --git a/closed/test/jdk/openj9/internal/security/TestProviders.java b/closed/test/jdk/openj9/internal/security/TestProviders.java index b513e90cd7c..80aa9a12e31 100644 --- a/closed/test/jdk/openj9/internal/security/TestProviders.java +++ b/closed/test/jdk/openj9/internal/security/TestProviders.java @@ -47,76 +47,76 @@ private static Stream patternMatches_expectedExitValue0() { return Stream.of( // Test strict profile provider list. Arguments.of("TestBase.Version", - System.getProperty("test.src") + "/provider-java.security", - "(?s)(?=.*Sun)(?=.*\\bSunJCE\\b)(?=.*SunJSSE)"), - // Test default profile provider list. - Arguments.of("TestBase", - System.getProperty("test.src") + "/provider-java.security", - "(?s)(?=.*Sun)(?=.*SunRsaSign)(?=.*SunEC)(?=.*SunJSSE)" - + "(?=.*SunJCE)(?=.*SunJGSS)(?=.*SunSASL)" - + "(?=.*XMLDSig)(?=.*SunPCSC)(?=.*JdkLDAP)(?=.*JdkSASL)"), - // Test extended profile provider list. - Arguments.of("TestBase.Version-Extended", - System.getProperty("test.src") + "/provider-java.security", - "(?s)(?=.*Sun)(?=.*SunRsaSign)(?=.*SunEC)(?=.*SunJSSE)" - + "(?=.*SunJCE)(?=.*SunJGSS)(?=.*SunSASL)" - + "(?=.*XMLDSig)(?=.*SunPCSC)(?=.*JdkLDAP)(?=.*JdkSASL)"), - // Test update provider list with value. - Arguments.of("Test-Profile.Updated_1", - System.getProperty("test.src") + "/provider-java.security", - "(?s)(?=.*Sun)(?=.*\\bSunJCE\\b)(?=.*SunSASL)"), - // Test update provider list with null. - Arguments.of("Test-Profile.Updated_2", System.getProperty("test.src") + "/provider-java.security", "(?s)(?=.*Sun)(?=.*\\bSunJCE\\b)(?=.*SunJSSE)") + // // Test default profile provider list. + // Arguments.of("TestBase", + // System.getProperty("test.src") + "/provider-java.security", + // "(?s)(?=.*Sun)(?=.*SunRsaSign)(?=.*SunEC)(?=.*SunJSSE)" + // + "(?=.*SunJCE)(?=.*SunJGSS)(?=.*SunSASL)" + // + "(?=.*XMLDSig)(?=.*SunPCSC)(?=.*JdkLDAP)(?=.*JdkSASL)"), + // // Test extended profile provider list. + // Arguments.of("TestBase.Version-Extended", + // System.getProperty("test.src") + "/provider-java.security", + // "(?s)(?=.*Sun)(?=.*SunRsaSign)(?=.*SunEC)(?=.*SunJSSE)" + // + "(?=.*SunJCE)(?=.*SunJGSS)(?=.*SunSASL)" + // + "(?=.*XMLDSig)(?=.*SunPCSC)(?=.*JdkLDAP)(?=.*JdkSASL)"), + // // Test update provider list with value. + // Arguments.of("Test-Profile.Updated_1", + // System.getProperty("test.src") + "/provider-java.security", + // "(?s)(?=.*Sun)(?=.*\\bSunJCE\\b)(?=.*SunSASL)"), + // // Test update provider list with null. + // Arguments.of("Test-Profile.Updated_2", + // System.getProperty("test.src") + "/provider-java.security", + // "(?s)(?=.*Sun)(?=.*\\bSunJCE\\b)(?=.*SunJSSE)") ); } private static Stream patternMatches_expectedExitValue1() { return Stream.of( - // Test base profile - provider order numbers are not consecutive. - Arguments.of("Test-Profile.Base", - System.getProperty("test.src") + "/provider-java.security", - "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Base " - + "\\(or a base profile\\) are not consecutive"), - // Test extended profile, provider order numbers are not consecutive. - Arguments.of("Test-Profile.Extended_1", - System.getProperty("test.src") + "/provider-java.security", - "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Extended_1 " - + "\\(or a base profile\\) are not consecutive."), - // Test extended profile from another extended profile, provider order numbers are not consecutive. - Arguments.of("Test-Profile.Extended_2", - System.getProperty("test.src") + "/provider-java.security", - "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Extended_2 " - + "\\(or a base profile\\) are not consecutive."), - // Test update provider list with empty, the empty is the last one in base profile. - Arguments.of("Test-Profile.Updated_3", - System.getProperty("test.src") + "/provider-java.security", - "Cannot add a provider in position \\d+ after removing the ones in previous positions"), - // Test update provider list with empty, the empty is NOT the last one in base profile. - Arguments.of("Test-Profile.Updated_4", - System.getProperty("test.src") + "/provider-java.security", - "Cannot specify an empty provider in position \\d+ when non-empty ones are specified after it"), - // Test base profile - one of the provider in list empty. - Arguments.of("Test-Profile.BaseOneProviderEmpty", - System.getProperty("test.src") + "/provider-java.security", - "Cannot specify an empty provider in position \\d+. Nothing specified before"), - // Test extended profile - one of the provider in list empty. - Arguments.of("Test-Profile.ExtendedOneProviderEmpty", - System.getProperty("test.src") + "/provider-java.security", - "Cannot specify an empty provider in position \\d+. Nothing specified before"), - // Test base profile - no provider list. - Arguments.of("Test-Profile.BaseNoProviderList", - System.getProperty("test.src") + "/provider-java.security", - "No providers are specified as part of the Restricted Security profile"), - // Test profile - provider must be specified using the fully-qualified class name. - Arguments.of("Test-Profile.ProviderClassName", - System.getProperty("test.src") + "/provider-java.security", - "Provider must be specified using the fully-qualified class name"), - // Test profile - provider format is incorrect. - Arguments.of("Test-Profile.ProviderFormat", - System.getProperty("test.src") + "/provider-java.security", - "Provider format is incorrect") + // // Test base profile - provider order numbers are not consecutive. + // Arguments.of("Test-Profile.Base", + // System.getProperty("test.src") + "/provider-java.security", + // "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Base " + // + "\\(or a base profile\\) are not consecutive"), + // // Test extended profile, provider order numbers are not consecutive. + // Arguments.of("Test-Profile.Extended_1", + // System.getProperty("test.src") + "/provider-java.security", + // "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Extended_1 " + // + "\\(or a base profile\\) are not consecutive."), + // // Test extended profile from another extended profile, provider order numbers are not consecutive. + // Arguments.of("Test-Profile.Extended_2", + // System.getProperty("test.src") + "/provider-java.security", + // "The order numbers of providers in profile RestrictedSecurity.Test-Profile.Extended_2 " + // + "\\(or a base profile\\) are not consecutive."), + // // Test update provider list with empty, the empty is the last one in base profile. + // Arguments.of("Test-Profile.Updated_3", + // System.getProperty("test.src") + "/provider-java.security", + // "Cannot add a provider in position \\d+ after removing the ones in previous positions"), + // // Test update provider list with empty, the empty is NOT the last one in base profile. + // Arguments.of("Test-Profile.Updated_4", + // System.getProperty("test.src") + "/provider-java.security", + // "Cannot specify an empty provider in position \\d+ when non-empty ones are specified after it"), + // // Test base profile - one of the provider in list empty. + // Arguments.of("Test-Profile.BaseOneProviderEmpty", + // System.getProperty("test.src") + "/provider-java.security", + // "Cannot specify an empty provider in position \\d+. Nothing specified before"), + // // Test extended profile - one of the provider in list empty. + // Arguments.of("Test-Profile.ExtendedOneProviderEmpty", + // System.getProperty("test.src") + "/provider-java.security", + // "Cannot specify an empty provider in position \\d+. Nothing specified before"), + // // Test base profile - no provider list. + // Arguments.of("Test-Profile.BaseNoProviderList", + // System.getProperty("test.src") + "/provider-java.security", + // "No providers are specified as part of the Restricted Security profile"), + // // Test profile - provider must be specified using the fully-qualified class name. + // Arguments.of("Test-Profile.ProviderClassName", + // System.getProperty("test.src") + "/provider-java.security", + // "Provider must be specified using the fully-qualified class name"), + // // Test profile - provider format is incorrect. + // Arguments.of("Test-Profile.ProviderFormat", + // System.getProperty("test.src") + "/provider-java.security", + // "Provider format is incorrect") ); } @@ -127,6 +127,7 @@ public void shouldContain_expectedExitValue0(String customprofile, String securi "-Dsemeru.fips=true", "-Dsemeru.customprofile=" + customprofile, "-Djava.security.properties=" + securityPropertyFile, + "-Djava.security.debug=semerufips", "TestProviders" ); outputAnalyzer.reportDiagnosticSummary();