diff -r 335cf1796fcd -r 23830562d3d1 jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java --- a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java Tue Aug 11 12:33:25 2015 -0700 +++ b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java Wed Aug 12 14:38:09 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, 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 @@ -36,6 +36,22 @@ main(new TestRSAKeyLength()); } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + boolean isValidKeyLength[] = { true, true, true, false, false }; String algos[] = { "SHA1withRSA", "SHA224withRSA", "SHA256withRSA", "SHA384withRSA", "SHA512withRSA" };