changeset 9389:f157f6b73426

8036844: test failures due to wrong keystore paths Reviewed-by: weijun
author juh
date Fri, 07 Mar 2014 10:40:03 -0800
parents 0815c5f7d001
children 41a0eb4a0b30
files test/sun/security/provider/X509Factory/BigCRL.java test/sun/security/tools/keytool/PrintSSL.java test/sun/security/tools/keytool/printssl.sh
diffstat 3 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/provider/X509Factory/BigCRL.java	Fri Mar 07 15:01:32 2014 +0100
+++ b/test/sun/security/provider/X509Factory/BigCRL.java	Fri Mar 07 10:40:03 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -45,7 +45,7 @@
     public static void main(String[] args) throws Exception {
         int n = 500000;
         String ks = System.getProperty("test.src", ".")
-                + "/../../ssl/etc/keystore";
+                + "/../../../../javax/net/ssl/etc/keystore";
         String pass = "passphrase";
         String alias = "dummy";
 
--- a/test/sun/security/tools/keytool/PrintSSL.java	Fri Mar 07 15:01:32 2014 +0100
+++ b/test/sun/security/tools/keytool/PrintSSL.java	Fri Mar 07 10:40:03 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -31,7 +31,8 @@
     public static void main(String[] args) throws Exception {
         System.setProperty("javax.net.ssl.keyStorePassword", "passphrase");
         System.setProperty("javax.net.ssl.keyStore",
-                System.getProperty("test.src", "./") + "/../../ssl/etc/keystore");
+                           System.getProperty("test.src", "./")
+                               + "/../../../../javax/net/ssl/etc/keystore");
         SSLServerSocketFactory sslssf =
                 (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
         final ServerSocket server = sslssf.createServerSocket(0);
--- a/test/sun/security/tools/keytool/printssl.sh	Fri Mar 07 15:01:32 2014 +0100
+++ b/test/sun/security/tools/keytool/printssl.sh	Fri Mar 07 10:40:03 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2014, 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
@@ -56,7 +56,15 @@
 esac
 
 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}${FS}PrintSSL.java || exit 10
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dtest.src=$TESTSRC PrintSSL | ( read PORT; ${TESTJAVA}${FS}bin${FS}keytool -printcert -sslserver localhost:$PORT )
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dtest.src=$TESTSRC PrintSSL | (
+      read PORT
+      if [ "$PORT" = "" ]; then
+          echo "Server not started"
+          exit 2
+      else
+          ${TESTJAVA}${FS}bin${FS}keytool -printcert -sslserver localhost:$PORT
+      fi
+)
 status=$?
 
 rm PrintSSL*.class