changeset 5455:b2b79ec5ac7d

7083664: TEST_BUG: test hard code of using c:/temp but this dir might not exist Reviewed-by: coffeys
author asaha
date Mon, 06 Aug 2012 17:00:59 -0700
parents 32f792cd1d45
children 9eee2cbe7407 23e81ad30d9d
files test/lib/security/java.policy/Ext_AllPolicy.sh test/sun/security/tools/jarsigner/AlgOptions.sh test/sun/security/tools/jarsigner/PercentSign.sh test/sun/security/tools/jarsigner/diffend.sh test/sun/security/tools/jarsigner/oldsig.sh test/sun/security/tools/keytool/AltProviderPath.sh test/sun/security/tools/keytool/SecretKeyKS.sh test/sun/security/tools/keytool/StandardAlgName.sh test/sun/security/tools/keytool/i18n.sh test/sun/security/tools/keytool/resource.sh test/sun/security/tools/policytool/Alias.sh test/sun/security/tools/policytool/ChangeUI.sh test/sun/security/tools/policytool/OpenPolicy.sh test/sun/security/tools/policytool/SaveAs.sh test/sun/security/tools/policytool/UpdatePermissions.sh test/sun/security/tools/policytool/UsePolicy.sh test/sun/security/tools/policytool/i18n.sh
diffstat 17 files changed, 76 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/security/java.policy/Ext_AllPolicy.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/lib/security/java.policy/Ext_AllPolicy.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4215035
+# @bug 4215035 7083664
 # @summary standard extensions path is hard-coded in default system policy file
 #
 # @build Ext_AllPolicy
@@ -54,19 +54,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
-    TMP=/tmp
     ;;
   Windows_95 | Windows_98 | Windows_NT )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/jarsigner/AlgOptions.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/jarsigner/AlgOptions.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 5094028 6219522
+# @bug 5094028 6219522 7083664
 # @summary test new jarsigner -sigalg and -digestalg options
 # @author Sean Mullan
 #
@@ -51,21 +51,18 @@
     PS=":"
     FS="/"
     CP="${FS}bin${FS}cp -f"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
     CP="cp -f"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
     CP="cp -f"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/jarsigner/PercentSign.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/jarsigner/PercentSign.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 6522933
+# @bug 6522933 7083664
 # @summary jarsigner fails in a directory with a path contianing a % sign
 # @author Wang Weijun
 #
@@ -51,21 +51,18 @@
     PS=":"
     FS="/"
     CP="${FS}bin${FS}cp -f"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
     CP="cp -f"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
     CP="cp -f"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/jarsigner/diffend.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/jarsigner/diffend.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 6948909
+# @bug 6948909 7083664
 # @summary Jarsigner removes MANIFEST.MF info for badly packages jar's
 #
 
@@ -46,21 +46,18 @@
     PS=":"
     FS="/"
     CP="${FS}bin${FS}cp -f"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
     CP="cp -f"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
     CP="cp -f"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/jarsigner/oldsig.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/jarsigner/oldsig.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 6543940 6868865
+# @bug 6543940 6868865 7083664
 # @summary Exception thrown when signing a jarfile in java 1.5
 #
 # @run shell oldsig.sh
@@ -47,21 +47,18 @@
     PS=":"
     FS="/"
     CP="${FS}bin${FS}cp -f"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
     CP="cp -f"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
     CP="cp -f"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/keytool/AltProviderPath.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/keytool/AltProviderPath.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4906940
+# @bug 4906940 7083664
 # @summary Add -providerPath option for keytool allowing one to specify
 #          an additional classpath to search for providers.
 # @author Andrew Fan
@@ -50,19 +50,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/keytool/SecretKeyKS.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/keytool/SecretKeyKS.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4694076
+# @bug 4694076 7083664
 # @summary KeyTool throws ArrayIndexOutOfBoundsException for listing
 #          SecretKey entries in non-verbose mode.
 # @author Valerie Peng
@@ -49,19 +49,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/keytool/StandardAlgName.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/keytool/StandardAlgName.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test 1.1 04/11/12
-# @bug 4909889
+# @bug 4909889 7083664
 # @summary KeyTool accepts any input that user make as long as we can make some
 #          sense out of it, but when comes to present the info the user, it
 #          promotes a standard look.
@@ -50,19 +50,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
--- a/test/sun/security/tools/keytool/i18n.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/keytool/i18n.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4348369
+# @bug 4348369 7083664
 # @summary keytool not i18n compliant
 # @author charlie lai
 #
@@ -50,19 +50,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     PS=";"
     FS="/"
-    TMP=/tmp
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/keytool/resource.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/keytool/resource.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 6239297
+# @bug 6239297 7083664
 # @summary keytool usage is broken after changing Resources.java
 # @author Max Wang
 #
@@ -46,17 +46,14 @@
   SunOS | Linux | Darwin )
     NULL=/dev/null
     FS="/"
-    TMP=/tmp
     ;;
   CYGWIN* )
     NULL=/dev/null
     FS="/"
-    TMP=/tmp
     ;;
   Windows_* )
     NULL=NUL
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized operating system!"
@@ -65,13 +62,11 @@
 esac
 
 # the test code
-${TESTJAVA}${FS}bin${FS}keytool > ${TMP}${FS}temp_file_40875602475 2> ${NULL}
-grep MissingResourceException ${TMP}${FS}temp_file_40875602475
+${TESTJAVA}${FS}bin${FS}keytool > temp_file_40875602475 2> ${NULL}
+grep MissingResourceException temp_file_40875602475
 
 if [ $? -eq 0 ]; then
-    rm ${TMP}${FS}temp_file_40875602475
     exit 1
 fi
 
-rm ${TMP}${FS}temp_file_40875602475
 exit 0
--- a/test/sun/security/tools/policytool/Alias.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/Alias.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4449491
+# @bug 4449491 7083664
 # @summary policytool should allow principal type to be empty
 #               (keystore alias substitution)
 #
@@ -51,13 +51,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
     ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    ;;	
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/ChangeUI.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/ChangeUI.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug  6296772 6293981 6290216
+# @bug  6296772 6293981 6290216 7083664
 # @summary FilePermission and DelegationPermission, and cancel button
 #
 # @run applet/manual=done ChangeUI.html
@@ -50,13 +50,16 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/OpenPolicy.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/OpenPolicy.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4224186
+# @bug 4224186 7083664
 # @summary missing File.separatorChar when initially opening policy file
 #
 # @run applet/manual=done OpenPolicy.html
@@ -50,13 +50,17 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    CP="cp -f"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/SaveAs.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/SaveAs.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4252583
+# @bug 4252583 7083664
 # @summary policytool throws FileNotFoundException when user tries to
 #               save new policy file
 #
@@ -51,13 +51,17 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    CP="cp -f"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/UpdatePermissions.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/UpdatePermissions.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4218206
+# @bug 4218206 7083664
 # @summary missing or invalid permission target names in policy tool
 #
 # @run applet/manual=done UpdatePermissions.html
@@ -50,13 +50,17 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    CP="cp -f"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/UsePolicy.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/UsePolicy.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4273771
+# @bug 4273771 7083664
 # @summary Need to add "usePolicy" RuntimePermission to policytool
 #
 # @run applet/manual=done UsePolicy.html
@@ -50,13 +50,17 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    CP="cp -f"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/sun/security/tools/policytool/i18n.sh	Mon Aug 06 15:17:56 2012 -0700
+++ b/test/sun/security/tools/policytool/i18n.sh	Mon Aug 06 17:00:59 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, 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
@@ -22,7 +22,7 @@
 #
 
 # @test
-# @bug 4348370
+# @bug 4348370 7083664
 # @summary policytool not i18n compliant
 #
 # @run applet/manual=done i18n.html
@@ -50,13 +50,17 @@
     NULL=/dev/null
     PS=":"
     FS="/"
-    TMP=/tmp
+    ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    CP="cp -f"
     ;;
   Windows* )
     NULL=NUL
     PS=";"
     FS="\\"
-    TMP="c:/temp"
     ;;
   * )
     echo "Unrecognized system!"