changeset 50861:2b7d0e9405cf

8192953: sun/management/jmxremote/bootstrap/*.sh tests fail with error : revokeall.exe: Permission denied Reviewed-by: cjplummer
author hb
date Thu, 28 Jun 2018 09:40:46 +0530
parents 480a96a43b62
children 350ae1b408da
files test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Wed Jun 27 20:21:42 2018 -0700
+++ b/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Thu Jun 28 09:40:46 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2018, 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
@@ -34,13 +34,12 @@
 OS=`uname -s`
 UMASK=`umask`
 
-case $OS in
-CYGWIN_NT*)
+if [[ $OS == CYGWIN_NT* ]] ; then
     OS="Windows_NT"
     if [ -z "$SystemRoot" ] ;  then
-        SystemRoot=$SYSTEMROOT
+        SystemRoot=`cygpath $SYSTEMROOT`
     fi
-esac
+fi
 
 case $OS in
 SunOS | Linux | Darwin | AIX )
@@ -70,17 +69,17 @@
     if [ "$OS" = "Windows_NT" ]; then
         USER=`id -u -n`
         CACLS="$SystemRoot/system32/cacls.exe"
-        REVOKEALL="${TESTSRC}/../../windows/revokeall.exe"
+        TEST_SRC=`cygpath ${TESTSRC}`
+        REVOKEALL="$TEST_SRC/../../windows/revokeall.exe"
         if [ ! -f "$REVOKEALL" ] ; then
             echo "$REVOKEALL missing"
             exit 1
         fi
+        chmod ug+x $REVOKEALL
     fi
-
-
     ;;
 *)
-    echo "Unrecognized system!"
+    echo "Unrecognized system! $OS"
     exit 1
     ;;
 esac